pipeline-upload.sh 837 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/env bash
  2. #
  3. # This script is used to upload the full buildkite pipeline. The steps defined
  4. # in the buildkite UI should simply be:
  5. #
  6. # steps:
  7. # - command: ".buildkite/pipeline-upload.sh"
  8. #
  9. set -e
  10. cd "$(dirname "$0")"/..
  11. source ci/_
  12. if [[ $BUILDKITE_BRANCH == gh-readonly-queue* ]]; then
  13. # github merge queue
  14. cat <<EOF | tee /dev/tty | buildkite-agent pipeline upload
  15. priority: 10
  16. steps:
  17. - name: "sanity"
  18. command: "ci/docker-run-default-image.sh ci/test-sanity.sh"
  19. timeout_in_minutes: 5
  20. agents:
  21. queue: "check"
  22. - name: "checks"
  23. command: "ci/docker-run-default-image.sh ci/test-checks.sh"
  24. timeout_in_minutes: 30
  25. agents:
  26. queue: "check"
  27. EOF
  28. else
  29. _ ci/buildkite-pipeline.sh pipeline.yml
  30. echo +++ pipeline
  31. cat pipeline.yml
  32. _ buildkite-agent pipeline upload pipeline.yml
  33. fi