Skip to content
Snippets Groups Projects
Commit 1494883b authored by Jon Azpiazu's avatar Jon Azpiazu
Browse files

Merge branch 'tests' into 'master'

parents 2e88ec6f f2c5f4e4
No related branches found
No related tags found
1 merge request!25Tests
Pipeline #14226 passed
shellcheck:
image: koalaman/shellcheck-alpine
script: 'shellcheck deploy/base/ros_entrypoint.bash scripts/*sh'
# 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
yamllint:
image: sdesbure/yamllint
script: "yamllint $(find . \\( -name '*.yml' -o -name '*.yaml' \\))"
extends: relaxed
rules:
line-length: disable
...@@ -2,7 +2,7 @@ FROM industrial_ci_image ...@@ -2,7 +2,7 @@ FROM industrial_ci_image
RUN rm -rf /root/ici /root/src 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 \ ros-kinetic-rosbash \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
......
...@@ -2,5 +2,6 @@ ...@@ -2,5 +2,6 @@
set -e set -e
# setup application environment # setup application environment
# shellcheck disable=SC1091
source "/root/catkin_ws/install/setup.bash" source "/root/catkin_ws/install/setup.bash"
exec "$@" exec "$@"
ARG APPLICATION_IMAGE ARG APPLICATION_IMAGE
FROM ${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 \ apt-transport-https \
curl \ curl \
libasound2 libasound2 \
&& 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 \ RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg \
&& mv microsoft.gpg /etc/apt/trusted.gpg.d/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' && 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 \ RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
code code \
&& rm -rf /var/lib/apt/lists/*
RUN echo "alias code='code --user-data-dir /root'" >> /root/.bashrc RUN echo "alias code='code --user-data-dir /root'" >> /root/.bashrc
......
...@@ -76,10 +76,6 @@ rc_comm_utils: ...@@ -76,10 +76,6 @@ rc_comm_utils:
ubuntu: ubuntu:
xenial: [ros-kinetic-rc-comm-utils] xenial: [ros-kinetic-rc-comm-utils]
rc_genicam_api:
ubuntu:
xenial: [ros-kinetic-rc-genicam-api]
rcimage: rcimage:
ubuntu: ubuntu:
xenial: [rcimage] xenial: [rcimage]
...@@ -112,17 +108,13 @@ rc_dynamics_api: ...@@ -112,17 +108,13 @@ rc_dynamics_api:
ubuntu: ubuntu:
xenial: [ros-kinetic-rc-dynamics-api] xenial: [ros-kinetic-rc-dynamics-api]
rc_dynamics_api:
ubuntu:
xenial: [rc-dynamics-api]
rc_apps_msgs: rc_apps_msgs:
ubuntu: ubuntu:
xenial: [ros-kinetic-rc-apps-msgs] xenial: [ros-kinetic-rc-apps-msgs]
rc_genicam_api: rc_genicam_api:
ubuntu: ubuntu:
xenial: [rc-genicam-api] xenial: [ros-kinetic-rc-genicam-api]
rcobjectrendering: rcobjectrendering:
ubuntu: ubuntu:
......
#!/bin/bash #!/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 echo Finalized running the user entry scripts
#!/usr/bin/env bash #!/usr/bin/env bash
for foo in $(find $(pwd) -name "package.xml") ; do # shellcheck disable=SC2044
package_name=$(basename $(realpath $(dirname $foo))) for foo in $(find "$(pwd)" -name "package.xml") ; do
echo Entering package: $package_name package_name=$(basename "$(realpath "$(dirname "$foo")")")
cd $(realpath $(dirname $foo)) echo Entering package: "$package_name"
if [[ -n $(grep -i "roslaunch_add_file_check" CMakeLists.txt) ]] ; then cd "$(realpath "$(dirname "$foo")")" || exit
echo Package $package_name already has roslaunch_add_file_check - skipping if grep -q -i "roslaunch_add_file_check" CMakeLists.txt; then
echo Package "$package_name" already has roslaunch_add_file_check - skipping
else else
if [[ -n $(find . -type f -name "*.launch") ]] ; then 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 cat <<EOT >> CMakeLists.txt
## WARNING: automatically generated code; can be (and probably is) very buggy ## WARNING: automatically generated code; can be (and probably is) very buggy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment