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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tecnalia_robotics-public
templates
Commits
0e06ecd2
Commit
0e06ecd2
authored
1 year ago
by
Prada Sarasola, Miguel
Browse files
Options
Downloads
Plain Diff
Merge branch '52-ddeploy-job-failing-when-enforcing-labels-alt' into 'master'
Resolve "Ddeploy job failing when enforcing labels" Closes
#52
See merge request
!84
parents
5f6e2f7c
dcfb9f91
No related branches found
No related tags found
2 merge requests
!84
Resolve "Ddeploy job failing when enforcing labels"
,
!83
Resolve "Ddeploy job failing when enforcing labels"
Pipeline
#123924
passed
1 year ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ci-templates/industrial-ci-templates.yml
+12
-7
12 additions, 7 deletions
ci-templates/industrial-ci-templates.yml
ci-templates/syntax-check.yml
+5
-3
5 additions, 3 deletions
ci-templates/syntax-check.yml
with
17 additions
and
10 deletions
ci-templates/industrial-ci-templates.yml
+
12
−
7
View file @
0e06ecd2
variables
:
GITLAB_TEMPLATES_BRANCH
:
master
.industrial_ci
:
stage
:
build
before_script
:
...
...
@@ -10,7 +13,8 @@
DOCKER_IMAGE
:
"
${ARTIFACT_DOCKER_URL}/flexbotics-base-devel:${ROS_DISTRO}"
ADDITIONAL_DEBS
:
curl
PARALLEL_BUILDS
:
2
# keep this for now, since there seems to be memory limit issues in the ci VM
AFTER_SETUP_TARGET_WORKSPACE
:
"
rosenv
&&
bash
<(curl
-Ls
https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/master/scripts/ci_run_entry_points.sh)
$$current_ws"
GITLAB_TEMPLATES_BRANCH
:
master
AFTER_SETUP_TARGET_WORKSPACE
:
"
rosenv
&&
bash
<(curl
-Ls
https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/${GITLAB_TEMPLATES_BRANCH}/scripts/ci_run_entry_points.sh)
$$current_ws"
CMAKE_ARGS
:
-DCMAKE_CXX_FLAGS=-Wno-ignored-attributes -Wno-int-in-bool-context
...
...
@@ -21,6 +25,7 @@
DOCKER_PUSH_NAME
:
${CI_PROJECT_PATH}
DOCKER_PUSH_TAG
:
${CI_COMMIT_REF_NAME}
DDEPLOY_YAML
:
ddeploy.yaml
GITLAB_TEMPLATES_BRANCH
:
master
before_script
:
-
apk add --update python3 git py3-pip git-lfs bash curl jq
# forward the SSH authentication into the Docker executor
...
...
@@ -40,22 +45,22 @@
script
:
# Run ddeploy
-
ddeploy --yaml ${DDEPLOY_YAML}
# Get
ID of image created by ddeploy
-
'
D
OCKER_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 -- ${D
OCKER_ID
}
# Get
the full name of the most recently built image
-
'
D
DEPLOY_IMAGE_NAME
=$(docker
images
--format="{{.
Repository}}:{{.Tag
}}"
|
head
-1)'
-
curl -Ls https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/
${GITLAB_TEMPLATES_BRANCH}
/scripts/enforce_labels.bash | bash -s -- ${D
DEPLOY_IMAGE_NAME
}
# Tag and push with the branch or tag name.
-
echo "Pushing to ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}"
-
docker tag ${D
OCKER_ID
} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}
-
docker tag ${D
DEPLOY_IMAGE_NAME
} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}
-
docker push ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}
# Tag and push with commit sha
-
echo "Pushing to ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${CI_COMMIT_SHA}"
-
docker tag ${D
OCKER_ID
} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${CI_COMMIT_SHA}
-
docker tag ${D
DEPLOY_IMAGE_NAME
} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${CI_COMMIT_SHA}
-
docker push ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${CI_COMMIT_SHA}
# Tag and push with latest only if it's on the default branch
-
>
if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
echo "Pushing to ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:latest"
docker tag ${D
OCKER_ID
} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:latest &&
docker tag ${D
DEPLOY_IMAGE_NAME
} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:latest &&
docker push ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:latest;
fi
rules
:
...
...
This diff is collapsed.
Click to expand it.
ci-templates/syntax-check.yml
+
5
−
3
View file @
0e06ecd2
variables
:
GITLAB_TEMPLATES_BRANCH
:
master
##########################################################
## Check formating of C and C++ files using clang-format
##########################################################
clang_format
:
stage
:
.post
before_script
:
-
apk add --update bash coreutils tar wget
-
git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci.git .ci_config -b legacy
-
wget https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/
master
/clang-format -O .clang-format
-
wget https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/
${GITLAB_TEMPLATES_BRANCH}
/clang-format -O .clang-format
script
:
.ci_config/gitlab.sh
variables
:
ROS_DISTRO
:
kinetic
...
...
@@ -80,5 +82,5 @@ adoc_syntax:
before_script
:
-
apk add --update curl asciidoctor bash
script
:
-
curl -Ls https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/
master
/scripts/asciidoctor_syntax_check.bash | bash -s -- .
-
curl -Ls https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/
${GITLAB_TEMPLATES_BRANCH}
/scripts/asciidoctor_syntax_check.bash | bash -s -- .
when
:
always
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