Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • miguel.prada/gitlab_templates
  • tecnalia_robotics-public/gitlab_templates
2 results
Show changes
Commits on Source (18)
include: ci-templates/auto-rules/no-default.yml
variables:
DEFAULT_DISTRO: humble
......@@ -11,6 +11,9 @@ workflow:
- if: $CI_COMMIT_REF_NAME =~ /^noetic-.*/
variables:
DEFAULT_DISTRO: "noetic"
- if: $CI_COMMIT_REF_NAME =~ /^humble-.*/
variables:
DEFAULT_DISTRO: "humble"
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH
......@@ -38,6 +41,14 @@ industrial_ci_noetic:
- if: $DEFAULT_DISTRO == "noetic"
- if: $BUILD_NOETIC
industrial_ci_humble:
extends: .industrial_ci
variables:
ROS_DISTRO: humble
rules:
- if: $DEFAULT_DISTRO == "humble"
- if: $BUILD_HUMBLE
ddeploy:
extends: .ddeploy
rules:
......
include: ci-templates/auto-rules/with-rosinstall/no-default.yml
variables:
DEFAULT_DISTRO: humble
variables:
GITLAB_TEMPLATES_BRANCH: master
.industrial_ci:
stage: build
before_script:
......@@ -10,7 +13,7 @@
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"
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
......@@ -35,27 +38,27 @@
- git config --global credential.helper store
- echo https://$ARTIFACT_CI_USER:$ARTIFACT_CI_TOKEN@artifact.tecnalia.com > ~/.git-credentials
# install ddeploy
- pip install git+ssh://git@git.code.tecnalia.com/tecnalia_robotics/flexbotics/flexbotics_utils/ddeploy.git@v0.1.0
- pip install git+ssh://git@git.code.tecnalia.com/tecnalia_robotics/flexbotics/flexbotics_utils/ddeploy.git@v0.2.0
- docker login ${ARTIFACT_DOCKER_URL} -u ${ARTIFACT_CI_USER} -p ${ARTIFACT_CI_TOKEN}
script:
# Run ddeploy
- ddeploy --yaml ${DDEPLOY_YAML}
# 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}
# Get the full name of the most recently built image
- 'DDEPLOY_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 -- ${DDEPLOY_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 ${DOCKER_ID} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}
- docker tag ${DDEPLOY_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 ${DOCKER_ID} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${CI_COMMIT_SHA}
- docker tag ${DDEPLOY_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 ${DOCKER_ID} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:latest &&
docker tag ${DDEPLOY_IMAGE_NAME} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:latest &&
docker push ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:latest;
fi
rules:
......
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
......@@ -14,6 +14,7 @@ peak:
phoxicontrol:
ubuntu:
bionic: [phoxicontrol]
focal: [phoxicontrol]
robotnik_base_hw_lib:
ubuntu: [ros-kinetic-robotnik-base-hw-lib]
......