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

  1. stages:
  2. - test
  3. - build
  4. - deploy
  5. tests:
  6. image: rust:1.30-stretch
  7. stage: test
  8. script:
  9. - cargo test
  10. tags:
  11. - docker
  12. debug:
  13. image: rust:1.30-stretch
  14. stage: build
  15. script:
  16. - cargo build
  17. artifacts:
  18. expire_in: 7 days
  19. paths:
  20. - target/debug/rsddns
  21. tags:
  22. - docker
  23. release:
  24. image: rust:1.30-stretch
  25. stage: build
  26. script:
  27. - cargo build --release
  28. - cd target/release
  29. - strip rsddns
  30. - md5sum rsddns > rsddns.md5
  31. - sha1sum rsddns > rsddns.sha1
  32. artifacts:
  33. expire_in: 7 days
  34. paths:
  35. - target/release/rsddns
  36. - target/release/rsddns.md5
  37. - target/release/rsddns.sha1
  38. tags:
  39. - docker
  40. only:
  41. - master
  42. deploy:release:
  43. stage: deploy
  44. script:
  45. - cat Cargo.toml | grep "version =" | awk '{split($0,a,"="); gsub(/ |"/, "", a[2]); print a[2]}' > VERSION
  46. - curl -v -u "$DEPLOYMENT_CREDENTIALS" --upload-file "target/release/rsddns" "$NEXUS_RELEASE_URL/com/sothr/rsddns/$(head -1 ./VERSION)/rsddns"
  47. - curl -v -u "$DEPLOYMENT_CREDENTIALS" --upload-file "target/release/rsddns.md5" "$NEXUS_RELEASE_URL/com/sothr/rsddns/$(head -1 ./VERSION)/rsddns.md5"
  48. - curl -v -u "$DEPLOYMENT_CREDENTIALS" --upload-file "target/release/rsddns.sha1" "$NEXUS_RELEASE_URL/com/sothr/rsddns/$(head -1 ./VERSION)/rsddns.sha1"
  49. - curl -v -u "$DEPLOYMENT_CREDENTIALS" --upload-file "VERSION" "$NEXUS_RELEASE_URL/com/sothr/rsddns/latest"
  50. dependencies:
  51. - release
  52. tags:
  53. - linux