Skip to content
Snippets Groups Projects
Verified Commit 8b2bba18 authored by Robotka István Adrián's avatar Robotka István Adrián
Browse files

templating .gitlab-ci.yml

parent b4b5b628
No related branches found
No related tags found
No related merge requests found
Pipeline #4596 passed
...@@ -2,20 +2,30 @@ stages: ...@@ -2,20 +2,30 @@ stages:
- build - build
before_script: before_script:
- echo "{\"auths\":{\"registry.kszk.bme.hu\":{\"username\":\"$CI_REG_USER\",\"password\":\"$CI_REG_PASS\"}}}" > /kaniko/.docker/config.json # auth docker registry before using it
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$KSZK_NEXUS_USERNAME\",\"password\":\"$KSZK_NEXUS_PASSWORD\"}}}"
> /kaniko/.docker/config.json
kubectl build: ###################### Image builder template #####################
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/kubectl/Dockerfile --destination "registry.kszk.bme.hu/baseimg/kubectl"
python tools build: # hidden job, not gonna run, just for the inheritance
.image-template:
stage: build stage: build
variables:
IMAGE_NAME: $CI_JOB_NAME
image: image:
name: gcr.io/kaniko-project/executor:debug name: gcr.io/kaniko-project/executor:debug
entrypoint: [""] entrypoint: [""]
script: script:
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/python-tools/Dockerfile --destination "registry.kszk.bme.hu/baseimg/python-tools" - /kaniko/executor
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/$IMAGE_NAME/Dockerfile
--destination "$CI_REGISTRY_IMAGE/$IMAGE_NAME"
############################ Real work ############################
kubectl: # Nomen est omen
extends: .image-template
python-tools: # Nomen est omen
extends: .image-template
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment