ci: Add needs to all the push jobs

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2022-03-30 11:00:47 +02:00
parent e799b7b20d
commit 0afff95280
No known key found for this signature in database
GPG key ID: 4C514D15D07186F1
3 changed files with 190 additions and 76 deletions

View file

@ -1,4 +1,4 @@
.test_build: &test_build .test_build:
extends: .test extends: .test
script: script:
# Hack to set an array in /bin/sh # Hack to set an array in /bin/sh
@ -7,7 +7,7 @@
- docker pull --quiet "$CI_REGISTRY_IMAGE:$1" || true - docker pull --quiet "$CI_REGISTRY_IMAGE:$1" || true
- docker build --cache-from="$CI_REGISTRY_IMAGE:$1" -f "Dockerfile.$1" . - docker build --cache-from="$CI_REGISTRY_IMAGE:$1" -f "Dockerfile.$1" .
.build_and_deploy: &build_and_deploy .build_and_deploy:
extends: .deploy extends: .deploy
script: script:
# Hack to set an array in /bin/sh # Hack to set an array in /bin/sh
@ -18,95 +18,206 @@
- docker push "$CI_REGISTRY_IMAGE:$1" - docker push "$CI_REGISTRY_IMAGE:$1"
# Used by https://gitlab.com/gitlab-org/charts/auto-deploy-app/-/blob/master/.gitlab-ci.yml # Used by https://gitlab.com/gitlab-org/charts/auto-deploy-app/-/blob/master/.gitlab-ci.yml
alpine-helm test: *test_build alpine-helm test:
extends: .test_build
danger test: *test_build danger test:
danger-ruby-2.6.6 test: *test_build extends: .test_build
gitlab-charts-build-base test: *test_build danger-ruby-2.6.6 test:
gitlab-charts-build-base-helm-3 test: *test_build extends: .test_build
gitlab-helm3.5-kubectl1.17 test: *test_build gitlab-charts-build-base test:
gitlab-qa-ruby-2.7 test: *test_build extends: .test_build
gitlab-qa-ruby-3.0 test: *test_build gitlab-charts-build-base-helm-3 test:
gitlab-qa-alpine-ruby-2.7 test: *test_build extends: .test_build
gitlab-qa-alpine-ruby-3.0 test: *test_build gitlab-helm3.5-kubectl1.17 test:
gitlab-puppeteer test: *test_build extends: .test_build
kaniko test: *test_build gitlab-qa-ruby-2.7 test:
omnibus-gitlab-bionic test: *test_build extends: .test_build
omnibus-gitlab-centos7 test: *test_build gitlab-qa-ruby-3.0 test:
omnibus-gitlab-centos8 test: *test_build extends: .test_build
omnibus-gitlab-jessie test: *test_build gitlab-qa-alpine-ruby-2.7 test:
omnibus-gitlab-opensuse15.1 test: *test_build extends: .test_build
omnibus-gitlab-opensuse15.2 test: *test_build gitlab-qa-alpine-ruby-3.0 test:
omnibus-gitlab-opensuse15.3 test: *test_build extends: .test_build
omnibus-gitlab-stretch test: *test_build gitlab-puppeteer test:
omnibus-gitlab-buster test: *test_build extends: .test_build
omnibus-gitlab-xenial test: *test_build kaniko test:
omnibus-gitlab-focal test: *test_build extends: .test_build
omnibus-gitlab-amazonlinux2 test: *test_build omnibus-gitlab-bionic test:
omnibus-gitlab-depscan test: *test_build extends: .test_build
omnibus-gitlab-cve-search test: *test_build omnibus-gitlab-centos7 test:
extends: .test_build
omnibus-gitlab-centos8 test:
extends: .test_build
omnibus-gitlab-jessie test:
extends: .test_build
omnibus-gitlab-opensuse15.1 test:
extends: .test_build
omnibus-gitlab-opensuse15.2 test:
extends: .test_build
omnibus-gitlab-opensuse15.3 test:
extends: .test_build
omnibus-gitlab-stretch test:
extends: .test_build
omnibus-gitlab-buster test:
extends: .test_build
omnibus-gitlab-xenial test:
extends: .test_build
omnibus-gitlab-focal test:
extends: .test_build
omnibus-gitlab-amazonlinux2 test:
extends: .test_build
omnibus-gitlab-depscan test:
extends: .test_build
omnibus-gitlab-cve-search test:
extends: .test_build
release-tools test: *test_build release-tools test:
triage-ops-ruby-2.7 test: *test_build extends: .test_build
sitespeed-gitlab test: *test_build triage-ops-ruby-2.7 test:
ubi-release test: *test_build extends: .test_build
www-gitlab-com-ruby-3.0-node-16 test: *test_build sitespeed-gitlab test:
build-git: *test_build extends: .test_build
ubi-release test:
extends: .test_build
www-gitlab-com-ruby-3.0-node-16 test:
extends: .test_build
build-git test:
extends: .test_build
# Used by GitLab: https://gitlab.com/gitlab-org/gitlab/-/blob/13-8-stable-ee/lib/gitlab/ci/templates/Terraform.gitlab-ci.yml # Used by GitLab: https://gitlab.com/gitlab-org/gitlab/-/blob/13-8-stable-ee/lib/gitlab/ci/templates/Terraform.gitlab-ci.yml
terraform test: *test_build terraform test:
extends: .test_build
# Used by go projects for linting https://gitlab.com/gitlab-org/gitlab/blob/master/doc/development/go_guide/index.md#automatic-linting # Used by go projects for linting https://gitlab.com/gitlab-org/gitlab/blob/master/doc/development/go_guide/index.md#automatic-linting
golangci-lint-alpine test: *test_build golangci-lint-alpine test:
extends: .test_build
# Used by gitlab-operator: https://gitlab.com/gitlab-org/gl-openshift/gitlab-operator # Used by gitlab-operator: https://gitlab.com/gitlab-org/gl-openshift/gitlab-operator
gitlab-operator-build-base test: *test_build gitlab-operator-build-base test:
extends: .test_build
alpine-bash-jq-curl-git test: *test_build alpine-bash-jq-curl-git test:
extends: .test_build
# Used by frontend related tasks for linting GraphQL # Used by frontend related tasks for linting GraphQL
apollo test: *test_build apollo test:
extends: .test_build
# Used by https://gitlab.com/gitlab-org/charts/auto-deploy-app/-/blob/master/.gitlab-ci.yml # Used by https://gitlab.com/gitlab-org/charts/auto-deploy-app/-/blob/master/.gitlab-ci.yml
alpine-helm push: *build_and_deploy alpine-helm push:
extends: .build_and_deploy
needs: ["alpine-helm test"]
danger push: *build_and_deploy danger push:
danger-ruby-2.6.6 push: *build_and_deploy extends: .build_and_deploy
gitlab-charts-build-base push: *build_and_deploy needs: ["danger test"]
gitlab-charts-build-base-helm-3 push: *build_and_deploy danger-ruby-2.6.6 push:
gitlab-helm3.5-kubectl1.17 push: *build_and_deploy extends: .build_and_deploy
gitlab-qa-ruby-2.7 push: *build_and_deploy needs: ["danger-ruby-2.6.6 test"]
gitlab-qa-ruby-3.0 push: *build_and_deploy gitlab-charts-build-base push:
gitlab-qa-alpine-ruby-2.7 push: *build_and_deploy extends: .build_and_deploy
gitlab-qa-alpine-ruby-3.0 push: *build_and_deploy needs: ["gitlab-charts-build-base test"]
gitlab-puppeteer push: *build_and_deploy gitlab-charts-build-base-helm-3 push:
kaniko push: *build_and_deploy extends: .build_and_deploy
omnibus-gitlab-bionic push: *build_and_deploy needs: ["gitlab-charts-build-base-helm-3 test"]
omnibus-gitlab-centos7 push: *build_and_deploy gitlab-helm3.5-kubectl1.17 push:
omnibus-gitlab-centos8 push: *build_and_deploy extends: .build_and_deploy
omnibus-gitlab-jessie push: *build_and_deploy needs: ["gitlab-helm3.5-kubectl1.17 test"]
omnibus-gitlab-opensuse15.1 push: *build_and_deploy gitlab-qa-ruby-2.7 push:
omnibus-gitlab-opensuse15.2 push: *build_and_deploy extends: .build_and_deploy
omnibus-gitlab-opensuse15.3 push: *build_and_deploy needs: ["gitlab-qa-ruby-2.7 test"]
omnibus-gitlab-stretch push: *build_and_deploy gitlab-qa-ruby-3.0 push:
omnibus-gitlab-buster push: *build_and_deploy extends: .build_and_deploy
omnibus-gitlab-xenial push: *build_and_deploy needs: ["gitlab-qa-ruby-3.0 test"]
omnibus-gitlab-focal push: *build_and_deploy gitlab-qa-alpine-ruby-2.7 push:
omnibus-gitlab-amazonlinux2 push: *build_and_deploy extends: .build_and_deploy
omnibus-gitlab-depscan push: *build_and_deploy needs: ["gitlab-qa-alpine-ruby-2.7 test"]
omnibus-gitlab-cve-search push: *build_and_deploy gitlab-qa-alpine-ruby-3.0 push:
release-tools push: *build_and_deploy extends: .build_and_deploy
triage-ops-ruby-2.7 push: *build_and_deploy needs: ["gitlab-qa-alpine-ruby-3.0 test"]
sitespeed-gitlab push: *build_and_deploy gitlab-puppeteer push:
ubi-release push: *build_and_deploy extends: .build_and_deploy
www-gitlab-com-ruby-3.0-node-16 push: *build_and_deploy needs: ["gitlab-puppeteer test"]
build-git push: *build_and_deploy kaniko push:
extends: .build_and_deploy
needs: ["kaniko test"]
omnibus-gitlab-bionic push:
extends: .build_and_deploy
needs: ["omnibus-gitlab-bionic test"]
omnibus-gitlab-centos7 push:
extends: .build_and_deploy
needs: ["omnibus-gitlab-centos7 test"]
omnibus-gitlab-centos8 push:
extends: .build_and_deploy
needs: ["omnibus-gitlab-centos8 test"]
omnibus-gitlab-jessie push:
extends: .build_and_deploy
needs: ["omnibus-gitlab-jessie test"]
omnibus-gitlab-opensuse15.1 push:
extends: .build_and_deploy
needs: ["omnibus-gitlab-opensuse15.1 test"]
omnibus-gitlab-opensuse15.2 push:
extends: .build_and_deploy
needs: ["omnibus-gitlab-opensuse15.2 test"]
omnibus-gitlab-opensuse15.3 push:
extends: .build_and_deploy
needs: ["omnibus-gitlab-opensuse15.3 test"]
omnibus-gitlab-stretch push:
extends: .build_and_deploy
needs: ["omnibus-gitlab-stretch test"]
omnibus-gitlab-buster push:
extends: .build_and_deploy
needs: ["omnibus-gitlab-buster test"]
omnibus-gitlab-xenial push:
extends: .build_and_deploy
needs: ["omnibus-gitlab-xenial test"]
omnibus-gitlab-focal push:
extends: .build_and_deploy
needs: ["omnibus-gitlab-focal test"]
omnibus-gitlab-amazonlinux2 push:
extends: .build_and_deploy
needs: ["omnibus-gitlab-amazonlinux2 test"]
omnibus-gitlab-depscan push:
extends: .build_and_deploy
needs: ["omnibus-gitlab-depscan test"]
omnibus-gitlab-cve-search push:
extends: .build_and_deploy
needs: ["omnibus-gitlab-cve-search test"]
release-tools push:
extends: .build_and_deploy
needs: ["release-tools test"]
triage-ops-ruby-2.7 push:
extends: .build_and_deploy
needs: ["triage-ops-ruby-2.7 test"]
sitespeed-gitlab push:
extends: .build_and_deploy
needs: ["sitespeed-gitlab test"]
ubi-release push:
extends: .build_and_deploy
needs: ["ubi-release test"]
www-gitlab-com-ruby-3.0-node-16 push:
extends: .build_and_deploy
needs: ["www-gitlab-com-ruby-3.0-node-16 test"]
build-git push:
extends: .build_and_deploy
needs: ["build-git test"]
# Used by GitLab: https://gitlab.com/gitlab-org/gitlab/-/blob/13-8-stable-ee/lib/gitlab/ci/templates/Terraform.gitlab-ci.yml # Used by GitLab: https://gitlab.com/gitlab-org/gitlab/-/blob/13-8-stable-ee/lib/gitlab/ci/templates/Terraform.gitlab-ci.yml
terraform push: *build_and_deploy terraform push:
extends: .build_and_deploy
needs: ["terraform test"]
# Used by go projects for linting https://gitlab.com/gitlab-org/gitlab/blob/master/doc/development/go_guide/index.md#automatic-linting # Used by go projects for linting https://gitlab.com/gitlab-org/gitlab/blob/master/doc/development/go_guide/index.md#automatic-linting
golangci-lint-alpine push: *build_and_deploy golangci-lint-alpine push:
extends: .build_and_deploy
needs: ["golangci-lint-alpine test"]
# Used by gitlab-operator: https://gitlab.com/gitlab-org/gl-openshift/gitlab-operator # Used by gitlab-operator: https://gitlab.com/gitlab-org/gl-openshift/gitlab-operator
gitlab-operator-build-base push: *build_and_deploy gitlab-operator-build-base push:
extends: .build_and_deploy
needs: ["gitlab-operator-build-base test"]
alpine-bash-jq-curl-git push: *build_and_deploy alpine-bash-jq-curl-git push:
extends: .build_and_deploy
needs: ["alpine-bash-jq-curl-git test"]
# Used by frontend related tasks for linting GraphQL # Used by frontend related tasks for linting GraphQL
apollo push: *build_and_deploy apollo push:
extends: .build_and_deploy
needs: ["apollo test"]

View file

@ -21,6 +21,7 @@ customers push:
extends: extends:
- .customers-matrix - .customers-matrix
- .build_and_deploy_custom - .build_and_deploy_custom
needs: ["customers test"]
# Used by customers-gitlab-com qa e2e test: https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/staging/.gitlab/ci/e2e.gitlab-ci.yml # Used by customers-gitlab-com qa e2e test: https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/staging/.gitlab/ci/e2e.gitlab-ci.yml
.customers-qa-matrix: .customers-qa-matrix:
@ -43,3 +44,4 @@ customers-qa-assets push:
extends: extends:
- .customers-qa-matrix - .customers-qa-matrix
- .build_and_deploy_custom - .build_and_deploy_custom
needs: ["customers-qa-assets test"]

View file

@ -22,3 +22,4 @@ gitlab-kas push:
extends: extends:
- .gitlab-kas-matrix - .gitlab-kas-matrix
- .build_and_deploy_custom - .build_and_deploy_custom
needs: ["gitlab-kas test"]