Update .gitlab-ci
This commit is contained in:
parent
1322c5f0f5
commit
5852061063
@ -8,16 +8,15 @@ variables:
|
|||||||
BRANCH: mysql
|
BRANCH: mysql
|
||||||
VERSION: 7.2-fpm-${BRANCH}
|
VERSION: 7.2-fpm-${BRANCH}
|
||||||
CACHETAG: build-${BRANCH}
|
CACHETAG: build-${BRANCH}
|
||||||
DOCKER_REGISTRY: registry.leenooks.net
|
DOCKER_HOST: tcp://${CI_REGISTRY}-leenooks-ci-docker:2375
|
||||||
DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind
|
- ${CI_REGISTRY}/leenooks/ci-docker:dind
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- docker info
|
- docker info
|
||||||
- docker version
|
- docker version
|
||||||
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY}
|
- echo "$CI_JOB_TOKEN" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
|
||||||
|
|
||||||
test:
|
test:
|
||||||
stage: test
|
stage: test
|
||||||
@ -32,6 +31,7 @@ test:
|
|||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
|
- if [ -f init ]; then chmod 500 init; fi
|
||||||
- docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true
|
- docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true
|
||||||
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
|
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
|
||||||
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
|
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
|
||||||
|
Loading…
Reference in New Issue
Block a user