diff options
author | Rémy Coutable <remy@rymai.me> | 2020-04-17 19:20:52 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2020-04-17 19:20:52 +0300 |
commit | 7645f62ee44d04db0c86ca2d2c33d97733655bb9 (patch) | |
tree | f9658c582c3ef35f2c64452e7541850f9cadc882 | |
parent | b372a89c7f446d839094923c906a4925eaf2edf4 (diff) |
Set default, workflow, and use rules in CI config
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r-- | .gitlab-ci.yml | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7975859c..16a92a23 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,12 +3,24 @@ 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 == "master"' + # For tags, create a pipeline. + - if: '$CI_COMMIT_TAG' + +default: + image: golang:1.11 + tags: + - gitlab-org + .go-mod-cache: variables: GOPATH: $CI_PROJECT_DIR/.GOPATH |