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.

50 lines
1016 B

  1. stages:
  2. - test
  3. - build
  4. - deploy
  5. tests:
  6. image: rust:1.28.0-jessie
  7. stage: test
  8. script:
  9. - cargo test
  10. tags:
  11. - docker
  12. debug:
  13. image: rust:1.28.0-jessie
  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.28.0-jessie
  25. stage: build
  26. script:
  27. - cargo build --release
  28. - strip target/release/rsddns
  29. artifacts:
  30. expire_in: 7 days
  31. paths:
  32. - target/release/rsddns
  33. tags:
  34. - docker
  35. only:
  36. - master
  37. deploy:release:
  38. stage: deploy
  39. script:
  40. - cat Cargo.toml | grep "version =" | awk '{split($0,a,"="); gsub(/ |"/, "", a[2]); print a[2]}' > VERSION
  41. - curl -v -u "$DEPLOYMENT_CREDENTIALS" --upload-file "target/release/rsddns" "$NEXUS_RELEASE_URL/com/sothr/rsddns/$(head -1 ./VERSION)/rsddns"
  42. - curl -v -u "$DEPLOYMENT_CREDENTIALS" --upload-file "VERSION" "$NEXUS_RELEASE_URL/com/sothr/rsddns/latest"
  43. dependencies:
  44. - release
  45. tags:
  46. - linux