Skip to content
Snippets Groups Projects
Commit d1968994 authored by Jan Grewe's avatar Jan Grewe
Browse files

use kaniko & crane

parent b8f04476
No related branches found
No related tags found
No related merge requests found
Pipeline #1048 passed
......@@ -4,21 +4,34 @@ stages:
build:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
only:
- master
script:
- docker build -t dcr.faked.org/gitlab-ci/android:${CI_COMMIT_SHORT_SHA} .
- /kaniko/executor
--cache=true
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "dcr.faked.org/gitlab-ci/android:${CI_COMMIT_SHORT_SHA}"
push_latest:
stage: push
image:
name: gcr.io/go-containerregistry/crane:debug
entrypoint: [""]
only:
- master
script:
- docker tag dcr.faked.org/gitlab-ci/android:${CI_COMMIT_SHORT_SHA} dcr.faked.org/gitlab-ci/android:latest
- docker push dcr.faked.org/gitlab-ci/android:latest
- crane copy dcr.faked.org/gitlab-ci/android:${CI_COMMIT_SHORT_SHA} dcr.faked.org/gitlab-ci/android:latest
push_tag:
stage: push
image:
name: gcr.io/go-containerregistry/crane:debug
entrypoint: [""]
only:
- tags
script:
- docker tag dcr.faked.org/gitlab-ci/android:${CI_COMMIT_SHORT_SHA} dcr.faked.org/gitlab-ci/android:${CI_COMMIT_TAG}
- docker push dcr.faked.org/gitlab-ci/android:${CI_COMMIT_TAG}
- crane copy dcr.faked.org/gitlab-ci/android:${CI_COMMIT_SHORT_SHA} dcr.faked.org/gitlab-ci/android:${CI_COMMIT_TAG}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment