gitlab-build-images/.gitlab-ci.yml
Stan Hu 7a2c2770f2 Build new images with git 2.16
Needed for improving performance of `git fetch` in https://gitlab.com/gitlab-com/migration/issues/216
2018-02-26 13:58:14 -08:00

140 lines
5.7 KiB
YAML

image: docker:git
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay
before_script:
- docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
.test_build: &test_build
stage: test
script:
# Hack to set an array in /bin/sh
# http://unix.stackexchange.com/a/137571
- set -- $CI_JOB_NAME
- docker build -f "Dockerfile.$1" .
except:
- master
.build_and_deploy: &build_and_deploy
stage: build
script:
- docker build -t "$CI_REGISTRY_IMAGE:$CI_JOB_NAME" -f "Dockerfile.$CI_JOB_NAME" .
- docker push "$CI_REGISTRY_IMAGE:$CI_JOB_NAME"
only:
- master
.test_custom: &test_custom
stage: test
script:
# Hack to set an array in /bin/sh
# http://unix.stackexchange.com/a/137571
- set -- $CI_JOB_NAME
- ./scripts/custom-docker-build $1
except:
- master
.build_and_deploy_custom: &build_and_deploy_custom
stage: build
script:
- ./scripts/custom-docker-build $CI_BUILD_NAME -t "$CI_REGISTRY_IMAGE:$CI_JOB_NAME"
- docker push "$CI_REGISTRY_IMAGE:$CI_JOB_NAME"
only:
- master
# Tests
ruby-2.3-golang-1.8-git-2.14 test: *test_custom
ruby-2.3-golang-1.8-git-2.9 test: *test_custom
ruby-2.3-golang-1.9-git-2.16 test: *test_custom
ruby-2.3-golang-1.9-git-2.14 test: *test_custom
ruby-2.3-golang-1.9-git-2.9 test: *test_custom
ruby-2.3-golang-1.10-git-2.14 test: *test_custom
ruby-2.3-golang-1.10-git-2.9 test: *test_custom
ruby-2.3-golang-1.10-git-2.16 test: *test_custom
ruby-2.3.5-golang-1.9-git-2.14-chrome-64.0-node-8.x-yarn-1.2-postgresql-9.6 test: *test_custom
ruby-2.3.6-golang-1.9-git-2.14-chrome-64.0-node-8.x-yarn-1.2-postgresql-9.6 test: *test_custom
ruby-2.3.6-golang-1.9-git-2.16-chrome-64.0-node-8.x-yarn-1.2-postgresql-9.6 test: *test_custom
golang-1.8.6-git-2.9.0 test: *test_custom
golang-1.8.6-git-2.14 test: *test_custom
golang-1.9-git-2.9.0 test: *test_custom
golang-1.9-git-2.14 test: *test_custom
golang-1.9-git-2.16 test: *test_custom
golang-1.10-git-2.9.0 test: *test_custom
golang-1.10-git-2.14 test: *test_custom
golang-1.10-git-2.16 test: *test_custom
node-8.9-chrome-64.0-yarn-1.2 test: *test_custom
www-gitlab-com test: *test_build
gitlab-qa test: *test_build
omnibus-gitlab-centos6 test: *test_build
omnibus-gitlab-centos7 test: *test_build
omnibus-gitlab-jessie test: *test_build
omnibus-gitlab-stretch test: *test_build
omnibus-gitlab-opensuse42.3 test: *test_build
omnibus-gitlab-trusty test: *test_build
omnibus-gitlab-wheezy test: *test_build
omnibus-gitlab-xenial test: *test_build
sitespeed-gitlab test: *test_build
# Builds
ruby-2.3-golang-1.8.6-git-2.14: *build_and_deploy_custom
ruby-2.3-golang-1.8.6-git-2.9: *build_and_deploy_custom
ruby-2.3-golang-1.9-git-2.16: *build_and_deploy_custom
ruby-2.3-golang-1.9-git-2.14: *build_and_deploy_custom
ruby-2.3-golang-1.9-git-2.9: *build_and_deploy_custom
ruby-2.3-golang-1.10-git-2.16: *build_and_deploy_custom
ruby-2.3-golang-1.10-git-2.14: *build_and_deploy_custom
ruby-2.3-golang-1.10-git-2.9: *build_and_deploy_custom
ruby-2.3.5-golang-1.9-git-2.14-chrome-64.0-node-8.x-yarn-1.2-postgresql-9.6: *build_and_deploy_custom
ruby-2.3.6-golang-1.9-git-2.14-chrome-64.0-node-8.x-yarn-1.2-postgresql-9.6: *build_and_deploy_custom
ruby-2.3.6-golang-1.9-git-2.16-chrome-64.0-node-8.x-yarn-1.2-postgresql-9.6: *build_and_deploy_custom
golang-1.8.6-git-2.9.0: *build_and_deploy_custom
golang-1.8.6-git-2.14: *build_and_deploy_custom
golang-1.9-git-2.9.0: *build_and_deploy_custom
golang-1.9-git-2.14: *build_and_deploy_custom
golang-1.9-git-2.16: *build_and_deploy_custom
golang-1.10-git-2.9.0: *build_and_deploy_custom
golang-1.10-git-2.14: *build_and_deploy_custom
golang-1.10-git-2.16: *build_and_deploy_custom
node-8.9-chrome-64.0-yarn-1.2: *build_and_deploy_custom
www-gitlab-com: *build_and_deploy
gitlab-qa: *build_and_deploy
omnibus-gitlab-centos6: *build_and_deploy
omnibus-gitlab-centos7: *build_and_deploy
omnibus-gitlab-jessie: *build_and_deploy
omnibus-gitlab-stretch: *build_and_deploy
omnibus-gitlab-opensuse42.3: *build_and_deploy
omnibus-gitlab-trusty: *build_and_deploy
omnibus-gitlab-wheezy: *build_and_deploy
omnibus-gitlab-xenial: *build_and_deploy
sitespeed-gitlab: *build_and_deploy
# Old Google Chrome images are listed here for reference:
# These still exist in our docker repisotiry, but they cannot be built anymore since
# Google yanks them from their PPA. To build variations of these requires an image based on
# one of the images below.
# See https://gitlab.com/gitlab-org/gitlab-build-images/merge_requests/54 for an example
# ruby-2.3.3-golang-1.8-git-2.7-chrome-59.0-node-7.1-postgresql-9.6: *test_custom
# ruby-2.3.3-golang-1.8-git-2.7-chrome-60.0-node-7.1-postgresql-9.6: *test_custom
# ruby-2.3.3-golang-1.8-git-2.13-chrome-59.0-node-7.1-postgresql-9.6: *test_custom
# ruby-2.3.3-golang-1.8-git-2.13-chrome-60.0-node-7.1-postgresql-9.6: *test_custom
# ruby-2.3.3-golang-1.8-git-2.13-chrome-61.0-node-8.x-yarn-1.0-postgresql-9.6 test: *test_custom
# ruby-2.3.5-golang-1.8-git-2.13-chrome-61.0-node-8.x-yarn-1.0-postgresql-9.6 test: *test_custom
# ruby-2.3.5-golang-1.8-git-2.13-chrome-62.0-node-8.x-yarn-1.2-postgresql-9.6 test: *test_custom
# ruby-2.3.3-golang-1.8-git-2.7-chrome-59.0-node-7.1-postgresql-9.6: *build_and_deploy_custom
# ruby-2.3.3-golang-1.8-git-2.7-chrome-60.0-node-7.1-postgresql-9.6: *build_and_deploy_custom
# ruby-2.3.3-golang-1.8-git-2.13-chrome-59.0-node-7.1-postgresql-9.6: *build_and_deploy_custom
# ruby-2.3.3-golang-1.8-git-2.13-chrome-60.0-node-7.1-postgresql-9.6: *build_and_deploy_custom
# ruby-2.3.3-golang-1.8-git-2.13-chrome-61.0-node-8.x-yarn-1.0-postgresql-9.6: *build_and_deploy_custom
# ruby-2.3.5-golang-1.8-git-2.13-chrome-61.0-node-8.x-yarn-1.0-postgresql-9.6: *build_and_deploy_custom
# ruby-2.3.5-golang-1.8-git-2.13-chrome-62.0-node-8.x-yarn-1.2-postgresql-9.6: *build_and_deploy_custom