Switch back to pipelines in infra
This commit is contained in:
parent
5f62ac334d
commit
2e5d7733cd
|
|
@ -1,27 +1,11 @@
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
|
- deploy
|
||||||
|
|
||||||
build_image:
|
include:
|
||||||
stage: build
|
- project: 'turniere/turniere-infra'
|
||||||
image:
|
file: '/ci/pipeline.yaml'
|
||||||
name: gcr.io/kaniko-project/executor:debug
|
|
||||||
entrypoint: [""]
|
|
||||||
script:
|
|
||||||
- mkdir -p /kaniko/.docker
|
|
||||||
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
|
|
||||||
- |
|
|
||||||
[ -z "$DOCKER_IMAGE_ENVS" ] && DOCKER_IMAGE_ENVS="production development test"
|
|
||||||
for env in $DOCKER_IMAGE_ENVS; do
|
|
||||||
/kaniko/executor --context "${CI_PROJECT_DIR}" \
|
|
||||||
--dockerfile "${CI_PROJECT_DIR}/docker/${env}/Dockerfile" \
|
|
||||||
--destination "${CI_REGISTRY_IMAGE}/${env}:latest" \
|
|
||||||
--destination "${CI_REGISTRY_IMAGE}/${env}/commits:${CI_COMMIT_SHA}" \
|
|
||||||
--destination "${CI_REGISTRY_IMAGE}/${env}/refs:${CI_COMMIT_REF_SLUG}" \
|
|
||||||
--build-arg base_commit="$CI_COMMIT_SHA" \
|
|
||||||
--cache=true \
|
|
||||||
--cache-copy-layers=true
|
|
||||||
done
|
|
||||||
|
|
||||||
rails spec:
|
rails spec:
|
||||||
stage: test
|
stage: test
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue