From 7645f62ee44d04db0c86ca2d2c33d97733655bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Fri, 17 Apr 2020 18:20:52 +0200 Subject: [PATCH 1/3] Set default, workflow, and use rules in CI config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- .gitlab-ci.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7975859ca..16a92a23e 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 -- GitLab From 4b86bd21a0506f49f8cd97c5d0d99effde1913ff Mon Sep 17 00:00:00 2001 From: Vladimir Shushlin Date: Mon, 20 Apr 2020 13:43:14 +0300 Subject: [PATCH 2/3] Remove org tag --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 16a92a23e..3f1a070d4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,8 +18,6 @@ workflow: default: image: golang:1.11 - tags: - - gitlab-org .go-mod-cache: variables: -- GitLab From fe43bf5f3e619fe80c9c92266256607f5a61be4d Mon Sep 17 00:00:00 2001 From: Vladimir Shushlin Date: Mon, 20 Apr 2020 13:48:16 +0300 Subject: [PATCH 3/3] Revert "Remove org tag" This reverts commit 4b86bd21a0506f49f8cd97c5d0d99effde1913ff. --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3f1a070d4..16a92a23e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,6 +18,8 @@ workflow: default: image: golang:1.11 + tags: + - gitlab-org .go-mod-cache: variables: -- GitLab