Commit 262ec5a6 authored by Gadhave's avatar Gadhave
Browse files

Update .gitlab-ci.yml file

parent e58233ab
Pipeline #12065 failed with stages
in 1 minute and 5 seconds
......@@ -8,8 +8,10 @@ variables:
PYTHONPATH: "${CI_PROJECT_DIR}"
DOCKER_DRIVER: overlay2
DOCKER_REGISTRY: "docker.io"
DOCKER_IMAGE_NAME: telegram-bot
DOCKER_TAG: $CI_COMMIT_SHORT_SHA
DOCKER_CONTEXT: "Desktop/Telegram_Bot"
IMAGE_NAME: "telegram-bot"
DOCKER_TLS_CERTDIR: "/certs"
lint:
......@@ -38,14 +40,24 @@ test:
after_script:
- echo "Tests completed succesfully"
build:
build_image:
stage: build
default:
image:
name: alpine:3.18
entrypoint: [""]
image:
name: gcr.io/kaniko-project/executor:latest
entrypoint: ["/busybox/sh", "-c"]
image: docker:25.0.3
services:
- docker:25.0.3-dind
script:
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --no-push --destination myapp:latest
- 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
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