Commit e9403f34 authored by Gadhave's avatar Gadhave
Browse files

Update .gitlab-ci.yml file

parent 62ed51b8
Pipeline #12091 failed with stages
in 1 minute and 30 seconds
......@@ -12,12 +12,22 @@ variables:
DOCKER_CONTEXT: "Desktop/Telegram_Bot"
IMAGE_NAME: "pranav446/telegram-bot"
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_HOST: unix:///var/run/docker.sock # Connect to host Docker daemon
DOCKER_HOST: unix:///var/run/docker.sock
DOCKER_BUILDKIT: "1"
DOCKERHUB_REPO: "$DOCKER_USERNAME/teledatastream" # set repo name
.build_template:
tags: ["windows","docker","ws12"] # match your runner tags
before_script:
- echo "Docker CLI info:"
- docker version
lint:
stage: lint
image: python:3.10
extends: .build_template
before_script :
- pip install flake8
script:
......@@ -29,6 +39,7 @@ lint:
test:
stage: test
image: python:3.10
extends: .build_template
before_script:
- pip install pytest
- echo "Running Tests"
......@@ -41,7 +52,7 @@ test:
build:
stage: build
image: docker:latest
image: docker:24.0.9
before_script:
- echo "Building Docker image for commit:" ${CI_COMMIT_SHORT_SHA}
- echo "Logging in to Docker registry..."
......@@ -51,7 +62,7 @@ build:
- echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin "${DOCKER_REGISTRY}"
script:
- echo "Building image..."
- docker build -t $IMAGE_NAME:$DOCKER_TAG .
- docker build -t $DOCKERHUB_REPO:$CI_COMMIT_SHORT_SHA .
after_script:
- echo "Docker image pushed successfully!"
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