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
Reddit Team
Commits
f1a99067
Commit
f1a99067
authored
Nov 28, 2025
by
Benavides Ontiveros
Browse files
verify docker push
parent
e119ed77
Pipeline
#12173
passed with stages
in 20 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
f1a99067
...
@@ -109,23 +109,16 @@ build:
...
@@ -109,23 +109,16 @@ build:
deploy
:
deploy
:
stage
:
deploy
stage
:
deploy
extends
:
.build_template
extends
:
.build_template
script
:
|
script
:
echo "Logging in to Docker registry..."
-
echo "Logging in to Docker registry..."
echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin
-
echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin
-
echo "Pushing Docker image..."
echo "Pushing Docker image..."
-
docker push $DOCKERHUB_REPO:$CI_COMMIT_SHORT_SHA
docker push $DOCKERHUB_REPO:$CI_COMMIT_SHORT_SHA
-
|
if [ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ]; then
if [ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ]; then
echo "Tagging image as latest..."
echo "Tagging image as latest..."
docker tag $DOCKERHUB_REPO:$CI_COMMIT_SHORT_SHA $DOCKERHUB_REPO:latest
docker tag $DOCKERHUB_REPO:$CI_COMMIT_SHORT_SHA $DOCKERHUB_REPO:latest
docker push $DOCKERHUB_REPO:latest
docker push $DOCKERHUB_REPO:latest
fi
fi
rules
:
rules
:
-
if
:
'
$CI_PIPELINE_SOURCE
==
"merge_request_event"'
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH'
when
:
never
\ No newline at end of file
-
if
:
'
$CI_COMMIT_TAG'
when
:
never
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH'
-
when
:
never
\ 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