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 (58)
Showing with 290 additions and 116 deletions
shellcheck:
image: tecnalia-docker-dev.artifact.tecnalia.com/koalaman/shellcheck-alpine
image: tecnalia-docker-dev.artifact.tecnalia.dev/koalaman/shellcheck-alpine
script: shellcheck scripts/*sh
tags:
- docker
yamllint:
image: tecnalia-docker-dev.artifact.tecnalia.com/sdesbure/yamllint
image: tecnalia-docker-dev.artifact.tecnalia.dev/sdesbure/yamllint
script: yamllint $(find . -name '*.yml' -o -name '*.yaml')
tags:
- docker
......@@ -20,3 +20,30 @@ deploy_devcontainer:
expire_in: 1 year
tags:
- docker
.simple_ros_test:
variables:
TEMPLATES_PIPELINE_REF: $CI_COMMIT_REF_NAME
trigger:
project: tecnalia_robotics/ci_test_repos/simple_ros_test
strategy: depend
simple_ros_melodic_test:
extends: .simple_ros_test
variables:
TEMPLATE_TO_USE: ci-templates/auto-rules/melodic-default.yml
simple_ros_noetic_test:
extends: .simple_ros_test
variables:
TEMPLATE_TO_USE: ci-templates/auto-rules/noetic-default.yml
simple_ros_core_with_noetic_test:
extends: .simple_ros_test
variables:
TEMPLATE_TO_USE: test/core_with_noetic.yml
simple_ros_auto_rules_melodic_noetic_test:
extends: .simple_ros_test
variables:
TEMPLATE_TO_USE: test/auto_rules_melodic_noetic.yml
......@@ -18,7 +18,7 @@ The Core pipeline, defined in link:ci-templates/core.yml[], has the following st
** Uses `flexbotics-base-devel:${ROS_DISTRO}` as a starting image
** Runs link:scripts/ci_run_entry_points.sh[] in the `AFTER_SETUP_TARGET_WORKSPACE` stage, which in turn finds and runs every `ci_entry_script.bash` script found in the target repo.
- Stage: `deploy`
* `.ddeploy` template (see https://git.code.tecnalia.com/tecnalia_robotics/flexbotics/flexbotics_utils/ddeploy[the ddeploy repo]), which:
* `.ddeploy` template (see https://git.code.tecnalia.dev/tecnalia_robotics/flexbotics/flexbotics_utils/ddeploy[the ddeploy repo]), which:
** Is run automatically for tags, but can also be run manually on normal commits
** Calls `ddeploy` to generate the docker image
** Renames the image created by ddeploy with different tags and pushes them to the registry.
......
include: ci-templates/auto-rules/no-default.yml
variables:
DEFAULT_DISTRO: jazzy
......@@ -14,6 +14,9 @@ workflow:
- if: $CI_COMMIT_REF_NAME =~ /^humble-.*/
variables:
DEFAULT_DISTRO: "humble"
- if: $CI_COMMIT_REF_NAME =~ /^jazzy-.*/
variables:
DEFAULT_DISTRO: "jazzy"
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH
......@@ -49,6 +52,60 @@ industrial_ci_humble:
- if: $DEFAULT_DISTRO == "humble"
- if: $BUILD_HUMBLE
industrial_ci_jazzy:
extends: .industrial_ci
variables:
ROS_DISTRO: jazzy
rules:
- if: $DEFAULT_DISTRO == "jazzy"
- if: $BUILD_JAZZY
.py3_rules:
rules:
- if: $DEFAULT_DISTRO == "noetic"
when: always
- if: $BUILD_NOETIC
when: always
- if: $DEFAULT_DISTRO == "humble"
when: always
- if: $BUILD_HUMBLE
when: always
- if: $DEFAULT_DISTRO == "jazzy"
when: always
- if: $BUILD_JAZZY
when: always
py3-flake8:
extends:
- .py3_rules
- .py3-flake8
py3-flake8_extended:
extends:
- .py3_rules
- .py3-flake8_extended
py3-security:
extends:
- .py3_rules
- .py3-security
.py2_rules:
rules:
- if: $DEFAULT_DISTRO == "kinetic"
when: always
- if: $BUILD_KINETIC
when: always
- if: $DEFAULT_DISTRO == "melodic"
when: always
- if: $BUILD_MELODIC
when: always
py2-flake8:
extends:
- .py2_rules
- .py2-flake8
ddeploy:
extends: .ddeploy
rules:
......
include: ci-templates/auto-rules/with-rosinstall/no-default.yml
variables:
DEFAULT_DISTRO: jazzy
image: tecnalia-docker-dev.artifact.tecnalia.com/docker:git
image: tecnalia-docker-dev.artifact.tecnalia.dev/docker:git
workflow:
......@@ -17,6 +17,7 @@ stages:
include:
- ci-templates/syntax-check.yml
- ci-templates/python.yml
- ci-templates/industrial-ci-templates.yml
default:
......
......@@ -4,31 +4,33 @@ variables:
.industrial_ci:
stage: build
services:
- name: tecnalia-docker-dev.artifact.tecnalia.com/docker:dind
- name: tecnalia-docker-dev.artifact.tecnalia.dev/docker:dind
alias: docker
before_script:
- apk add --update bash coreutils tar
- git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci.git .ci_config
- docker login ${ARTIFACT_DOCKER_URL} -u ${ARTIFACT_CI_USER} -p ${ARTIFACT_CI_TOKEN}
- docker login tecnalia-docker-dev.artifact.tecnalia.com -u ${ARTIFACT_CI_USER} -p ${ARTIFACT_CI_TOKEN}
- docker login tecnalia-docker-dev.artifact.tecnalia.dev -u ${ARTIFACT_CI_USER} -p ${ARTIFACT_CI_TOKEN}
script: .ci_config/gitlab.sh
variables:
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/${GITLAB_TEMPLATES_BRANCH}/scripts/ci_run_entry_points.sh) $$current_ws"
CMAKE_ARGS: -DCMAKE_CXX_FLAGS=-Wno-ignored-attributes -Wno-int-in-bool-context
AFTER_SETUP_TARGET_WORKSPACE: "rosenv && bash <(curl -Ls https://git.code.tecnalia.dev/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 -Wno-dev
.ddeploy:
stage: deploy
services:
- name: tecnalia-docker-dev.artifact.tecnalia.com/docker:dind
- name: tecnalia-docker-dev.artifact.tecnalia.dev/docker:dind
alias: docker
variables:
DOCKER_PUSH_REGISTRY: ${ARTIFACT_DOCKER_URL}
DOCKER_PUSH_NAME: ${CI_PROJECT_PATH}
DOCKER_PUSH_TAG: ${CI_COMMIT_REF_NAME}
DOCKER_PUSH_USER: ${ARTIFACT_CI_USER}
DOCKER_PUSH_TOKEN: ${ARTIFACT_CI_TOKEN}
DDEPLOY_YAML: ddeploy.yaml
before_script:
- apk add --update python3 git py3-pip git-lfs bash curl jq
......@@ -42,17 +44,21 @@ variables:
# setup LFS authentication
- git lfs install
- git config --global credential.helper store
- echo https://$ARTIFACT_CI_USER:$ARTIFACT_CI_TOKEN@artifact.tecnalia.com > ~/.git-credentials
- echo https://$ARTIFACT_CI_USER:$ARTIFACT_CI_TOKEN@artifact.tecnalia.dev > ~/.git-credentials
- find . -type f -name .lfsconfig -exec sh -c 'cd "$(dirname "{}")" && git lfs pull' \;
- find . -type f -name .lfsconfig -exec sh -c 'cd "$(dirname "{}")" && git lfs ls-files' \;
# install ddeploy
- pip install git+ssh://git@git.code.tecnalia.com/tecnalia_robotics/flexbotics/flexbotics_utils/ddeploy.git@v0.2.0
- echo "Logging into docker registry ${DOCKER_PUSH_REGISTRY} for user ${ARTIFACT_CI_USER}"
- docker login ${DOCKER_PUSH_REGISTRY} -u ${ARTIFACT_CI_USER} -p ${ARTIFACT_CI_TOKEN}
- pip install --break-system-packages git+ssh://git@git.code.tecnalia.dev/tecnalia_robotics/flexbotics/flexbotics_utils/ddeploy.git@v0.2.0
- echo "Logging into docker registry ${ARTIFACT_DOCKER_URL} for user ${ARTIFACT_CI_USER}"
- docker login ${ARTIFACT_DOCKER_URL} -u ${ARTIFACT_CI_USER} -p ${ARTIFACT_CI_TOKEN}
- echo "Logging into docker registry ${DOCKER_PUSH_REGISTRY} for user ${DOCKER_PUSH_USER}"
- docker login ${DOCKER_PUSH_REGISTRY} -u ${DOCKER_PUSH_USER} -p ${DOCKER_PUSH_TOKEN}
script:
# Run ddeploy
- ddeploy --yaml ${DDEPLOY_YAML}
- GIT_LFS_SKIP_SMUDGE=0 ddeploy --yaml ${DDEPLOY_YAML}
# 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}
- curl -Ls https://git.code.tecnalia.dev/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 ${DDEPLOY_IMAGE_NAME} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}
......
......@@ -7,7 +7,7 @@
AFTER_INIT: "bash <(curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh);\
apt install -qq -y git-lfs; \
git config --global credential.helper store; \
echo https://$ARTIFACT_CI_USER:$ARTIFACT_CI_TOKEN@artifact.tecnalia.com > ~/.git-credentials ;"
echo https://$ARTIFACT_CI_USER:$ARTIFACT_CI_TOKEN@artifact.tecnalia.dev > ~/.git-credentials ;"
BEFORE_INSTALL_UPSTREAM_DEPENDENCIES: *lfs-pull-script
BEFORE_INSTALL_TARGET_DEPENDENCIES: *lfs-pull-script
BEFORE_INSTALL_DOWNSTREAM_DEPENDENCIES: *lfs-pull-script
.flake8_template:
stage: build
before_script: ${PYTHON_VERSION} -m pip -q install flake8
script:
- find . -type f -executable ! -name "*.*" -exec awk ' /^#!.*python/{print FILENAME} {nextfile}' {} + > /tmp/python_files # python files with no extension but with shebang
- find . -type f -name "*.py" >> /tmp/python_files
- sort /tmp/python_files | uniq | xargs ${PYTHON_VERSION} -m flake8 --max-line-length 120 --statistics --show-source
.flake8_extended_template:
extends: .flake8_template
stage: .post
before_script:
- ${PYTHON_VERSION} -m pip install flake8 flake8-isort flake8-builtins flake8-eradicate flake8-functions-names flake8-return flake8-functions
allow_failure: true
.security_template:
stage: .post
before_script:
- ${PYTHON_VERSION} -m pip install bandit
script:
- bandit -r .
allow_failure: true
.py3_template:
image: python:3-alpine
variables:
PYTHON_VERSION: python3
.py2_template:
image: python:2-alpine
variables:
PYTHON_VERSION: python2
.py3-flake8:
extends:
- .flake8_template
- .py3_template
.py2-flake8:
extends:
- .flake8_template
- .py2_template
.py3-flake8_extended:
extends:
- .flake8_extended_template
- .py3_template
.py3-security:
extends:
- .security_template
- .py3_template
......@@ -7,29 +7,17 @@ variables:
clang_format:
stage: .post
services:
- name: tecnalia-docker-dev.artifact.tecnalia.com/docker:dind
- name: tecnalia-docker-dev.artifact.tecnalia.dev/docker:dind
alias: docker
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/${GITLAB_TEMPLATES_BRANCH}/clang-format -O .clang-format
- git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci.git .ci_config
- wget https://git.code.tecnalia.dev/tecnalia_robotics-public/gitlab_templates/raw/${GITLAB_TEMPLATES_BRANCH}/clang-format -O .clang-format
script: .ci_config/gitlab.sh
variables:
ROS_DISTRO: kinetic
ROS_DISTRO: noetic
CLANG_FORMAT_CHECK: file
CLANG_FORMAT_VERSION: "3.8"
when: always
##########################################################
## Simple check for basic Python syntax errors; this is much less thorough than
## other options like pylint, but much faster and less strict
##########################################################
python_syntax:
image: alpine:3.15 # python2 is no longer available in alpine:3.16
before_script:
- apk add --update python2
stage: build
script: python -m compileall -q .
CLANG_FORMAT_VERSION: 10
when: always
##########################################################
......@@ -56,7 +44,7 @@ bash_syntax:
##########################################################
markdown_syntax:
stage: .post
image: tecnalia-docker-dev.artifact.tecnalia.com/cytopia/awesome-ci
image: tecnalia-docker-dev.artifact.tecnalia.dev/cytopia/awesome-ci
script:
- syntax-markdown --path=${PWD} --extension=md --ignore=.ci_config --custom="-r ~MD013,~MD014"
when: always
......@@ -69,7 +57,7 @@ markdown_syntax:
##########################################################
file_syntax:
stage: .post
image: tecnalia-docker-dev.artifact.tecnalia.com/cytopia/awesome-ci
image: tecnalia-docker-dev.artifact.tecnalia.dev/cytopia/awesome-ci
script:
- RET=0
- file-trailing-space --path=${PWD} --extension=py,txt,cpp,h,md,sh,bash,xml,launch --ignore=.ci_config || RET=1
......@@ -84,9 +72,9 @@ file_syntax:
##########################################################
adoc_syntax:
stage: .post
image: tecnalia-docker-dev.artifact.tecnalia.com/alpine
image: tecnalia-docker-dev.artifact.tecnalia.dev/alpine
before_script:
- apk add --update curl asciidoctor bash
script:
- curl -Ls https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/${GITLAB_TEMPLATES_BRANCH}/scripts/asciidoctor_syntax_check.bash | bash -s -- .
- curl -Ls https://git.code.tecnalia.dev/tecnalia_robotics-public/gitlab_templates/raw/${GITLAB_TEMPLATES_BRANCH}/scripts/asciidoctor_syntax_check.bash | bash -s -- .
when: always
---
# Format file from: https://github.com/davetcoleman/roscpp_code_format (bfa4ea78b4ac856da07458c8824bf5eb327ea693)
# Format file from: https://github.com/PickNikRobotics/roscpp_code_format (75a84b075d648828b7aa64094699e5ab5cc7adb7)
BasedOnStyle: Google
AccessModifierOffset: -2
ConstructorInitializerIndentWidth: 2
......@@ -9,9 +9,8 @@ AllowAllParametersOfDeclarationOnNextLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortLoopsOnASingleLine: false
AlwaysBreakTemplateDeclarations: true
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakBeforeMultilineStrings: true
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: true
......
apriltag:
ubuntu:
xenial: [apriltag]
cvkit:
ubuntu:
xenial: [cvkit]
dynamixel:
ubuntu: [libdynamixel-dev]
k4a-tools:
ubuntu:
focal: [k4a-tools]
libhalcon-dev:
ubuntu: [libhalcon-dev]
libk4a1.3:
ubuntu:
focal: [libk4a1.3]
libk4a1.3-dev:
ubuntu:
focal: [libk4a1.3-dev]
libopenvdb_fork_dev:
ubuntu:
focal: [libopenvdb-fork-dev]
libpcl-1.8.1:
ubuntu:
xenial: [libpcl1.8.1]
libsoundio1:
ubuntu: [libsoundio1]
libvdbfusion_dev:
ubuntu:
focal: [libvdbfusion-dev]
open3d-ros-helper-pip:
ubuntu:
pip:
packages: [open3d_ros_helper]
peak:
ubuntu: [libpeak-dev]
......@@ -16,132 +52,116 @@ phoxicontrol:
bionic: [phoxicontrol]
focal: [phoxicontrol]
robotnik_base_hw_lib:
ubuntu: [ros-kinetic-robotnik-base-hw-lib]
telicam-sdk:
ubuntu: [telicam-sdk]
telicam-1.1.0:
ubuntu: [libtelicam-sdk-1.1.0]
zivid:
ubuntu: [zivid]
zivid1.8:
ubuntu: [zivid1.8]
zivid_telicam_driver:
ubuntu: [zivid-telicam-driver]
rc_apps_msgs:
ubuntu:
xenial: [ros-kinetic-rc-apps-msgs]
rccomm_utils:
rc_bagthrottler:
ubuntu:
xenial: [rccomm-utils]
xenial: [ros-kinetic-rc-bagthrottler]
rc_parameter_collection_ros_proxy:
rc_comm_utils:
ubuntu:
xenial: [ros-kinetic-rc-parameter-collection-ros-proxy]
xenial: [ros-kinetic-rc-comm-utils]
rcimage_smoothing:
rc_cv_utils:
ubuntu:
xenial: [rcimage-smoothing]
xenial: [ros-kinetic-rc-cv-utils]
rcimagesync:
rc_diagnostic:
ubuntu:
xenial: [rcimagesync]
xenial: [ros-kinetic-rc-diagnostic]
cvkit:
rc_dynamics_api:
ubuntu:
xenial: [cvkit]
xenial: [ros-kinetic-rc-dynamics-api]
rcconsole:
rc_genicam_api:
ubuntu:
xenial: [rcconsole]
xenial: [ros-kinetic-rc-genicam-api]
rc_imagesync:
ubuntu:
xenial: [ros-kinetic-rc-imagesync]
rcobjectdetection_common:
ubuntu:
xenial: [rcobjectdetection-common]
rcsys_utils:
rc_parameter_collection_ros_proxy:
ubuntu:
xenial: [rcsys-utils]
xenial: [ros-kinetic-rc-parameter-collection-ros-proxy]
rcapps_msgs:
rc_statemachine:
ubuntu:
xenial: [rcapps-msgs]
xenial: [ros-kinetic-rc-statemachine]
rcstatemachine:
rc_visard_driver:
ubuntu:
xenial: [rcstatemachine]
xenial: [ros-kinetic-rc-visard-driver]
rcparameter_collection:
rcapps_msgs:
ubuntu:
xenial: [rcparameter-collection]
xenial: [rcapps-msgs]
rc_tagdetection:
rccomm_utils:
ubuntu:
xenial: [ros-kinetic-rc-tagdetection]
xenial: [rccomm-utils]
rc_comm_utils:
rcconsole:
ubuntu:
xenial: [ros-kinetic-rc-comm-utils]
xenial: [rcconsole]
rcimage:
ubuntu:
xenial: [rcimage]
rc_bagthrottler:
rcimage_smoothing:
ubuntu:
xenial: [ros-kinetic-rc-bagthrottler]
xenial: [rcimage-smoothing]
rc_visard_driver:
rcimagesync:
ubuntu:
xenial: [ros-kinetic-rc-visard-driver]
xenial: [rcimagesync]
rctagdetection:
rcobjectdetection_common:
ubuntu:
xenial: [rctagdetection]
xenial: [rcobjectdetection-common]
rc_objectdetection_shape:
rcobjectdetection_shape_thomas:
ubuntu:
xenial: [ros-kinetic-rc-objectdetection-shape]
xenial: [rcobjectdetection-shape-thomas]
rc_statemachine:
rcobjectrendering:
ubuntu:
xenial: [ros-kinetic-rc-statemachine]
xenial: [rcobjectrendering]
apriltag:
rcparameter_collection:
ubuntu:
xenial: [apriltag]
xenial: [rcparameter-collection]
rc_dynamics_api:
rcstatemachine:
ubuntu:
xenial: [ros-kinetic-rc-dynamics-api]
xenial: [rcstatemachine]
rc_apps_msgs:
rcsys_utils:
ubuntu:
xenial: [ros-kinetic-rc-apps-msgs]
xenial: [rcsys-utils]
rc_genicam_api:
rctagdetection:
ubuntu:
xenial: [ros-kinetic-rc-genicam-api]
xenial: [rctagdetection]
rcobjectrendering:
ubuntu:
xenial: [rcobjectrendering]
robotnik_base_hw_lib:
ubuntu: [ros-kinetic-robotnik-base-hw-lib]
rc_diagnostic:
ubuntu:
xenial: [ros-kinetic-rc-diagnostic]
telicam-1.1.0:
ubuntu: [libtelicam-sdk-1.1.0]
rcobjectdetection_shape_thomas:
ubuntu:
xenial: [rcobjectdetection-shape-thomas]
telicam-sdk:
ubuntu: [telicam-sdk]
rc_cv_utils:
ubuntu:
xenial: [ros-kinetic-rc-cv-utils]
zivid:
ubuntu: [zivid]
zivid1.8:
ubuntu: [zivid1.8]
zivid_telicam_driver:
ubuntu: [zivid-telicam-driver]
include: ci-templates/auto-rules/no-default.yml
variables:
BUILD_MELODIC: 1
BUILD_NOETIC: 1
include: ci-templates/core.yml
industrial_ci_melodic:
extends: .industrial_ci
variables:
ROS_DISTRO: melodic
industrial_ci_noetic:
extends: .industrial_ci
variables:
ROS_DISTRO: noetic
......@@ -3,7 +3,7 @@
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------
FROM tecnalia-robotics-docker.artifact.tecnalia.com/flexbotics-base-devel:kinetic
FROM tecnalia-robotics-docker.artifact.tecnalia.dev/flexbotics-base-devel:kinetic
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
......