Newer
Older
stages:
- build
docker-build-rolling:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
variables:
TAG: $CI_COMMIT_BRANCH
script:
- cp ${DOCKER_HUB_CONFIG} /kaniko/.docker/config.json
- /kaniko/executor --context . --dockerfile docker/production/web-server/Dockerfile --destination ${DOCKER_IMAGE_WEB_SERVER}:${TAG}
- /kaniko/executor --context . --dockerfile docker/production/app/Dockerfile --destination ${DOCKER_IMAGE_APP}:${TAG}
needs:
- pipeline: $PARENT_PIPELINE_ID
job: bundle
only:
refs:
- develop
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
docker-build-main-release:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- cp ${DOCKER_HUB_CONFIG} /kaniko/.docker/config.json
- export CP_VERSION=(cat CP_VERSION.env)
- /kaniko/executor --context . --dockerfile docker/production/web-server/Dockerfile --destination ${DOCKER_IMAGE_WEB_SERVER}:${CP_VERSION} --destination ${DOCKER_IMAGE_WEB_SERVER}:latest
- /kaniko/executor --context . --dockerfile docker/production/app/Dockerfile --destination ${DOCKER_IMAGE_APP}:${CP_VERSION} --destination ${DOCKER_IMAGE_APP}:latest
needs:
- pipeline: $PARENT_PIPELINE_ID
job: release
only:
refs:
- main
docker-build-alpha-beta-release:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- cp ${DOCKER_HUB_CONFIG} /kaniko/.docker/config.json
- export CP_VERSION=(cat CP_VERSION.env)
- /kaniko/executor --context . --dockerfile docker/production/web-server/Dockerfile --destination ${DOCKER_IMAGE_WEB_SERVER}:${CP_VERSION}
- /kaniko/executor --context . --dockerfile docker/production/app/Dockerfile --destination ${DOCKER_IMAGE_APP}:${CP_VERSION}
needs:
- pipeline: $PARENT_PIPELINE_ID
job: release
only:
refs:
- alpha
- beta