Commit 58a1cfea authored by Gadhave's avatar Gadhave
Browse files

Update .gitlab-ci.yml file

parent 262ec5a6
Pipeline #12066 failed with stages
in 27 seconds
......@@ -40,24 +40,22 @@ test:
after_script:
- echo "Tests completed succesfully"
build_image:
build_with_kaniko:
stage: build
image: docker:25.0.3
services:
- docker:25.0.3-dind
image:
name: gcr.io/kaniko-project/executor:latest
entrypoint: [""]
script:
- echo "===== START BUILD:" $IMAGE_NAME
- cd $DOCKER_CONTEXT
- |
docker build \
--pull \
-t "$IMAGE_NAME:$CI_COMMIT_SHORT_SHA" \
-t "$IMAGE_NAME:latest" \
-f Dockerfile .
- echo "===== BUILD COMPLETE ====="
- echo "IMAGE_TAG:" $IMAGE_NAME:$CI_COMMIT_SHORT_SHA
- docker images | grep "$IMAGE_NAME"
tags:
- docker
- mkdir -p /workspace && cp -r $CI_PROJECT_DIR/$DOCKER_CONTEXT /workspace/context
- /kaniko/executor --context=dir:///workspace/context --dockerfile=/workspace/context/Dockerfile --destination=unused:latest --no-push --tarPath=/workspace/${IMAGE_NAME}_${CI_COMMIT_SHORT_SHA}.tar
- echo "===== BUILD COMPLETE:" /workspace/${IMAGE_NAME}_${CI_COMMIT_SHORT_SHA}.tar
artifacts:
paths:
- /workspace/${IMAGE_NAME}_${CI_COMMIT_SHORT_SHA}.tar
expire_in: 1 day
only:
- branches
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