|
@ -1,6 +1,7 @@ |
|
|
stages: |
|
|
stages: |
|
|
- test |
|
|
- test |
|
|
- build |
|
|
- build |
|
|
|
|
|
- deploy |
|
|
|
|
|
|
|
|
tests: |
|
|
tests: |
|
|
image: rust:1.28.0-jessie |
|
|
image: rust:1.28.0-jessie |
|
@ -16,6 +17,7 @@ debug: |
|
|
script: |
|
|
script: |
|
|
- cargo build |
|
|
- cargo build |
|
|
artifacts: |
|
|
artifacts: |
|
|
|
|
|
expire_in: 7 days |
|
|
paths: |
|
|
paths: |
|
|
- target/debug/rsddns |
|
|
- target/debug/rsddns |
|
|
tags: |
|
|
tags: |
|
@ -28,7 +30,21 @@ release: |
|
|
- cargo build --release |
|
|
- cargo build --release |
|
|
- strip target/release/rsddns |
|
|
- strip target/release/rsddns |
|
|
artifacts: |
|
|
artifacts: |
|
|
|
|
|
expire_in: 7 days |
|
|
paths: |
|
|
paths: |
|
|
- target/release/rsddns |
|
|
- target/release/rsddns |
|
|
tags: |
|
|
tags: |
|
|
- docker |
|
|
- docker |
|
|
|
|
|
only: |
|
|
|
|
|
- master |
|
|
|
|
|
|
|
|
|
|
|
deploy:release: |
|
|
|
|
|
stage: deploy |
|
|
|
|
|
script: |
|
|
|
|
|
- cat Cargo.toml | grep "version =" | awk '{split($0,a,"="); gsub(/ |"/, "", a[2]); print a[2]}' > VERSION |
|
|
|
|
|
- curl -v -u "$DEPLOYMENT_CREDENTIALS" --upload-file "target/release/rsddns" "$NEXUS_RELEASE_URL/com/sothr/rsddns/$(head -1 ./VERSION)/rsddns" |
|
|
|
|
|
- curl -v -u "$DEPLOYMENT_CREDENTIALS" --upload-file "VERSION" "$NEXUS_RELEASE_URL/com/sothr/rsddns/latest" |
|
|
|
|
|
dependencies: |
|
|
|
|
|
- release |
|
|
|
|
|
tags: |
|
|
|
|
|
- linux |