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 (113)
Showing
with 389 additions and 247 deletions
shellcheck:
image: tecnalia-docker-dev.artifact.tecnalia.com/koalaman/shellcheck-alpine
script: shellcheck deploy/base/ros_entrypoint.bash scripts/*sh
image: tecnalia-docker-dev.artifact.tecnalia.dev/koalaman/shellcheck-alpine
script: shellcheck scripts/*sh
tags:
- docker
# The ignored rules in hadolint checks are
# DL3006 Always tag the version of an image explicitly
# One of the Dockerfiles uses a temporary image which isn't important to tag
# and the other uses a tagged image through an ARG, which apparently is not
# properly recognized.
# DL3008 Pin versions in apt-get install
# A bit overkill
dockerfiles:
image: tecnalia-docker-dev.artifact.tecnalia.com/hadolint/hadolint:latest-debian
script:
- RET=0
- hadolint --ignore DL3006 --ignore DL3008 --ignore DL3059 deploy/base/Dockerfile || RET=1
- hadolint --ignore DL3006 --ignore DL3008 --ignore DL3059 deploy/dev/Dockerfile || RET=1
- exit $RET
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
......@@ -36,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
......@@ -9,11 +9,3 @@ include::ci-templates/README.adoc[leveloffset=+1]
== Custom `rosdep` definitions
Custom `rosdep` definitions for the packages hosted in our internal debian repository are declared in link:rosdistro/rosdep_tecnalia.yaml[].
== Deployment image build resources
Resources required for building the deployment docker images are also hosted in this repository.
This basically boils down to:
- link:scripts/pre-deploy-cleanup.bash[] is run in the `.industrial_ci_deploy` template before commiting to an image
- link:deploy/Dockerfile[] is used to perform some additional cleanup and install link:deploy/ros_entrypoint.bash[] as entrypoint script on top of the `industrial_ci` image
......@@ -17,18 +17,20 @@ The Core pipeline, defined in link:ci-templates/core.yml[], has the following st
** If the package has `.rosinstall` dependencies, they can be installed using the variable `UPSTREAM_WORKSPACE`
** 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.
* `.industrial_ci_deploy` template, which:
** Runs `industrial_ci` by extending `.industrial_ci`
** Runs some cleanup in the `industrial_ci` context (e.g. delete sources)
** Commits image used by `industrial_ci`
** Builds deployment image on top of it and push it to our registry
- Stage: `deploy`
* `.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.
*** Tag `${COMMIT_SHA}` (hash of commit)
*** Tag `${CI_COMMIT_REF_NAME}` (branch or tag name)
*** Tag `latest` only on the default branch
- Stage: `.post`
* Check `bash`/`sh` script syntax
* Check Markdown and AsciiDoc syntax
* Check files have no trailing whitespace and are `UTF-8` encoded
* Check that `C++` files follow this link:clang-format[]
It is important to note that both templates set the variable `GIT_LFS_SKIP_SMUDGE`, which means that when the repositories are cloned/fetched, the files hosted using Git LFS will not be downloaded. An example on how to explicitely fetch the files from LFS can be found in the https://git.code.tecnalia.com/tecnalia_robotics/common_config/blob/e93dbe6379d94e6a895a33c59bf17ccab26eacf9/.gitlab-ci.yml#L132[common_config repository].
== Manual Jobs
......@@ -52,3 +54,11 @@ The auto rules also allow for using variables to explicitely activate each job:
```yml
include::examples/build_vars.yml[]
```
If a `ddeploy.yaml` file exists, the auto-rules will add a job extending the `.ddeploy` template defined
== LFS
By default, lfs files are not downloaded. If you need to add LFS, include the link:ci-templates/lfs-pull.yml[] along with anything else:
```yml
include::examples/include_lfs.yml[]
```
\ No newline at end of file
include: ci-templates/auto-rules/no-default.yml
variables:
DEFAULT_DISTRO: humble
include: ci-templates/auto-rules/no-default.yml
variables:
DEFAULT_DISTRO: jazzy
......@@ -2,40 +2,29 @@ include: ci-templates/core.yml
workflow:
rules:
- if: $CI_COMMIT_BRANCH && $CI_COMMIT_REF_NAME =~ /^kinetic-.*/
- if: $CI_COMMIT_REF_NAME =~ /^kinetic-.*/
variables:
DEFAULT_DISTRO: "kinetic"
- if: $CI_COMMIT_BRANCH && $CI_COMMIT_REF_NAME =~ /^melodic-.*/
- if: $CI_COMMIT_REF_NAME =~ /^melodic-.*/
variables:
DEFAULT_DISTRO: "melodic"
- if: $CI_COMMIT_BRANCH && $CI_COMMIT_REF_NAME =~ /^noetic-.*/
- if: $CI_COMMIT_REF_NAME =~ /^noetic-.*/
variables:
DEFAULT_DISTRO: "noetic"
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_NAME =~ /^kinetic-.*/
- if: $CI_COMMIT_REF_NAME =~ /^humble-.*/
variables:
DEFAULT_DISTRO: "kinetic"
DEPLOY: "true"
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_NAME =~ /^melodic-.*/
variables:
DEFAULT_DISTRO: "melodic"
DEPLOY: "true"
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_NAME =~ /^noetic-.*/
DEFAULT_DISTRO: "humble"
- if: $CI_COMMIT_REF_NAME =~ /^jazzy-.*/
variables:
DEFAULT_DISTRO: "noetic"
DEPLOY: "true"
DEFAULT_DISTRO: "jazzy"
- if: $CI_COMMIT_TAG
variables:
DEPLOY: "true"
- if: $CI_COMMIT_BRANCH
industrial_ci_kinetic:
extends: .industrial_ci
variables:
ROS_DISTRO: kinetic
rules:
- if: $DEPLOY
when: never
- if: $DEFAULT_DISTRO == "kinetic"
- if: $BUILD_KINETIC
......@@ -44,8 +33,6 @@ industrial_ci_melodic:
variables:
ROS_DISTRO: melodic
rules:
- if: $DEPLOY
when: never
- if: $DEFAULT_DISTRO == "melodic"
- if: $BUILD_MELODIC
......@@ -54,32 +41,79 @@ industrial_ci_noetic:
variables:
ROS_DISTRO: noetic
rules:
- if: $DEPLOY
when: never
- 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
industrial_kinetic_deploy:
extends:
- industrial_ci_kinetic
- .industrial_ci_deploy
industrial_ci_jazzy:
extends: .industrial_ci
variables:
ROS_DISTRO: jazzy
rules:
- if: $DEPLOY && $DEFAULT_DISTRO == "kinetic"
- if: $DEPLOY && $BUILD_KINETIC
- if: $DEFAULT_DISTRO == "jazzy"
- if: $BUILD_JAZZY
industrial_melodic_deploy:
.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:
- industrial_ci_melodic
- .industrial_ci_deploy
- .py3_rules
- .py3-flake8_extended
py3-security:
extends:
- .py3_rules
- .py3-security
.py2_rules:
rules:
- if: $DEPLOY && $DEFAULT_DISTRO == "melodic"
- if: $DEPLOY && $BUILD_MELODIC
- if: $DEFAULT_DISTRO == "kinetic"
when: always
- if: $BUILD_KINETIC
when: always
- if: $DEFAULT_DISTRO == "melodic"
when: always
- if: $BUILD_MELODIC
when: always
industrial_noetic_deploy:
py2-flake8:
extends:
- industrial_ci_noetic
- .industrial_ci_deploy
- .py2_rules
- .py2-flake8
ddeploy:
extends: .ddeploy
rules:
- if: $DEPLOY && $DEFAULT_DISTRO == "noetic"
- if: $DEPLOY && $BUILD_NOETIC
- if: $CI_COMMIT_TAG
exists:
- ddeploy.yaml
when: always
- exists:
- ddeploy.yaml
when: manual
allow_failure: true
include: ci-templates/auto-rules/with-rosinstall/no-default.yml
variables:
DEFAULT_DISTRO: humble
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:
......@@ -10,19 +10,14 @@ variables:
TMPDIR: /builds/${CI_PROJECT_NAMESPACE}
GIT_LFS_SKIP_SMUDGE: 1 # Avoid fetching the files from LFS when doing git fetch
services:
- name: tecnalia-docker-dev.artifact.tecnalia.com/docker:dind
alias: docker
stages:
- build
before_script:
- apk add --update bash coreutils tar wget
- docker login tecnalia-docker-dev.artifact.tecnalia.com -u ${ARTIFACT_CI_USER} -p ${ARTIFACT_CI_TOKEN}
- deploy
include:
- ci-templates/syntax-check.yml
- ci-templates/python.yml
- ci-templates/industrial-ci-templates.yml
default:
......
include:
- project: tecnalia_robotics-public/gitlab_templates
file:
- ci-templates/auto-rules/kinetic-default.yml
- ci-templates/lfs-pull.yml
......@@ -3,7 +3,7 @@ include:
file: ci-templates/core.yml
industrial_ci_kinetic:
extends: .industrial-ci
extends: .industrial_ci
variables:
ROS_DISTRO: kinetic
UPSTREAM_WORKSPACE: .rosinstall
variables:
GITLAB_TEMPLATES_BRANCH: master
.industrial_ci:
stage: build
services:
- 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/master/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
.industrial_ci_deploy:
extends: .industrial_ci
.ddeploy:
stage: deploy
services:
- name: tecnalia-docker-dev.artifact.tecnalia.dev/docker:dind
alias: docker
variables:
AFTER_SCRIPT: "wget -q -O - https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/master/scripts/pre-deploy-cleanup.bash | bash"
DOCKER_COMMIT: industrial_ci_image
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
# forward the SSH authentication into the Docker executor
- "which ssh-agent || ( apk update && apk add openssh-client )"
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- echo "$SSH_SERVER_HOSTKEYS" > ~/.ssh/known_hosts
- chmod 700 ~/.ssh
# setup LFS authentication
- git lfs install
- git config --global credential.helper store
- 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 --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:
- .ci_config/gitlab.sh
- cd $(mktemp -d)
- wget https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/-/archive/master/gitlab_templates-master.zip
- unzip gitlab_templates-master.zip && cd gitlab_templates-master/deploy
- cd base
- chmod a+x ros_entrypoint.bash
- docker build -t ${ARTIFACT_DOCKER_URL}/${CI_PROJECT_NAME}:${CI_COMMIT_REF_NAME} .
- docker push ${ARTIFACT_DOCKER_URL}/${CI_PROJECT_NAME}:${CI_COMMIT_REF_NAME}
- cd ..
- cd dev
- docker build --build-arg APPLICATION_IMAGE=${ARTIFACT_DOCKER_URL}/${CI_PROJECT_NAME}:${CI_COMMIT_REF_NAME} -t ${ARTIFACT_DOCKER_URL}/${CI_PROJECT_NAME}:${CI_COMMIT_REF_NAME}-dev .
- docker push ${ARTIFACT_DOCKER_URL}/${CI_PROJECT_NAME}:${CI_COMMIT_REF_NAME}-dev
- cd ..
# Run ddeploy
- 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.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}
- 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 ${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 ${DDEPLOY_IMAGE_NAME} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:latest &&
docker push ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:latest;
fi
rules:
- if: $DEPLOY
- if: $CI_COMMIT_TAG
when: always
- when: manual
allow_failure: true
.lfs-pull-script: &lfs-pull-script
"find $$current_ws -type f -name .lfsconfig -execdir git lfs pull \\; ;\
find $$current_ws -type f -name .lfsconfig -execdir git lfs ls-files \\; ;"
.industrial_ci:
variables:
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.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
variables:
GITLAB_TEMPLATES_BRANCH: master
##########################################################
## Check formating of C and C++ files using clang-format
##########################################################
clang_format:
stage: .post
services:
- 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/master/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:
before_script:
- apk add --update python2
stage: build
script: python -m compileall -q .
CLANG_FORMAT_VERSION: 10
when: always
##########################################################
......@@ -50,7 +44,9 @@ bash_syntax:
##########################################################
markdown_syntax:
stage: .post
script: docker run -v ${PWD}:/ac tecnalia-docker-dev.artifact.tecnalia.com/cytopia/awesome-ci syntax-markdown --path=/ac --extension=md --ignore=.ci_config --custom="-r ~MD013,~MD014"
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
##########################################################
......@@ -61,10 +57,11 @@ markdown_syntax:
##########################################################
file_syntax:
stage: .post
image: tecnalia-docker-dev.artifact.tecnalia.dev/cytopia/awesome-ci
script:
- RET=0
- docker run -v ${PWD}:/ac tecnalia-docker-dev.artifact.tecnalia.com/cytopia/awesome-ci file-trailing-space --path=/ac --extension=py,txt,cpp,h,md,sh,bash,xml,launch --ignore=.ci_config || RET=1
- docker run -v ${PWD}:/ac tecnalia-docker-dev.artifact.tecnalia.com/cytopia/awesome-ci file-utf8 --path=/ac --extension=py,txt,cpp,h,md,sh,bash,xml,launch --ignore=.ci_config || RET=1
- file-trailing-space --path=${PWD} --extension=py,txt,cpp,h,md,sh,bash,xml,launch --ignore=.ci_config || RET=1
- file-utf8 --path=${PWD} --extension=py,txt,cpp,h,md,sh,bash,xml,launch --ignore=.ci_config || RET=1
- exit $RET
when: always
......@@ -75,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/master/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
......
FROM industrial_ci_image
RUN rm -rf /root/ici /root/src
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
ros-kinetic-rosbash \
&& rm -rf /var/lib/apt/lists/*
COPY ./ros_entrypoint.bash /
ENTRYPOINT ["/ros_entrypoint.bash"]
CMD ["bash"]
#!/bin/bash
set -e
# setup application environment
# shellcheck disable=SC1091
source "/root/target_ws/install/setup.bash"
exec "$@"
ARG APPLICATION_IMAGE
FROM ${APPLICATION_IMAGE}
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
apt-transport-https \
curl \
libasound2 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg \
&& mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg \
&& sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
code \
&& rm -rf /var/lib/apt/lists/*
RUN echo "alias code='code --user-data-dir /root'" >> /root/.bashrc
RUN code --user-data-dir /root \
--install-extension ms-iot.vscode-ros \
--install-extension joaompinto.asciidoctor-vscode \
--install-extension ms-python.python \
--install-extension ms-vscode.cpptools \
--install-extension ms-azuretools.vscode-docker \
--install-extension twxs.cmake
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]
phoxicontrol:
ubuntu:
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]
zivid_telicam_driver:
ubuntu: [zivid-telicam-driver]
zivid_camera:
ubuntu: [ros-kinetic-zivid-camera]
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]