Commit 5848bbb6 authored by Gadhave's avatar Gadhave
Browse files

Update .gitlab-ci.yml file

parent c5b5a896
Pipeline #12110 passed with stages
in 31 seconds
......@@ -3,7 +3,7 @@ stages:
- test
- diag
- build
- deploy
# - deploy
variables:
PYTHONPATH: "${CI_PROJECT_DIR}"
......@@ -78,21 +78,6 @@ build:
script:
- echo "Building image..."
- cd Desktop/Telegram_Bot
- docker build -t $DOCKERHUB_REPO:$CI_COMMIT_SHORT_SHA .
- echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin
after_script:
- echo "Docker image pushed successfully!"
\ No newline at end of file
deploy:
stage: deploy
image: docker:24.0.9
tags: ["windows","docker","ws12"]
script:
- echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin
- echo "Logged into dockerhub succesfully"
- docker push $DOCKERHUB_REPO:$PREVIOUS_BUILD_TAG
- echo "Pushed the docker image to dockerhub succesfully"
- if [ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ]; then
docker tag $DOCKERHUB_REPO:$CI_COMMIT_SHORT_SHA $DOCKERHUB_REPO:latest;
docker push $DOCKERHUB_REPO:latest;
fi
\ No newline at end of file
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