diff options
author | Alessio Caiazza <acaiazza@gitlab.com> | 2020-04-21 16:14:18 +0300 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2020-04-21 16:14:18 +0300 |
commit | ef580296e32c973655791371443175d1aa3c8f9d (patch) | |
tree | 1837e84019e1779a108ec9fe775a1b3eb3704f71 | |
parent | b372a89c7f446d839094923c906a4925eaf2edf4 (diff) | |
parent | 8ac5ef27814745b50dd704db3de112d1b847e46d (diff) |
Merge branch 'add-default-workflow-and-rules' into 'master'
Set default, workflow, and use rules in CI config
See merge request gitlab-org/gitlab-pages!266
-rw-r--r-- | .gitlab-ci.yml | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7975859c..3b166537 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,12 +3,27 @@ include: - template: Security/SAST.gitlab-ci.yml - template: Security/Dependency-Scanning.gitlab-ci.yml -image: golang:1.11 - stages: - prepare - test +workflow: + rules: + # For merge requests, create a pipeline. + - if: '$CI_MERGE_REQUEST_IID' + # For `master` branch, create a pipeline (this includes on schedules, pushes, merges, etc.). + - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' + # For tags, create a pipeline. + - if: '$CI_COMMIT_TAG' + # For stable, and security branches, create a pipeline. + - if: '$CI_COMMIT_BRANCH =~ /^[\d-]+-stable(-ee)?$/' + - if: '$CI_COMMIT_BRANCH =~ /^security\//' + +default: + image: golang:1.11 + tags: + - gitlab-org + .go-mod-cache: variables: GOPATH: $CI_PROJECT_DIR/.GOPATH @@ -21,6 +36,8 @@ stages: .tests: extends: .go-mod-cache stage: test + tags: + - gitlab-org-docker needs: ['download deps'] script: - echo "Running all tests without daemonizing..." @@ -83,6 +100,8 @@ test:1.14: race: extends: .go-mod-cache stage: test + tags: + - gitlab-org-docker needs: ['download deps'] script: - echo "Running race detector" |