Commit c8002029 authored by Jonathan Klimt's avatar Jonathan Klimt
Browse files

Ported CI to Kaniko&Kubernetes

parent 68e2c59a
Pipeline #373980 failed with stages
in 4 minutes and 11 seconds
variables:
DOCKER_TAG_DEV: ${CI_COMMIT_REF_NAME}
DOCKER_IMAGE_DEV: cimpy
DOCKER_FILE: ${CI_PROJECT_DIR}/Dockerfile
stages:
- prepare
......@@ -9,21 +10,24 @@ stages:
- deploy
docker:
stage: prepare
script:
- docker build -t ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} .
tags:
- shell
- linux
prepare:
variables:
GIT_SUBMODULE_STRATEGY: none
stage: prepare
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [ "" ]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context ${CI_PROJECT_DIR} --dockerfile ${DOCKER_FILE} --destination ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}-base-image --cache=true --snapshotMode=redo --use-new-run
cached-documentation:
stage: generate
script:
- cd documentation && ./docu.sh
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
tags:
- docker
image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}-base-image
cache:
key: secret-cimpy
paths:
......@@ -35,12 +39,10 @@ documentation:
stage: generate
script:
- cd documentation && ./docu.sh
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}-base-image
artifacts:
paths:
- documentation
tags:
- docker
only:
- master
......@@ -69,9 +71,7 @@ test:import:
script:
- python3 setup.py develop
- cd tests && pytest -v test_import.py
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
tags:
- docker
image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}-base-image
test:export-against-imported-files:
stage: test
......@@ -80,9 +80,7 @@ test:export-against-imported-files:
script:
- python3 setup.py develop
- cd tests && pytest -v test_export_with_imported_files.py
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
tags:
- docker
image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}-base-image
test:export-against-exported-files:
stage: test
......@@ -91,6 +89,4 @@ test:export-against-exported-files:
script:
- python3 setup.py develop
- cd tests && pytest -v test_export_with_exported_files.py
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
tags:
- docker
image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}-base-image
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment