Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tecnalia_robotics-public
templates
Commits
ed31e185
Commit
ed31e185
authored
Nov 26, 2021
by
Jon Azpiazu
Browse files
Shorten default docker image name
parent
22e467b4
Pipeline
#61525
passed with stage
in 20 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ci-templates/industrial-ci-templates.yml
View file @
ed31e185
...
...
@@ -43,6 +43,14 @@
# Get ID of image created by ddeploy
-
'
DOCKER_ID=$(docker
images
--format="{{.ID}}"
|
head
-1)'
-
curl -Ls https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/master/scripts/enforce_labels.bash | bash -s -- ${DOCKER_ID}
# if USER_DOCKER_PUSH_NAME is not defined, shorten the default DOCKER_PUSH_NAME
-
>
if [ -z ${USER_DOCKER_PUSH_NAME} ] ; then
echo USER_DOCKER_PUSH_NAME was not defined, using default docker image name
DOCKER_PUSH_NAME=${DOCKER_PUSH_NAME#$CI_PROJECT_ROOT_NAMESPACE/}
else
DOCKER_PUSH_NAME=${USER_DOCKER_PUSH_NAME}
fi
# Tag and push with the branch or tag name.
-
echo "Pushing to ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}"
-
docker tag ${DOCKER_ID} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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