From 046f3eebcbe7b5bf852dc045e0b360db7bca1123 Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Fri, 16 Dec 2016 16:03:22 +0100 Subject: [PATCH] Rework Gitlab pipeline stages for PRs/merges Run 1 of each part1/2/special for Gitlab CI only for PRs Remaining 2/3 of each stage are manual steps for master only (merges) Signed-off-by: Bogdan Dobrelya --- .gitlab-ci.yml | 32 ++++++++++++++++---------------- docs/test_cases.md | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ef60e447e..ac5e63394 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -129,7 +129,7 @@ before_script: -e inventory_path=${PWD}/inventory/inventory.ini -e cloud_region=${CLOUD_REGION} -coreos-calico: +coreos-calico-sep: stage: deploy-gce-part1 <<: *job <<: *gce @@ -141,9 +141,9 @@ coreos-calico: CLUSTER_MODE: separated BOOTSTRAP_OS: coreos when: on_success - #only: [/^pr-.*$/] + only: [/^pr-.*$/] -debian8-canal: +debian8-canal-ha: stage: deploy-gce-part1 <<: *job <<: *gce @@ -154,7 +154,7 @@ debian8-canal: CLOUD_REGION: us-east1-b CLUSTER_MODE: ha when: manual - #only: [/^pr-.*$/] + only: ['master', /^pr-.*$/] rhel7-weave: stage: deploy-gce-part1 @@ -167,7 +167,7 @@ rhel7-weave: CLOUD_REGION: europe-west1-b CLUSTER_MODE: default when: manual - #only: [/^pr-.*$/] + only: ['master', /^pr-.*$/] centos7-flannel: stage: deploy-gce-part2 @@ -179,8 +179,8 @@ centos7-flannel: CLOUD_IMAGE: centos-7 CLOUD_REGION: us-west1-a CLUSTER_MODE: default - when: manual - only: ['master'] + when: on_success + only: [/^pr-.*$/] debian8-calico: stage: deploy-gce-part2 @@ -193,7 +193,7 @@ debian8-calico: CLOUD_REGION: us-central1-b CLUSTER_MODE: default when: manual - only: ['master'] + only: ['master', /^pr-.*$/] coreos-canal: stage: deploy-gce-part2 @@ -207,9 +207,9 @@ coreos-canal: CLUSTER_MODE: default BOOTSTRAP_OS: coreos when: manual - only: ['master'] + only: ['master', /^pr-.*$/] -rhel7-canal: +rhel7-canal-sep: stage: deploy-gce-special <<: *job <<: *gce @@ -220,9 +220,9 @@ rhel7-canal: CLOUD_REGION: us-east1-b CLUSTER_MODE: separated when: manual - only: ['master'] + only: ['master', /^pr-.*$/] -ubuntu-weave: +ubuntu-weave-sep: stage: deploy-gce-special <<: *job <<: *gce @@ -232,10 +232,10 @@ ubuntu-weave: CLOUD_IMAGE: ubuntu-1604-xenial CLOUD_REGION: us-central1-b CLUSTER_MODE: separated - when: manual - only: ['master'] + when: on_success + only: [/^pr-.*$/] -centos7-calico: +centos7-calico-ha: stage: deploy-gce-special <<: *job <<: *gce @@ -246,7 +246,7 @@ centos7-calico: CLOUD_REGION: europe-west1-b CLUSTER_MODE: ha when: manual - only: ['master'] + only: ['master', /^pr-.*$/] syntax-check: <<: *job diff --git a/docs/test_cases.md b/docs/test_cases.md index 11e4db6aa..8b6dbea21 100644 --- a/docs/test_cases.md +++ b/docs/test_cases.md @@ -43,11 +43,11 @@ GCE instances | part1| calico| coreos-stable| us-west1-b| separated| on_success| | part1| canal|debian-8-kubespray| us-east1-b| ha| manual| | part1| weave| rhel-7| europe-west1-b| default| manual| -| part2| flannel| centos-7| us-west1-a| default| manual| +| part2| flannel| centos-7| us-west1-a| default| on_success| | part2| calico|debian-8-kubespray| us-central1-b| default| manual| | part2| canal| coreos-stable| us-east1-b| default| manual| | special| canal| rhel-7| us-east1-b| separated| manual| -| special| weave|ubuntu-1604-xenial| us-central1-b| separated| manual| +| special| weave|ubuntu-1604-xenial| us-central1-b| separated| on_success| | special| calico| centos-7| europe-west1-b| ha| manual| The "Stage" means a build step of the build pipeline. The steps are ordered as `part1->part2->special`.