gitlab-build-images/.gitlab/ci/custom.images.yml
2022-05-06 15:30:42 -07:00

238 lines
7.7 KiB
YAML

.test_build:
extends: .test
script:
# Hack to set an array in /bin/sh
# http://unix.stackexchange.com/a/137571
- set -- $CI_JOB_NAME
- docker build --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from="$CI_REGISTRY_IMAGE:$1" -f "Dockerfile.$1" .
.build_and_deploy:
extends: .deploy
script:
# Hack to set an array in /bin/sh
# http://unix.stackexchange.com/a/137571
- set -- $CI_JOB_NAME
- docker build --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from="$CI_REGISTRY_IMAGE:$1" --label "ci_pipeline_url=$CI_PIPELINE_URL" --label "ci_job_url=$CI_JOB_URL" -t "$CI_REGISTRY_IMAGE:$1" -f "Dockerfile.$1" .
- docker push "$CI_REGISTRY_IMAGE:$1"
# Used by https://gitlab.com/gitlab-org/charts/auto-deploy-app/-/blob/master/.gitlab-ci.yml
alpine-helm test:
extends: .test_build
# Used by charts CI
# - https://gitlab.com/gitlab-org/charts/elastic-stack/-/blob/master/.gitlab-ci.yml
# - https://gitlab.com/gitlab-org/charts/gitlab/-/blob/master/.gitlab-ci.yml
# - https://gitlab.com/gitlab-org/charts/gitlab-runner/-/blob/main/.gitlab-ci.yml
# - https://gitlab.com/charts/charts.gitlab.io/-/blob/master/.gitlab-ci.yml
gitlab-charts-build-base-helm-3 test:
extends: .test_build
gitlab-charts-build-base-helm-3.7 test:
extends: .test_build
danger test:
extends: .test_build
danger-ruby-2.6.6 test:
extends: .test_build
gitlab-helm3.5-kubectl1.17 test:
extends: .test_build
gitlab-qa-ruby-2.7 test:
extends: .test_build
gitlab-qa-ruby-3.0 test:
extends: .test_build
gitlab-qa-alpine-ruby-2.7 test:
extends: .test_build
gitlab-qa-alpine-ruby-3.0 test:
extends: .test_build
gitlab-puppeteer test:
extends: .test_build
kaniko test:
extends: .test_build
omnibus-gitlab-bionic test:
extends: .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-bullseye 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:
extends: .test_build
triage-ops-ruby-2.7 test:
extends: .test_build
sitespeed-gitlab test:
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
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
golangci-lint-alpine test:
extends: .test_build
# Used by gitlab-operator: https://gitlab.com/gitlab-org/gl-openshift/gitlab-operator
gitlab-operator-build-base test:
extends: .test_build
alpine-bash-jq-curl-git test:
extends: .test_build
# Used by frontend related tasks for linting GraphQL
apollo test:
extends: .test_build
# Used by https://gitlab.com/gitlab-org/charts/auto-deploy-app/-/blob/master/.gitlab-ci.yml
alpine-helm push:
extends: .build_and_deploy
needs: ["alpine-helm test"]
# Used by charts CI
# - https://gitlab.com/gitlab-org/charts/elastic-stack/-/blob/master/.gitlab-ci.yml
# - https://gitlab.com/gitlab-org/charts/gitlab/-/blob/master/.gitlab-ci.yml
# - https://gitlab.com/gitlab-org/charts/gitlab-runner/-/blob/main/.gitlab-ci.yml
# - https://gitlab.com/charts/charts.gitlab.io/-/blob/master/.gitlab-ci.yml
gitlab-charts-build-base-helm-3 push:
extends: .build_and_deploy
needs: ["gitlab-charts-build-base-helm-3 test"]
gitlab-charts-build-base-helm-3.7 push:
extends: .build_and_deploy
needs: ["gitlab-charts-build-base-helm-3.7 test"]
danger push:
extends: .build_and_deploy
needs: ["danger test"]
danger-ruby-2.6.6 push:
extends: .build_and_deploy
needs: ["danger-ruby-2.6.6 test"]
gitlab-helm3.5-kubectl1.17 push:
extends: .build_and_deploy
needs: ["gitlab-helm3.5-kubectl1.17 test"]
gitlab-qa-ruby-2.7 push:
extends: .build_and_deploy
needs: ["gitlab-qa-ruby-2.7 test"]
gitlab-qa-ruby-3.0 push:
extends: .build_and_deploy
needs: ["gitlab-qa-ruby-3.0 test"]
gitlab-qa-alpine-ruby-2.7 push:
extends: .build_and_deploy
needs: ["gitlab-qa-alpine-ruby-2.7 test"]
gitlab-qa-alpine-ruby-3.0 push:
extends: .build_and_deploy
needs: ["gitlab-qa-alpine-ruby-3.0 test"]
gitlab-puppeteer push:
extends: .build_and_deploy
needs: ["gitlab-puppeteer test"]
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-bullseye push:
extends: .build_and_deploy
needs: ["omnibus-gitlab-bullseye 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
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
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
gitlab-operator-build-base push:
extends: .build_and_deploy
needs: ["gitlab-operator-build-base test"]
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
apollo push:
extends: .build_and_deploy
needs: ["apollo test"]