Commit 56999ef3 authored by Jonathan Klimt's avatar Jonathan Klimt
Browse files

Ported CI to Kaniko&Kubernetes

parent 68e2c59a
Pipeline #373563 failed with stages
in 20 seconds
variables: variables:
DOCKER_TAG_DEV: ${CI_COMMIT_REF_NAME} DOCKER_TAG_DEV: ${CI_COMMIT_REF_NAME}
DOCKER_IMAGE_DEV: cimpy DOCKER_IMAGE_DEV: cimpy
DOCKER_FILE: ${CI_PROJECT_DIR}/Dockerfile
stages: stages:
- prepare - prepare
...@@ -9,21 +10,25 @@ stages: ...@@ -9,21 +10,25 @@ stages:
- deploy - deploy
docker: prepare:
stage: prepare variables:
script: GIT_SUBMODULE_STRATEGY: none
- docker build -t ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} . stage: prepare
tags: image:
- shell name: gcr.io/kaniko-project/executor:debug
- linux entrypoint: [ "" ]
script:
- echo "image ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}"
- 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} --target base --destination ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}-base-image --cache=true --snapshotMode=redo --use-new-run
cached-documentation: cached-documentation:
stage: generate stage: generate
script: script:
- cd documentation && ./docu.sh - cd documentation && ./docu.sh
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}
tags:
- docker
cache: cache:
key: secret-cimpy key: secret-cimpy
paths: paths:
...@@ -35,12 +40,10 @@ documentation: ...@@ -35,12 +40,10 @@ documentation:
stage: generate stage: generate
script: script:
- cd documentation && ./docu.sh - cd documentation && ./docu.sh
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}
artifacts: artifacts:
paths: paths:
- documentation - documentation
tags:
- docker
only: only:
- master - master
...@@ -69,9 +72,7 @@ test:import: ...@@ -69,9 +72,7 @@ test:import:
script: script:
- python3 setup.py develop - python3 setup.py develop
- cd tests && pytest -v test_import.py - cd tests && pytest -v test_import.py
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}
tags:
- docker
test:export-against-imported-files: test:export-against-imported-files:
stage: test stage: test
...@@ -80,9 +81,7 @@ test:export-against-imported-files: ...@@ -80,9 +81,7 @@ test:export-against-imported-files:
script: script:
- python3 setup.py develop - python3 setup.py develop
- cd tests && pytest -v test_export_with_imported_files.py - cd tests && pytest -v test_export_with_imported_files.py
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}
tags:
- docker
test:export-against-exported-files: test:export-against-exported-files:
stage: test stage: test
...@@ -91,6 +90,4 @@ test:export-against-exported-files: ...@@ -91,6 +90,4 @@ test:export-against-exported-files:
script: script:
- python3 setup.py develop - python3 setup.py develop
- cd tests && pytest -v test_export_with_exported_files.py - cd tests && pytest -v test_export_with_exported_files.py
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} image: ${CI_REGISTRY_IMAGE}:${DOCKER_IMAGE_DEV}
tags: \ No newline at end of file
- docker
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