Last active
October 3, 2022 18:08
-
-
Save BirgitPohl/7af71194f1f0045fec7004353abab0bc to your computer and use it in GitHub Desktop.
Whitlabel Deployment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# It assumes you have templates setup and to be recognized. | |
# the extends command takes the extension of this template Yaml file. | |
# A Kaniko example: | |
.docker-build: | |
stage: my-stage | |
only: | |
- master | |
image: | |
name: gcr.io/kaniko-project/executor:debug | |
variables: | |
KANIKO_ARGS: --context ${CI_PROJECT_DIR} | |
when: manual #important to have, to be able to choose which brand is to be build | |
before_script: | |
- echo $PROJECT_VERSION | |
- echo $THEME | |
script: | |
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"username\":\"${CI_REGISTRY_USER}\",\"password\":\"${CI_REGISTRY_PASSWORD}\"}}}" > /kaniko/.docker/config.json | |
- /kaniko/executor ${KANIKO_ARGS} --build-arg BRAND="${BRAND}" --build-arg BUILD_MODE="${ENVIRONMENT}" --destination ${CI_REGISTRY}/${CI_PROJECT_PATH}/${CI_PROJECT_NAME}:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include: | |
- local: ".gitlab/.common-template.yml" | |
Build Image Brand1: | |
variables: | |
brand: brand1 | |
extends: .docker-build | |
Build Image Brand2: | |
variables: | |
brand: brand2 | |
extends: .docker-build | |
Docker Tag: | |
# Tag the docker | |
Deploy: | |
# Deploy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment