Skip to content
Snippets Groups Projects
Commit a9cfbb79 authored by Daniel Tovarňák's avatar Daniel Tovarňák
Browse files

add automatic image build

parent 17b1d476
No related branches found
No related tags found
No related merge requests found
stages:
- docker_image_push
docker_image_push:
before_script: [ ] #prevent global before_script from running
variables:
CI_CUSTOM_IMAGE_NAME: kypo-ansible-runner
stage: docker_image_push
image:
name: gcr.io/kaniko-project/executor:v1.3.0-debug
entrypoint: [ "" ]
script:
- export CI_CUSTOM_REGISTRY_IMAGE="${CI_REGISTRY}/${CI_CUSTOM_REGISTRY_PATH}/${CI_CUSTOM_IMAGE_NAME}"
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_CUSTOM_REGISTRY_USER\",\"password\":\"$CI_CUSTOM_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_CUSTOM_REGISTRY_IMAGE:$CI_COMMIT_TAG
only:
- tags
except:
- branches
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment