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