Finalized CI
This commit is contained in:
parent
078086887e
commit
c7d1ec2704
|
@ -1,20 +1,20 @@
|
|||
stages:
|
||||
# - test
|
||||
- test
|
||||
- ui
|
||||
- build
|
||||
- deploy
|
||||
- release
|
||||
|
||||
|
||||
# test:
|
||||
# image: "rust:slim-buster"
|
||||
# stage: test
|
||||
# script:
|
||||
# - mkdir dist
|
||||
# - touch dist/index.html
|
||||
# - apt-get update
|
||||
# - apt-get -y install pkg-config
|
||||
# - cargo test
|
||||
test:
|
||||
image: "rust:slim-buster"
|
||||
stage: test
|
||||
script:
|
||||
- mkdir dist
|
||||
- touch dist/index.html
|
||||
- apt-get update
|
||||
- apt-get -y install pkg-config
|
||||
- cargo test
|
||||
|
||||
build-ui:
|
||||
stage: ui
|
||||
|
@ -24,8 +24,8 @@ build-ui:
|
|||
- apt-get -y install libssl-dev
|
||||
- npm install
|
||||
- npm run build
|
||||
# rules:
|
||||
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
artifacts:
|
||||
paths:
|
||||
- dist/
|
||||
|
@ -37,8 +37,8 @@ build-x64-bin:
|
|||
stage: build
|
||||
tags:
|
||||
- linux
|
||||
# rules:
|
||||
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
script:
|
||||
- apt-get update
|
||||
- apt-get -y install libssl-dev pkg-config
|
||||
|
@ -58,8 +58,8 @@ build-musl-bin:
|
|||
stage: build
|
||||
image: 'rust:latest'
|
||||
script:
|
||||
# rules:
|
||||
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- rustup target add x86_64-unknown-linux-musl
|
||||
- apt update && apt install -y musl-tools musl-dev
|
||||
- update-ca-certificates
|
||||
|
@ -77,8 +77,8 @@ build-arm-bin:
|
|||
- build-ui
|
||||
stage: build
|
||||
image: 'rust:latest'
|
||||
# rules:
|
||||
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
script:
|
||||
- rustup target add armv7-unknown-linux-gnueabihf
|
||||
- apt update
|
||||
|
@ -99,8 +99,8 @@ build-win-bin:
|
|||
stage: build
|
||||
tags:
|
||||
- windows
|
||||
# rules:
|
||||
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
script:
|
||||
- cargo build --release
|
||||
artifacts:
|
||||
|
@ -116,8 +116,8 @@ deploy-dev-docker:
|
|||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
- docker build -t $CI_REGISTRY/vade/vade-mecum .
|
||||
- docker push $CI_REGISTRY/vade/vade-mecum
|
||||
# rules:
|
||||
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
|
||||
deploy-binaries:
|
||||
dependencies:
|
||||
|
@ -127,24 +127,13 @@ deploy-binaries:
|
|||
- build-win-bin
|
||||
image: curlimages/curl:latest
|
||||
stage: deploy
|
||||
# rules:
|
||||
# - if: $CI_COMMIT_TAG
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
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/v0.1.0/vade-linux-x64-v0.1.0.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/v0.1.0/vade-linux-arm-v0.1.0.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/v0.1.0/vade-linux-musl-v0.1.0.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/v0.1.0/vade.exe"'
|
||||
|
||||
# - '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-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 ./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-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"'
|
||||
|
||||
release:
|
||||
stage: release
|
||||
|
|
Loading…
Reference in New Issue