From 24b6698cc9ceb43941bb5a5e0c54ac20f7b0bb16 Mon Sep 17 00:00:00 2001 From: Maxime Guyot Date: Thu, 2 May 2019 13:20:20 -0600 Subject: [PATCH] Disable CI deploys on master (#4690) --- .gitlab-ci/gce.yml | 54 +++++++++++----------------------------- .gitlab-ci/packet.yml | 29 +++------------------ .gitlab-ci/terraform.yml | 3 ++- 3 files changed, 21 insertions(+), 65 deletions(-) diff --git a/.gitlab-ci/gce.yml b/.gitlab-ci/gce.yml index 0c7c4e70a..9268b211d 100644 --- a/.gitlab-ci/gce.yml +++ b/.gitlab-ci/gce.yml @@ -20,6 +20,8 @@ <<: *gce_variables tags: - gce + except: ['triggers'] + only: [/^pr-.*$/] .centos_weave_kubeadm_variables: ¢os_weave_kubeadm_variables # stage: deploy-part1 @@ -36,8 +38,6 @@ gce_ubuntu18-flannel-aio: stage: deploy-part1 <<: *gce when: manual - except: ['triggers'] - only: [/^pr-.*$/] ### PR JOBS PART2 @@ -45,15 +45,11 @@ gce_coreos-calico-aio: stage: deploy-gce <<: *gce when: on_success - except: ['triggers'] - only: [/^pr-.*$/] gce_centos7-flannel-addons: stage: deploy-gce <<: *gce when: manual - except: ['triggers'] - only: [/^pr-.*$/] ### MANUAL JOBS @@ -64,36 +60,42 @@ gce_centos-weave-kubeadm-sep: <<: *centos_weave_kubeadm_variables when: on_success only: ['triggers'] + except: [] gce_ubuntu-weave-sep: stage: deploy-gce <<: *gce when: manual only: ['triggers'] + except: [] gce_coreos-calico-sep-triggers: stage: deploy-gce <<: *gce when: on_success only: ['triggers'] + except: [] gce_ubuntu-canal-ha-triggers: stage: deploy-special <<: *gce when: on_success only: ['triggers'] + except: [] gce_centos7-flannel-addons-triggers: stage: deploy-gce <<: *gce when: on_success only: ['triggers'] + except: [] gce_ubuntu-weave-sep-triggers: stage: deploy-gce <<: *gce when: on_success only: ['triggers'] + except: [] # More builds for PRs/merges (manual) and triggers (auto) @@ -102,27 +104,23 @@ gce_ubuntu-canal-ha: stage: deploy-special <<: *gce when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] gce_ubuntu-canal-kubeadm: stage: deploy-gce <<: *gce when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] gce_ubuntu-canal-kubeadm-triggers: stage: deploy-gce <<: *gce when: on_success only: ['triggers'] + except: [] gce_ubuntu-flannel-ha: stage: deploy-gce <<: *gce when: manual - except: ['triggers'] gce_centos-weave-kubeadm-triggers: stage: deploy-gce @@ -131,99 +129,87 @@ gce_centos-weave-kubeadm-triggers: <<: *centos_weave_kubeadm_variables when: on_success only: ['triggers'] + except: [] gce_ubuntu-contiv-sep: stage: deploy-special <<: *gce when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] gce_coreos-cilium: stage: deploy-special <<: *gce when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] gce_ubuntu18-cilium-sep: stage: deploy-special <<: *gce when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] gce_rhel7-weave: stage: deploy-gce <<: *gce when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] gce_rhel7-weave-triggers: stage: deploy-gce <<: *gce when: on_success only: ['triggers'] + except: [] gce_debian9-calico-upgrade: stage: deploy-gce <<: *gce when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] gce_debian9-calico-triggers: stage: deploy-gce <<: *gce when: on_success only: ['triggers'] + except: [] gce_coreos-canal: stage: deploy-gce <<: *gce when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] gce_coreos-canal-triggers: stage: deploy-gce <<: *gce when: on_success only: ['triggers'] + except: [] gce_rhel7-canal-sep: stage: deploy-special <<: *gce when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] gce_rhel7-canal-sep-triggers: stage: deploy-gce <<: *gce when: on_success only: ['triggers'] + except: [] gce_centos7-calico-ha: stage: deploy-special <<: *gce when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] gce_centos7-calico-ha-triggers: stage: deploy-gce <<: *gce when: on_success only: ['triggers'] + except: [] gce_centos7-kube-router: stage: deploy-special <<: *gce when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] gce_centos7-multus-calico: stage: deploy-gce @@ -231,34 +217,24 @@ gce_centos7-multus-calico: variables: <<: *centos7_multus_calico_variables when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] gce_opensuse-canal: stage: deploy-gce <<: *gce when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] # no triggers yet https://github.com/kubernetes-incubator/kargo/issues/613 gce_coreos-alpha-weave-ha: stage: deploy-special <<: *gce when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] gce_coreos-kube-router: stage: deploy-special <<: *gce when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] gce_ubuntu-kube-router-sep: stage: deploy-special <<: *gce when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] diff --git a/.gitlab-ci/packet.yml b/.gitlab-ci/packet.yml index b7ed64a46..779b92ab0 100644 --- a/.gitlab-ci/packet.yml +++ b/.gitlab-ci/packet.yml @@ -9,6 +9,8 @@ <<: *packet_variables tags: - packet + only: [/^pr-.*$/] + except: ['triggers'] .test-upgrade: &test-upgrade variables: @@ -18,8 +20,6 @@ packet_ubuntu18-calico-aio: stage: deploy-part1 <<: *packet when: on_success - except: ['triggers'] - only: ['master', /^pr-.*$/] # ### PR JOBS PART2 @@ -27,8 +27,6 @@ packet_centos7-flannel-addons: stage: deploy-part2 <<: *packet when: on_success - except: ['triggers'] - only: [/^pr-.*$/] # ### MANUAL JOBS @@ -37,12 +35,14 @@ packet_centos-weave-kubeadm-sep: <<: *packet when: on_success only: ['triggers'] + except: [] packet_ubuntu-weave-sep: stage: deploy-part2 <<: *packet when: manual only: ['triggers'] + except: [] # # More builds for PRs/merges (manual) and triggers (auto) @@ -50,74 +50,53 @@ packet_ubuntu-canal-ha: stage: deploy-special <<: *packet when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] packet_ubuntu-canal-kubeadm: stage: deploy-part2 <<: *packet when: on_success - except: ['triggers'] - only: ['master', /^pr-.*$/] packet_ubuntu-flannel-ha: stage: deploy-part2 <<: *packet when: on_success - except: ['triggers'] packet_ubuntu-contiv-sep: stage: deploy-special <<: *packet when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] packet_ubuntu18-cilium-sep: stage: deploy-special <<: *packet when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] packet_debian9-calico-upgrade: stage: deploy-part2 <<: *packet when: on_success - except: ['triggers'] - only: ['master', /^pr-.*$/] packet_centos7-calico-ha: stage: deploy-part2 <<: *packet when: on_success - except: ['triggers'] - only: ['master', /^pr-.*$/] packet_centos7-kube-router: stage: deploy-special <<: *packet when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] packet_centos7-multus-calico: stage: deploy-part2 <<: *packet when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] packet_opensuse-canal: stage: deploy-part2 <<: *packet when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] packet_ubuntu-kube-router-sep: stage: deploy-special <<: *packet when: manual - except: ['triggers'] - only: ['master', /^pr-.*$/] diff --git a/.gitlab-ci/terraform.yml b/.gitlab-ci/terraform.yml index 1e45bd216..a8df14ea4 100644 --- a/.gitlab-ci/terraform.yml +++ b/.gitlab-ci/terraform.yml @@ -20,11 +20,11 @@ - echo "$PACKET_PRIVATE_KEY" | base64 -d > ~/.ssh/id_rsa - chmod 400 ~/.ssh/id_rsa - echo "$PACKET_PUBLIC_KEY" | base64 -d > ~/.ssh/id_rsa.pub - only: ['master', /^pr-.*$/] .terraform_validate: extends: .terraform_install stage: unit-tests + only: ['master', /^pr-.*$/] script: - terraform validate -var-file=cluster.tf ../../contrib/terraform/$PROVIDER - terraform fmt -check -diff ../../contrib/terraform/$PROVIDER @@ -33,6 +33,7 @@ extends: .terraform_install stage: deploy-part2 when: manual + only: [/^pr-.*$/] variables: ANSIBLE_INVENTORY_UNPARSED_FAILED: "true" script: