Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
software-project-WS25
Telegram Team
Commits
c5b5a896
Commit
c5b5a896
authored
Nov 07, 2025
by
Gadhave
Browse files
Update .gitlab-ci.yml file
parent
003168d4
Pipeline
#12108
canceled with stages
in 1 minute and 52 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
c5b5a896
...
...
@@ -2,7 +2,7 @@ stages:
-
lint
-
test
-
diag
#
- build
-
build
-
deploy
variables
:
...
...
@@ -64,6 +64,24 @@ diag:
-
docker version ||
true
-
docker info ||
true
build
:
stage
:
build
image
:
docker:24.0.9
extends
:
.build_template
before_script
:
-
echo "Building Docker image for commit:" ${CI_COMMIT_SHORT_SHA}
-
echo "Logging in to Docker registry..."
-
echo "Docker Registry :" ${DOCKER_REGISTRY}
-
echo "Docker Username :" ${DOCKER_USERNAME}
-
echo "Docker Passowrd :" ${DOCKER_PASSWORD}
script
:
-
echo "Building image..."
-
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
...
...
@@ -73,4 +91,8 @@ deploy:
-
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment