cloudflare/cloudflared
Publicmirrored from https://github.com/cloudflare/cloudflaredAvailable
.ci/commons.gitlab-ci.yml
45lines · modecode
| 1 | ## A set of predefined rules to use on the different jobs |
| 2 | .default-rules: |
| 3 | # Rules to run the job only on the master branch |
| 4 | run-on-master: |
| 5 | - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH |
| 6 | when: on_success |
| 7 | - when: never |
| 8 | # Rules to run the job only on merge requests |
| 9 | run-on-mr: |
| 10 | - if: $CI_COMMIT_TAG |
| 11 | when: never |
| 12 | - if: $CI_PIPELINE_SOURCE == "merge_request_event" |
| 13 | when: on_success |
| 14 | - when: never |
| 15 | # Rules to run the job on merge_requests and master branch |
| 16 | run-always: |
| 17 | - if: $CI_COMMIT_TAG |
| 18 | when: never |
| 19 | - if: $CI_PIPELINE_SOURCE == "merge_request_event" |
| 20 | - if: $CI_COMMIT_BRANCH != null && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH |
| 21 | when: on_success |
| 22 | - when: never |
| 23 | # Rules to run the job only when a release happens |
| 24 | run-on-release: |
| 25 | - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH |
| 26 | changes: |
| 27 | - 'RELEASE_NOTES' |
| 28 | when: on_success |
| 29 | - when: never |
| 30 | |
| 31 | .component-tests: |
| 32 | image: $BUILD_IMAGE |
| 33 | rules: |
| 34 | - !reference [.default-rules, run-always] |
| 35 | variables: |
| 36 | COMPONENT_TESTS_CONFIG: component-test-config.yaml |
| 37 | COMPONENT_TESTS_CONFIG_CONTENT: Y2xvdWRmbGFyZWRfYmluYXJ5OiBjbG91ZGZsYXJlZC5leGUKY3JlZGVudGlhbHNfZmlsZTogY3JlZC5qc29uCm9yaWdpbmNlcnQ6IGNlcnQucGVtCnpvbmVfZG9tYWluOiBhcmdvdHVubmVsdGVzdC5jb20Kem9uZV90YWc6IDQ4Nzk2ZjFlNzBiYjc2NjljMjliYjUxYmEyODJiZjY1 |
| 38 | secrets: |
| 39 | DNS_API_TOKEN: |
| 40 | vault: gitlab/cloudflare/tun/cloudflared/_dev/_terraform_atlantis/component_tests_token/data@kv |
| 41 | file: false |
| 42 | COMPONENT_TESTS_ORIGINCERT: |
| 43 | vault: gitlab/cloudflare/tun/cloudflared/_dev/component_tests_cert_pem/data@kv |
| 44 | file: false |
| 45 | cache: {} |
| 46 | |