Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
templates
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tecnalia_robotics-public
templates
Commits
860aefe7
Commit
860aefe7
authored
3 years ago
by
Iñigo Moreno i Caireta
Browse files
Options
Downloads
Patches
Plain Diff
Make .ddeploy work with the yaml only
parent
5363052c
No related branches found
No related tags found
1 merge request
!70
Resolve "Update deprecated deploy job"
Pipeline
#58080
passed
3 years ago
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ci-templates/industrial-ci-templates.yml
+10
-30
10 additions, 30 deletions
ci-templates/industrial-ci-templates.yml
with
10 additions
and
30 deletions
ci-templates/industrial-ci-templates.yml
+
10
−
30
View file @
860aefe7
...
@@ -17,22 +17,9 @@
...
@@ -17,22 +17,9 @@
.ddeploy
:
.ddeploy
:
stage
:
build
stage
:
build
variables
:
variables
:
DOCKER_BASE_REGISTRY
:
tecnalia-robotics-docker.artifact.tecnalia.com
DOCKER_PUSH_REGISTRY
:
${ARTIFACT_DOCKER_URL}
DOCKER_BASE_USER
:
${ARTIFACT_CI_USER}
DOCKER_BASE_TOKEN
:
${ARTIFACT_CI_TOKEN}
DOCKER_BASE_NAME
:
flexbotics-base-devel
DOCKER_BASE_TAG
:
${ROS_DISTRO}
DOCKER_PUSH_REGISTRY
:
tecnalia-robotics-docker.artifact.tecnalia.com
DOCKER_PUSH_USER
:
${ARTIFACT_CI_USER}
DOCKER_PUSH_TOKEN
:
${ARTIFACT_CI_TOKEN}
DOCKER_PUSH_NAME
:
${CI_PROJECT_NAME}
DOCKER_PUSH_NAME
:
${CI_PROJECT_NAME}
DOCKER_PUSH_TAG
:
${CI_COMMIT_REF_SLUG}
DOCKER_PUSH_TAG
:
${CI_COMMIT_REF_SLUG}
DDEPLOY_SOURCE
:
.
DDEPLOY_EXTRA_SOURCE
:
/tmp/empty.rosinstall
DDEPLOY_BEFORE_SCRIPT
:
"
"
DDEPLOY_AFTER_SCRIPT
:
"
"
DDEPLOY_CMD
:
"
$${SHELL}"
DDEPLOY_EXTRA_ARGS
:
"
"
before_script
:
before_script
:
-
docker info
-
docker info
-
apk add --update python3 git py3-pip git-lfs
-
apk add --update python3 git py3-pip git-lfs
...
@@ -49,22 +36,15 @@
...
@@ -49,22 +36,15 @@
-
echo https://$ARTIFACT_CI_USER:$ARTIFACT_CI_TOKEN@artifact.tecnalia.com > ~/.git-credentials
-
echo https://$ARTIFACT_CI_USER:$ARTIFACT_CI_TOKEN@artifact.tecnalia.com > ~/.git-credentials
# install ddeploy
# install ddeploy
-
pip install git+ssh://git@git.code.tecnalia.com/tecnalia_robotics/flexbotics/flexbotics_utils/ddeploy.git
-
pip install git+ssh://git@git.code.tecnalia.com/tecnalia_robotics/flexbotics/flexbotics_utils/ddeploy.git
-
docker login ${
DOCKER_BASE_REGISTRY} -u ${DOCKER_BASE
_USER} -p ${
DOCKER_BASE
_TOKEN}
-
docker login ${
ARTIFACT_DOCKER_URL} -u ${ARTIFACT_CI
_USER} -p ${
ARTIFACT_CI
_TOKEN}
script
:
script
:
-
echo "[]" > /tmp/empty.rosinstall
# Run ddeploy
-
>-
-
ddeploy --yaml ${DDEPLOY_YAML}
ddeploy
# Get ID of image created by ddeploy
--project-sources ${DDEPLOY_SOURCE}
-
DOCKER_ID=$$(docker images --format='{{.ID}}' | head -1)
--project-sources ${DDEPLOY_EXTRA_SOURCE}
# Tag and push
--project-name ${DOCKER_PUSH_NAME}
-
docker tag $${DOCKER_ID} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}
--ros-distro ${ROS_DISTRO}
--image-name ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}
--base-image ${DOCKER_BASE_REGISTRY}/${DOCKER_BASE_NAME}:${DOCKER_BASE_TAG}
--before-script "${DDEPLOY_BEFORE_SCRIPT}"
--after-script "${DDEPLOY_AFTER_SCRIPT}"
--cmd "${DDEPLOY_CMD}"
${DDEPLOY_EXTRA_ARGS}
-
docker tag ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:latest
-
docker login ${DOCKER_PUSH_REGISTRY} -u ${DOCKER_PUSH_USER} -p ${DOCKER_PUSH_TOKEN}
-
docker push ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}
-
docker push ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}
# Tag and push latest
-
docker tag $${DOCKER_ID} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:latest
-
docker push ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:latest
-
docker push ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:latest
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment