Commit 18e027fd authored by Schrödter, Tobias's avatar Schrödter, Tobias
Browse files

Only create image when change in Dockerfile

parent 1bcc9638
......@@ -14,9 +14,11 @@ build_container:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/container/arch/Dockerfile --destination $CI_REGISTRY_IMAGE:${CI_COMMIT_REF_SLUG}_linux
rules:
- changes:
- $CI_PROJECT_DIR/container/arch/Dockerfile
# Build petrack and petrack unit_tests
build_linux:
......@@ -31,7 +33,6 @@ build_linux:
paths:
- "./build/"
expire_in: 2 hrs
needs: ["build_container"]
# Execute unit tests
unit_test_linux:
......@@ -46,7 +47,6 @@ unit_test_linux:
- build/tests/unit_test/unit_test_report.xml
reports:
junit: "build/tests/unit_test/unit_test_report.xml"
needs: ["build_linux"]
###############################################################################
......
Supports Markdown
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