wip34
continuous-integration/drone/push Build encountered an error Details
continuous-integration/drone/pr Build encountered an error Details

This commit is contained in:
valvin 2022-11-27 17:41:19 +01:00
parent 4f54266926
commit 41875aa5a4
1 changed files with 13 additions and 2 deletions

View File

@ -9,11 +9,22 @@ environment:
IMAGE_TAG: "latest"
steps:
- name: build_image
- name: test_build_image
image: gcr.io/kaniko-project/executor:v1.7.0-debug
commands:
- echo "testing build image without push"
- /kaniko/executor --context $DRONE_WORKSPACE --dockerfile Dockerfile --destination $CI_REGISTRY_IMAGE:$IMAGE_TAG --no-push
when:
event:
- pull_request
- name: test_build_image
image: gcr.io/kaniko-project/executor:v1.7.0-debug
commands:
- echo "init registry credentials"
- echo $DRONE_WORKSPACE
- mkdir -p /kanico/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $DRONE_WORKSPACE --dockerfile Dockerfile --destination $CI_REGISTRY_IMAGE:$IMAGE_TAG --no-push
- /kaniko/executor --context $DRONE_WORKSPACE --dockerfile Dockerfile --destination $CI_REGISTRY_IMAGE:$IMAGE_TAG --no-push
when:
branch:
- main