...
 
Commits (34)
shellcheck:
image: koalaman/shellcheck-alpine
script: shellcheck deploy/base/ros_entrypoint.bash 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: hadolint/hadolint:latest-debian
script:
- RET=0
- hadolint --ignore DL3006 --ignore DL3008 deploy/base/Dockerfile || RET=1
- hadolint --ignore DL3006 --ignore DL3008 deploy/dev/Dockerfile || RET=1
- exit $RET
tags:
- docker
yamllint:
image: sdesbure/yamllint
script: yamllint $(find . -name '*.yml' -o -name '*.yaml')
tags:
- docker
image: docker:git
variables:
TMPDIR: "/builds/${CI_PROJECT_NAMESPACE}"
GIT_LFS_SKIP_SMUDGE: "1" # Avoid fetching the files from LFS when doing git fetch
TMPDIR: /builds/${CI_PROJECT_NAMESPACE}
GIT_LFS_SKIP_SMUDGE: 1 # Avoid fetching the files from LFS when doing git fetch
services:
- docker:dind
......@@ -15,7 +15,7 @@ stages:
before_script:
- apk add --update bash coreutils tar wget python
.industrial_ci_kinetic:
.industrial_ci:
stage: build
before_script:
- apk add --update bash coreutils tar
......@@ -24,21 +24,38 @@ before_script:
script: .ci_config/gitlab.sh
variables:
ADDITIONAL_DEBS: curl
ROS_DISTRO: kinetic
ROS_PARALLEL_JOBS: "-j2" # keep this for now, since there seems to be memory limit issues in the ci VM
DOCKER_IMAGE: "${ARTIFACT_DOCKER_URL}/flexbotics-base-devel"
BEFORE_SCRIPT: "bash <(curl -Ls https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/master/scripts/ci_run_entry_points.sh) $$CATKIN_WORKSPACE"
CATKIN_CONFIG: '--cmake-args -DCMAKE_CXX_FLAGS=-Wno-ignored-attributes -Wno-int-in-bool-context --'
ROS_PARALLEL_JOBS: -j2 # keep this for now, since there seems to be memory limit issues in the ci VM
BEFORE_SCRIPT: bash <(curl -Ls https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/master/scripts/ci_run_entry_points.sh) $$CATKIN_WORKSPACE
CMAKE_ARGS: -DCMAKE_CXX_FLAGS=-Wno-ignored-attributes -Wno-int-in-bool-context
when: always
tags:
- docker
industrial_ci_kinetic:
extends: .industrial_ci_kinetic
extends: .industrial_ci
variables:
ROS_DISTRO: kinetic
DOCKER_IMAGE: "${ARTIFACT_DOCKER_URL}/flexbotics-base-devel:${ROS_DISTRO}"
except:
- tags
- melodic-devel
industrial_ci_melodic:
extends: .industrial_ci
variables:
ROS_DISTRO: melodic
DOCKER_IMAGE: "${ARTIFACT_DOCKER_URL}/flexbotics-base-devel:${ROS_DISTRO}"
only:
- melodic-devel
except:
- tags
allow_failure: yes
industrial_ci_kinetic_deploy:
extends: .industrial_ci_kinetic
extends: .industrial_ci
variables:
ROS_DISTRO: kinetic
DOCKER_IMAGE: "${ARTIFACT_DOCKER_URL}/flexbotics-base-devel:${ROS_DISTRO}"
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
script:
......@@ -66,6 +83,8 @@ python_syntax:
stage: precheck
script: python -m compileall -q .
when: always
tags:
- docker
##########################################################
## Check for errors in bash/sh scripts
......@@ -80,6 +99,8 @@ bash_syntax:
- exit $RET
allow_failure: yes
when: always
tags:
- docker
##########################################################
## Check for errors in markdown files
......@@ -93,6 +114,8 @@ markdown_syntax:
script: docker run -v ${PWD}:/ac cytopia/awesome-ci syntax-markdown --path=/ac --extension=md --ignore=.ci_config --custom="-r ~MD013"
allow_failure: yes
when: always
tags:
- docker
##########################################################
## Check for various syntax issues in files; currently
......@@ -109,3 +132,5 @@ file_syntax:
- exit $RET
allow_failure: yes
when: always
tags:
- docker
image: docker:git
variables:
TMPDIR: "/builds/${CI_PROJECT_NAMESPACE}"
GIT_LFS_SKIP_SMUDGE: "1" # Avoid fetching the files from LFS when doing git fetch
TMPDIR: /builds/${CI_PROJECT_NAMESPACE}
GIT_LFS_SKIP_SMUDGE: 1 # Avoid fetching the files from LFS when doing git fetch
services:
- docker:dind
......@@ -15,7 +15,7 @@ stages:
before_script:
- apk add --update bash coreutils tar wget python
.industrial_ci_kinetic:
.industrial_ci:
stage: build
before_script:
- apk add --update bash coreutils tar
......@@ -24,23 +24,40 @@ before_script:
script: .ci_config/gitlab.sh
variables:
ADDITIONAL_DEBS: curl
ROS_DISTRO: kinetic
ROS_PARALLEL_JOBS: "-j2" # keep this for now, since there seems to be memory limit issues in the ci VM
UPSTREAM_WORKSPACE: file
ROSINSTALL_FILENAME: ".rosinstall"
DOCKER_IMAGE: "${ARTIFACT_DOCKER_URL}/flexbotics-base-devel"
BEFORE_SCRIPT: "bash <(curl -Ls https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/master/scripts/ci_run_entry_points.sh) $$CATKIN_WORKSPACE"
CATKIN_CONFIG: '--cmake-args -DCMAKE_CXX_FLAGS=-Wno-ignored-attributes -Wno-int-in-bool-context --'
when: always
tags:
- docker
industrial_ci_kinetic:
extends: .industrial_ci_kinetic
extends: .industrial_ci
variables:
ROS_DISTRO: kinetic
DOCKER_IMAGE: "${ARTIFACT_DOCKER_URL}/flexbotics-base-devel:${ROS_DISTRO}"
except:
- tags
- melodic-devel
industrial_ci_melodic:
extends: .industrial_ci
variables:
ROS_DISTRO: melodic
DOCKER_IMAGE: "${ARTIFACT_DOCKER_URL}/flexbotics-base-devel:${ROS_DISTRO}"
only:
- melodic-devel
except:
- tags
allow_failure: yes
industrial_ci_kinetic_deploy:
extends: .industrial_ci_kinetic
extends: .industrial_ci
variables:
ROS_DISTRO: kinetic
DOCKER_IMAGE: "${ARTIFACT_DOCKER_URL}/flexbotics-base-devel:${ROS_DISTRO}"
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
script:
......@@ -68,6 +85,8 @@ python_syntax:
stage: precheck
script: python -m compileall -q .
when: always
tags:
- docker
##########################################################
## Check for errors in bash/sh scripts
......@@ -82,6 +101,8 @@ bash_syntax:
- exit $RET
allow_failure: yes
when: always
tags:
- docker
##########################################################
## Check for errors in markdown files
......@@ -95,6 +116,8 @@ markdown_syntax:
script: docker run -v ${PWD}:/ac cytopia/awesome-ci syntax-markdown --path=/ac --extension=md --ignore=.ci_config --custom="-r ~MD013"
allow_failure: yes
when: always
tags:
- docker
##########################################################
## Check for various syntax issues in files; currently
......@@ -111,3 +134,5 @@ file_syntax:
- exit $RET
allow_failure: yes
when: always
tags:
- docker
image: docker:git
variables:
TMPDIR: "${CI_PROJECT_DIR}.tmp"
services:
- docker:dind
stages:
- build
before_script:
- apk add --update bash coreutils tar wget
- git clone https://github.com/ros-industrial/industrial_ci.git .ci_config
industrial_ci_kinetic:
stage: build
script: .ci_config/gitlab.sh
variables:
ROS_DISTRO: kinetic
ROS_PARALLEL_JOBS: "-j1" # keep this for now, since there seems to be memory limit issues in the ci VM
extends: relaxed
rules:
line-length: disable
......@@ -2,7 +2,7 @@ FROM industrial_ci_image
RUN rm -rf /root/ici /root/src
RUN apt-get update -qq && apt-get install -y -qq \
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
ros-kinetic-rosbash \
&& rm -rf /var/lib/apt/lists/*
......
......@@ -2,5 +2,6 @@
set -e
# setup application environment
# shellcheck disable=SC1091
source "/root/catkin_ws/install/setup.bash"
exec "$@"
ARG APPLICATION_IMAGE
FROM ${APPLICATION_IMAGE}
RUN apt-get update -qq && apt-get install -y -qq \
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
apt-transport-https \
curl \
libasound2
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 \
code
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 ajshort.ros \
--install-extension ms-iot.vscode-ros \
--install-extension joaompinto.asciidoctor-vscode \
--install-extension ms-python.python \
--install-extension ms-vscode.cpptools \
--install-extension peterjausovec.vscode-docker \
--install-extension ms-azuretools.vscode-docker \
--install-extension twxs.cmake
......@@ -17,6 +17,9 @@ robotnik_base_hw_lib:
telicam-sdk:
ubuntu: [telicam-sdk]
telicam-1.1.0:
ubuntu: [libtelicam-sdk-1.1.0]
zivid:
ubuntu: [zivid]
......@@ -76,10 +79,6 @@ rc_comm_utils:
ubuntu:
xenial: [ros-kinetic-rc-comm-utils]
rc_genicam_api:
ubuntu:
xenial: [ros-kinetic-rc-genicam-api]
rcimage:
ubuntu:
xenial: [rcimage]
......@@ -112,17 +111,13 @@ rc_dynamics_api:
ubuntu:
xenial: [ros-kinetic-rc-dynamics-api]
rc_dynamics_api:
ubuntu:
xenial: [rc-dynamics-api]
rc_apps_msgs:
ubuntu:
xenial: [ros-kinetic-rc-apps-msgs]
rc_genicam_api:
ubuntu:
xenial: [rc-genicam-api]
xenial: [ros-kinetic-rc-genicam-api]
rcobjectrendering:
ubuntu:
......
#!/bin/bash
echo Looking up and executing user entry scripts in: $1
echo Looking up and executing user entry scripts in: "$1"
find -L $1 -name ci_entry_script.bash -exec bash -c 'echo Running entry script from $(basename $(dirname {})) ; {} ' \;
find -L "$1" -name ci_entry_script.bash -exec bash -c 'echo Running entry script from $(basename $(dirname $1)) ; $1 ' _ {} \;
echo Finalized running the user entry scripts
#!/usr/bin/env bash
for foo in $(find $(pwd) -name "package.xml") ; do
package_name=$(basename $(realpath $(dirname $foo)))
echo Entering package: $package_name
cd $(realpath $(dirname $foo))
if [[ -n $(grep -i "roslaunch_add_file_check" CMakeLists.txt) ]] ; then
echo Package $package_name already has roslaunch_add_file_check - skipping
# shellcheck disable=SC2044
for foo in $(find "$(pwd)" -name "package.xml") ; do
package_name=$(basename "$(realpath "$(dirname "$foo")")")
echo Entering package: "$package_name"
cd "$(realpath "$(dirname "$foo")")" || exit
if grep -q -i "roslaunch_add_file_check" CMakeLists.txt; then
echo Package "$package_name" already has roslaunch_add_file_check - skipping
else
if [[ -n $(find . -type f -name "*.launch") ]] ; then
echo Adding roslaunch_add_file_check to $package_name
echo Adding roslaunch_add_file_check to "$package_name"
cat <<EOT >> CMakeLists.txt
## WARNING: automatically generated code; can be (and probably is) very buggy
......