use-docker host dns for CI
This commit is contained in:
parent
dc2e7caabe
commit
e514362394
3 changed files with 15 additions and 17 deletions
|
@ -13,6 +13,7 @@ local stages_list = [
|
||||||
'docker_release',
|
'docker_release',
|
||||||
'teardown',
|
'teardown',
|
||||||
];
|
];
|
||||||
|
|
||||||
local stages = utils.set(stages_list);
|
local stages = utils.set(stages_list);
|
||||||
|
|
||||||
// List CI jobs
|
// List CI jobs
|
||||||
|
|
|
@ -11,13 +11,12 @@ container-base-build:
|
||||||
script:
|
script:
|
||||||
- docker build --cache-from quay.io/quay/quay-base:latest -t quay.io/quay/quay-base:latest -f quay-base.dockerfile .
|
- docker build --cache-from quay.io/quay/quay-base:latest -t quay.io/quay/quay-base:latest -f quay-base.dockerfile .
|
||||||
- docker push quay.io/quay/quay-base:latest
|
- docker push quay.io/quay/quay-base:latest
|
||||||
services:
|
|
||||||
- docker:dind
|
|
||||||
stage: docker_base
|
stage: docker_base
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- kubernetes
|
||||||
variables:
|
variables:
|
||||||
DOCKER_DRIVER: aufs
|
DOCKER_DRIVER: overlay
|
||||||
|
DOCKER_HOST: tcp://docker-host.gitlab-runner.svc.cluster.local:2375
|
||||||
container-build:
|
container-build:
|
||||||
before_script:
|
before_script:
|
||||||
- docker login -u $DOCKER_USER -p $DOCKER_PASS quay.io
|
- docker login -u $DOCKER_USER -p $DOCKER_PASS quay.io
|
||||||
|
@ -25,13 +24,12 @@ container-build:
|
||||||
script:
|
script:
|
||||||
- docker build -t quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG} -f quay.dockerfile .
|
- docker build -t quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG} -f quay.dockerfile .
|
||||||
- docker push quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
- docker push quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
||||||
services:
|
|
||||||
- docker:dind
|
|
||||||
stage: docker_build
|
stage: docker_build
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- kubernetes
|
||||||
variables:
|
variables:
|
||||||
DOCKER_DRIVER: aufs
|
DOCKER_DRIVER: overlay
|
||||||
|
DOCKER_HOST: tcp://docker-host.gitlab-runner.svc.cluster.local:2375
|
||||||
container-release:
|
container-release:
|
||||||
before_script:
|
before_script:
|
||||||
- docker login -u $DOCKER_USER -p $DOCKER_PASS quay.io
|
- docker login -u $DOCKER_USER -p $DOCKER_PASS quay.io
|
||||||
|
@ -43,13 +41,12 @@ container-release:
|
||||||
- docker pull quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
- docker pull quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}
|
||||||
- docker tag quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG} quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHA}
|
- docker tag quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG} quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHA}
|
||||||
- docker push quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHA}
|
- docker push quay.io/quay/quay-ci:${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHA}
|
||||||
services:
|
|
||||||
- docker:dind
|
|
||||||
stage: docker_release
|
stage: docker_release
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- kubernetes
|
||||||
variables:
|
variables:
|
||||||
DOCKER_DRIVER: aufs
|
DOCKER_DRIVER: overlay
|
||||||
|
DOCKER_HOST: tcp://docker-host.gitlab-runner.svc.cluster.local:2375
|
||||||
karma-tests:
|
karma-tests:
|
||||||
before_script:
|
before_script:
|
||||||
- cd /
|
- cd /
|
||||||
|
|
|
@ -3,17 +3,17 @@ function(vars={})
|
||||||
dockerBuild: {
|
dockerBuild: {
|
||||||
// base job to manage containers (build / push)
|
// base job to manage containers (build / push)
|
||||||
variables: {
|
variables: {
|
||||||
DOCKER_DRIVER: "aufs",
|
DOCKER_DRIVER: "overlay",
|
||||||
|
DOCKER_HOST: "tcp://docker-host.gitlab-runner.svc.cluster.local:2375"
|
||||||
},
|
},
|
||||||
|
|
||||||
image: "docker:git",
|
image: "docker:git",
|
||||||
before_script: [
|
before_script: [
|
||||||
"docker login -u $DOCKER_USER -p $DOCKER_PASS quay.io",
|
"docker login -u $DOCKER_USER -p $DOCKER_PASS quay.io",
|
||||||
],
|
],
|
||||||
services: [
|
|
||||||
"docker:dind",
|
|
||||||
],
|
|
||||||
tags: [
|
tags: [
|
||||||
"docker",
|
"kubernetes",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Reference in a new issue