Updated ci
This commit is contained in:
parent
6c29894deb
commit
8e332f6f5e
|
@ -15,7 +15,18 @@ test:
|
|||
- apt-get -y install libssl-dev pkg-config
|
||||
- cargo test
|
||||
|
||||
build:ui:
|
||||
image: node:latest
|
||||
script:
|
||||
- npm install
|
||||
- npm build
|
||||
artifacts:
|
||||
paths:
|
||||
- dist/
|
||||
|
||||
build:bin:
|
||||
dependencies:
|
||||
- build:ui
|
||||
variables:
|
||||
RUSTC_WRAPPER: /usr/local/bin/sccache
|
||||
SCCACHE_BUCKET: $SCCACHE_BUCKET
|
||||
|
@ -28,13 +39,11 @@ build:bin:
|
|||
- linux
|
||||
script:
|
||||
- apt-get update
|
||||
- apt-get -y install nodejs npm libssl-dev pkg-config wget
|
||||
- apt-get -y install libssl-dev pkg-config wget
|
||||
- wget https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-x86_64-unknown-linux-musl.tar.gz
|
||||
- tar xzf sccache-v0.2.15-x86_64-unknown-linux-musl.tar.gz
|
||||
- mv sccache-v0.2.15-x86_64-unknown-linux-musl/sccache /usr/local/bin/sccache
|
||||
- chmod +x /usr/local/bin/sccache
|
||||
- npm install
|
||||
- npm run build
|
||||
- cargo build --release
|
||||
- tar -czf ./vade-linux-x64.tar.gz -C target/release .
|
||||
artifacts:
|
||||
|
@ -42,17 +51,23 @@ build:bin:
|
|||
- target/release/vade
|
||||
|
||||
build:docker:
|
||||
dependencies:
|
||||
- build:bin
|
||||
image: docker:19.03.12
|
||||
services:
|
||||
- docker:19.03.12-dind
|
||||
stage: build
|
||||
script:
|
||||
- cd target/release
|
||||
- docker build -t registry.5sigma.io/vade/vade .
|
||||
- docker push registry.5sigma.io/vade/vade
|
||||
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
- docker build -t $CI_REGISTRY/vade/vade .
|
||||
- docker push $CI_REGISTRY/vade/vade
|
||||
# rules:
|
||||
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
|
||||
deploy:binaries:
|
||||
dependencies:
|
||||
- build:bin
|
||||
image: curlimages/curl:latest
|
||||
stage: deploy
|
||||
rules:
|
||||
|
|
Loading…
Reference in New Issue