From 0eab5b030c59b569af9a339b1ec372bf2295cd22 Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Wed, 21 Dec 2016 15:31:15 +0100 Subject: [PATCH] Revert "Add gitlab CI auto builds for triggers" --- .gitlab-ci.yml | 210 +++++++++++------------------------------- docs/test_cases.md | 23 ++--- scripts/gen_matrix.sh | 10 +- 3 files changed, 69 insertions(+), 174 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 94d0ed2b9..86793ee38 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,6 +47,7 @@ before_script: GS_ACCESS_KEY_ID: $GS_KEY GS_SECRET_ACCESS_KEY: $GS_SECRET ANSIBLE_KEEP_REMOTE_FILES: "1" + CLUSTER_MODE: default BOOTSTRAP_OS: none LOG_LEVEL: "-vv" @@ -128,127 +129,33 @@ before_script: -e inventory_path=${PWD}/inventory/inventory.ini -e cloud_region=${CLOUD_REGION} -# Test matrix. Leave the comments for markup scripts. -.coreos_calico_sep_variables: &coreos_calico_sep_variables -# stage: deploy-gce-part1 - KUBE_NETWORK_PLUGIN: calico - CLOUD_IMAGE: coreos-stable - CLOUD_REGION: us-west1-b - CLUSTER_MODE: separated - BOOTSTRAP_OS: coreos - -.debian8_canal_ha_variables: &debian8_canal_ha_variables -# stage: deploy-gce-part1 - KUBE_NETWORK_PLUGIN: canal - CLOUD_IMAGE: debian-8-kubespray - CLOUD_REGION: us-east1-b - CLUSTER_MODE: ha - -.rhel7_weave_variables: &rhel7_weave_variables -# stage: deploy-gce-part1 - KUBE_NETWORK_PLUGIN: weave - CLOUD_IMAGE: rhel-7 - CLOUD_REGION: europe-west1-b - CLUSTER_MODE: default - -.centos7_flannel_variables: ¢os7_flannel_variables -# stage: deploy-gce-part2 - KUBE_NETWORK_PLUGIN: flannel - CLOUD_IMAGE: centos-7 - CLOUD_REGION: us-west1-a - CLUSTER_MODE: default - -.debian8_calico_variables: &debian8_calico_variables -# stage: deploy-gce-part2 - KUBE_NETWORK_PLUGIN: calico - CLOUD_IMAGE: debian-8-kubespray - CLOUD_REGION: us-central1-b - CLUSTER_MODE: default - -.coreos_canal_variables: &coreos_canal_variables -# stage: deploy-gce-part2 - KUBE_NETWORK_PLUGIN: canal - CLOUD_IMAGE: coreos-stable - CLOUD_REGION: us-east1-b - CLUSTER_MODE: default - BOOTSTRAP_OS: coreos - -.rhel7_canal_sep_variables: &rhel7_canal_sep_variables -# stage: deploy-gce-special - KUBE_NETWORK_PLUGIN: canal - CLOUD_IMAGE: rhel-7 - CLOUD_REGION: us-east1-b - CLUSTER_MODE: separated - -.ubuntu_weave_sep_variables: &ubuntu_weave_sep_variables -# stage: deploy-gce-special - KUBE_NETWORK_PLUGIN: weave - CLOUD_IMAGE: ubuntu-1604-xenial - CLOUD_REGION: us-central1-b - CLUSTER_MODE: separated - -.centos7_calico_ha_variables: ¢os7_calico_ha_variables -# stage: deploy-gce-special - KUBE_NETWORK_PLUGIN: calico - CLOUD_IMAGE: centos-7 - CLOUD_REGION: europe-west1-b - CLUSTER_MODE: ha - -# Builds for PRs only (auto) coreos-calico-sep: stage: deploy-gce-part1 <<: *job <<: *gce variables: <<: *gce_variables - <<: *coreos_calico_sep_variables + KUBE_NETWORK_PLUGIN: calico + CLOUD_IMAGE: coreos-stable + CLOUD_REGION: us-west1-b + CLUSTER_MODE: separated + BOOTSTRAP_OS: coreos when: on_success except: ['triggers'] only: [/^pr-.*$/] -centos7-flannel: - stage: deploy-gce-part2 - <<: *job - <<: *gce - variables: - <<: *gce_variables - <<: *centos7_flannel_variables - when: on_success - except: ['triggers'] - only: [/^pr-.*$/] - -ubuntu-weave-sep: - stage: deploy-gce-special - <<: *job - <<: *gce - variables: - <<: *gce_variables - <<: *ubuntu_weave_sep_variables - when: on_success - except: ['triggers'] - only: [/^pr-.*$/] - -# More builds for PRs/merges (manual) and triggers (auto) debian8-canal-ha: stage: deploy-gce-part1 <<: *job <<: *gce variables: <<: *gce_variables - <<: *debian8_canal_ha_variables + KUBE_NETWORK_PLUGIN: canal + CLOUD_IMAGE: debian-8-kubespray + CLOUD_REGION: us-east1-b + CLUSTER_MODE: ha when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] - -debian8-canal-ha-triggers: - stage: deploy-gce-part1 - <<: *job - <<: *gce - variables: - <<: *gce_variables - <<: *debian8_canal_ha_variables - when: on_success - only: ['triggers'] + only: ['master', /^pr-.*$/, 'triggers'] rhel7-weave: stage: deploy-gce-part1 @@ -256,20 +163,26 @@ rhel7-weave: <<: *gce variables: <<: *gce_variables - <<: *rhel7_weave_variables + KUBE_NETWORK_PLUGIN: weave + CLOUD_IMAGE: rhel-7 + CLOUD_REGION: europe-west1-b + CLUSTER_MODE: default when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] + only: ['master', /^pr-.*$/, 'triggers'] -rhel7-weave-triggers: - stage: deploy-gce-part1 +centos7-flannel: + stage: deploy-gce-part2 <<: *job <<: *gce variables: <<: *gce_variables - <<: *rhel7_weave_variables + KUBE_NETWORK_PLUGIN: flannel + CLOUD_IMAGE: centos-7 + CLOUD_REGION: us-west1-a + CLUSTER_MODE: default when: on_success - only: ['triggers'] + except: ['triggers'] + only: [/^pr-.*$/] debian8-calico: stage: deploy-gce-part2 @@ -277,20 +190,12 @@ debian8-calico: <<: *gce variables: <<: *gce_variables - <<: *debian8_calico_variables + KUBE_NETWORK_PLUGIN: calico + CLOUD_IMAGE: debian-8-kubespray + CLOUD_REGION: us-central1-b + CLUSTER_MODE: default when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] - -debian8-calico-triggers: - stage: deploy-gce-part2 - <<: *job - <<: *gce - variables: - <<: *gce_variables - <<: *debian8_calico_variables - when: on_success - only: ['triggers'] + only: ['master', /^pr-.*$/, 'triggers'] coreos-canal: stage: deploy-gce-part2 @@ -298,20 +203,13 @@ coreos-canal: <<: *gce variables: <<: *gce_variables - <<: *coreos_canal_variables + KUBE_NETWORK_PLUGIN: canal + CLOUD_IMAGE: coreos-stable + CLOUD_REGION: us-east1-b + CLUSTER_MODE: default + BOOTSTRAP_OS: coreos when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] - -coreos-canal-triggers: - stage: deploy-gce-part2 - <<: *job - <<: *gce - variables: - <<: *gce_variables - <<: *coreos_canal_variables - when: on_success - only: ['triggers'] + only: ['master', /^pr-.*$/, 'triggers'] rhel7-canal-sep: stage: deploy-gce-special @@ -319,20 +217,26 @@ rhel7-canal-sep: <<: *gce variables: <<: *gce_variables - <<: *rhel7_canal_sep_variables + KUBE_NETWORK_PLUGIN: canal + CLOUD_IMAGE: rhel-7 + CLOUD_REGION: us-east1-b + CLUSTER_MODE: separated when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/,] + only: ['master', /^pr-.*$/, 'triggers'] -rhel7-canal-sep-triggers: +ubuntu-weave-sep: stage: deploy-gce-special <<: *job <<: *gce variables: <<: *gce_variables - <<: *rhel7_canal_sep_variables + KUBE_NETWORK_PLUGIN: weave + CLOUD_IMAGE: ubuntu-1604-xenial + CLOUD_REGION: us-central1-b + CLUSTER_MODE: separated when: on_success - only: ['triggers'] + except: ['triggers'] + only: [/^pr-.*$/] centos7-calico-ha: stage: deploy-gce-special @@ -340,22 +244,12 @@ centos7-calico-ha: <<: *gce variables: <<: *gce_variables - <<: *centos7_calico_ha_variables + KUBE_NETWORK_PLUGIN: calico + CLOUD_IMAGE: centos-7 + CLOUD_REGION: europe-west1-b + CLUSTER_MODE: ha when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] - -centos7-calico-ha-triggers: - stage: deploy-gce-special - <<: *job - <<: *gce - variables: - <<: *gce_variables - <<: *centos7_calico_ha_variables - when: on_success - only: ['triggers'] - -#TODO(bogdando) add coreos-weave and *triggers + only: ['master', /^pr-.*$/, 'triggers'] syntax-check: <<: *job diff --git a/docs/test_cases.md b/docs/test_cases.md index 52175418c..8b6dbea21 100644 --- a/docs/test_cases.md +++ b/docs/test_cases.md @@ -38,16 +38,17 @@ Gitlab CI test matrix GCE instances ------------- -| Stage| Network plugin| OS type| GCE region| Nodes layout -|--------------------|--------------------|--------------------|--------------------|--------------------| -| part1| calico| coreos-stable| us-west1-b| separated| -| part1| canal| debian-8-kubespray| us-east1-b| ha| -| part1| weave| rhel-7| europe-west1-b| default| -| part2| flannel| centos-7| us-west1-a| default| -| part2| calico| debian-8-kubespray| us-central1-b| default| -| part2| canal| coreos-stable| us-east1-b| default| -| special| canal| rhel-7| us-east1-b| separated| -| special| weave| ubuntu-1604-xenial| us-central1-b| separated| -| special| calico| centos-7| europe-west1-b| ha| +| Stage| Network plugin| OS type| GCE region| Nodes layout| When| +|------------------|------------------|------------------|------------------|------------------|------------------| +| 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| 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| 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`. +The "When" stands for the build step trigger condition. diff --git a/scripts/gen_matrix.sh b/scripts/gen_matrix.sh index 93f2d0026..c3d9f588a 100644 --- a/scripts/gen_matrix.sh +++ b/scripts/gen_matrix.sh @@ -12,13 +12,13 @@ for i in `echo $a`; do done echo -a=$(perl -ne '/^#\sstage:\sdeploy-gce-(\S+)$/ && print "$1\n";/^\s{2}(CLOUD_IMAGE|KUBE_NETWORK_PLUGIN|CLOUD_REGION|CLUSTER_MODE):\s(\S+)$/ && print "$2\n"' .gitlab-ci.yml) +a=$(perl -ne '/^\s{2}(stage:\sdeploy-gce-|when:\s)(\S+)$/ && print "$2\n";/^\s{4}(CLOUD_IMAGE|KUBE_NETWORK_PLUGIN|CLOUD_REGION|CLUSTER_MODE):\s(\S+)$/ && print "$2\n"' .gitlab-ci.yml) echo Gitlab-CI -printf "|%20s|%20s|%20s|%20s|%20s\n" "Stage" "Network plugin" "OS type" "GCE region" "Nodes layout" -echo "|--------------------|--------------------|--------------------|--------------------|--------------------|" +printf "|%18s|%18s|%18s|%18s|%18s|%18s|\n" "Stage" "Network plugin" "OS type" "GCE region" "Nodes layout" "When" +echo "|------------------|------------------|------------------|------------------|------------------|------------------|" c=0 for i in `echo $a`; do - printf "|%20s" $i - [ $(($c % 5)) -eq 4 ] && printf "|\n" + printf "|%18s" $i + [ $(($c % 6)) -eq 5 ] && printf "|\n" c=$(( c + 1)) done