created .gitlab-ci.yml

This commit is contained in:
Paul Zinselmeyer 2023-04-20 10:43:42 +02:00
parent ba8adc2315
commit 25292039c2
Signed by: pfzetto
GPG key ID: 4EEF46A5B276E648
2 changed files with 62 additions and 0 deletions

59
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,59 @@
variables:
DOCKER_TLS_CERTDIR: ""
DOCKER_HOST: tcp://docker:2375
services:
- name: docker:dind
entrypoint: ["dockerd-entrypoint.sh", "--tls=false"]
stages:
- build
# - test
- pack
cargo-build:
stage: build
image: rust:slim
variables:
CARGO_HOME: $CI_PROJECT_DIR/.cargo
before_script:
script:
- cargo build --release
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- target/
- .cargo/registry/index/
- .cargo/registry/cache/
artifacts:
paths:
- target/release/verification_service
#cargo-test:
# stage: test
# image: rust:alpine
# variables:
# CARGO_HOME: $CI_PROJECT_DIR/.cargo
# before_script:
# - apk add build-base git cmake
# script:
# - cargo test --release
# cache:
# key: $CI_COMMIT_REF_SLUG
# paths:
# - target/
# - .cargo/registry/index/
# - .cargo/registry/cache/
docker:
stage: pack
image: docker:latest
only:
- master
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build --network host -t $CI_REGISTRY_IMAGE/master . -f Dockerfile
- docker push $CI_REGISTRY_IMAGE/master
dependencies:
- cargo-build

View file

@ -13,6 +13,9 @@ To use the build-in link-shortener functionality you have to POST the URL with C
## Upload a big file ## Upload a big file
`$ curl -X POST -H "Content-Type: application/gzip" -T my-file.tar.gz <bin_url>` `$ curl -X POST -H "Content-Type: application/gzip" -T my-file.tar.gz <bin_url>`
## Pipe into curl
`$ tar -xcvf - my-files* | curl -X POST -H "Content-Type: application/gzip" -T - <bin_url>`
## Accessing the data ## Accessing the data
After uploading data you can access it by accessing <bin_url> with an optional file extension that suits the data that you uploaded. After uploading data you can access it by accessing <bin_url> with an optional file extension that suits the data that you uploaded.
If the bin is a link you will get redirected. If the bin is a link you will get redirected.