|
|
@ -1,20 +1,20 @@
|
|
|
|
stages:
|
|
|
|
stages:
|
|
|
|
- test
|
|
|
|
# - test
|
|
|
|
- ui
|
|
|
|
- ui
|
|
|
|
- build
|
|
|
|
- build
|
|
|
|
- deploy
|
|
|
|
- deploy
|
|
|
|
- release
|
|
|
|
- release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test:
|
|
|
|
# test:
|
|
|
|
image: "rust:slim-buster"
|
|
|
|
# image: "rust:slim-buster"
|
|
|
|
stage: test
|
|
|
|
# stage: test
|
|
|
|
script:
|
|
|
|
# script:
|
|
|
|
- mkdir dist
|
|
|
|
# - mkdir dist
|
|
|
|
- touch dist/index.html
|
|
|
|
# - touch dist/index.html
|
|
|
|
- apt-get update
|
|
|
|
# - apt-get update
|
|
|
|
- apt-get -y install pkg-config
|
|
|
|
# - apt-get -y install pkg-config
|
|
|
|
- cargo test
|
|
|
|
# - cargo test
|
|
|
|
|
|
|
|
|
|
|
|
build-ui:
|
|
|
|
build-ui:
|
|
|
|
stage: ui
|
|
|
|
stage: ui
|
|
|
@ -24,8 +24,8 @@ build-ui:
|
|
|
|
- apt-get -y install libssl-dev
|
|
|
|
- apt-get -y install libssl-dev
|
|
|
|
- npm install
|
|
|
|
- npm install
|
|
|
|
- npm run build
|
|
|
|
- npm run build
|
|
|
|
rules:
|
|
|
|
# rules:
|
|
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
|
|
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
|
|
artifacts:
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
paths:
|
|
|
|
- dist/
|
|
|
|
- dist/
|
|
|
@ -57,8 +57,6 @@ build-musl-bin:
|
|
|
|
- build-ui
|
|
|
|
- build-ui
|
|
|
|
stage: build
|
|
|
|
stage: build
|
|
|
|
image: 'rust:latest'
|
|
|
|
image: 'rust:latest'
|
|
|
|
rules:
|
|
|
|
|
|
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
|
|
|
|
|
|
script:
|
|
|
|
script:
|
|
|
|
- rustup target add x86_64-unknown-linux-musl
|
|
|
|
- rustup target add x86_64-unknown-linux-musl
|
|
|
|
- apt update && apt install -y musl-tools musl-dev
|
|
|
|
- apt update && apt install -y musl-tools musl-dev
|
|
|
@ -90,7 +88,6 @@ build-arm-bin:
|
|
|
|
artifacts:
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
paths:
|
|
|
|
- target/armv7-unknown-linux-gnueabihf/release/vade
|
|
|
|
- target/armv7-unknown-linux-gnueabihf/release/vade
|
|
|
|
- vade-linux-arm.tar.gz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
build-win-bin:
|
|
|
|
build-win-bin:
|
|
|
@ -116,8 +113,8 @@ deploy-dev-docker:
|
|
|
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
|
|
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
|
|
|
- docker build -t $CI_REGISTRY/vade/vade-mecum .
|
|
|
|
- docker build -t $CI_REGISTRY/vade/vade-mecum .
|
|
|
|
- docker push $CI_REGISTRY/vade/vade-mecum
|
|
|
|
- docker push $CI_REGISTRY/vade/vade-mecum
|
|
|
|
rules:
|
|
|
|
# rules:
|
|
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
|
|
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
|
|
|
|
|
|
|
|
|
|
deploy-binaries:
|
|
|
|
deploy-binaries:
|
|
|
|
dependencies:
|
|
|
|
dependencies:
|
|
|
@ -131,8 +128,11 @@ deploy-binaries:
|
|
|
|
- if: $CI_COMMIT_TAG
|
|
|
|
- if: $CI_COMMIT_TAG
|
|
|
|
script:
|
|
|
|
script:
|
|
|
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./vade-linux-x64.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/bin/$CI_COMMIT_TAG/vade-linux-x64-$CI_COMMIT_TAG.tar.gz"'
|
|
|
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./vade-linux-x64.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/bin/$CI_COMMIT_TAG/vade-linux-x64-$CI_COMMIT_TAG.tar.gz"'
|
|
|
|
|
|
|
|
|
|
|
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./vade-linux-arm.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/bin/$CI_COMMIT_TAG/vade-linux-arm-$CI_COMMIT_TAG.tar.gz"'
|
|
|
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./vade-linux-arm.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/bin/$CI_COMMIT_TAG/vade-linux-arm-$CI_COMMIT_TAG.tar.gz"'
|
|
|
|
|
|
|
|
|
|
|
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./vade-linux-musl.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/bin/$CI_COMMIT_TAG/vade-linux-musl-$CI_COMMIT_TAG.tar.gz"'
|
|
|
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./vade-linux-musl.tar.gz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/bin/$CI_COMMIT_TAG/vade-linux-musl-$CI_COMMIT_TAG.tar.gz"'
|
|
|
|
|
|
|
|
|
|
|
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./target/release/vade.exe "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/bin/$CI_COMMIT_TAG/vade.exe"'
|
|
|
|
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./target/release/vade.exe "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/bin/$CI_COMMIT_TAG/vade.exe"'
|
|
|
|
|
|
|
|
|
|
|
|
release:
|
|
|
|
release:
|
|
|
|