A cloudflare backed DDNS service written in Rust
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.4 KiB

stages:
- test
- build
- deploy
tests:
image: rust:1.30-stretch
stage: test
script:
- cargo test
tags:
- docker
debug:
image: rust:1.30-stretch
stage: build
script:
- cargo build
artifacts:
expire_in: 7 days
paths:
- target/debug/rsddns
tags:
- docker
release:
image: rust:1.30-stretch
stage: build
script:
- cargo build --release
- cd target/release
- strip rsddns
- md5sum rsddns > rsddns.md5
- sha1sum rsddns > rsddns.sha1
artifacts:
expire_in: 7 days
paths:
- target/release/rsddns
- target/release/rsddns.md5
- target/release/rsddns.sha1
tags:
- 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 "target/release/rsddns.md5" "$NEXUS_RELEASE_URL/com/sothr/rsddns/$(head -1 ./VERSION)/rsddns.md5"
- curl -v -u "$DEPLOYMENT_CREDENTIALS" --upload-file "target/release/rsddns.sha1" "$NEXUS_RELEASE_URL/com/sothr/rsddns/$(head -1 ./VERSION)/rsddns.sha1"
- curl -v -u "$DEPLOYMENT_CREDENTIALS" --upload-file "VERSION" "$NEXUS_RELEASE_URL/com/sothr/rsddns/latest"
dependencies:
- release
tags:
- linux