diff --git a/ci-templates/auto-rules/humble-default.yml b/ci-templates/auto-rules/humble-default.yml new file mode 100644 index 0000000000000000000000000000000000000000..093c80e6668154b462c4d11a8e5e6e7a367b34c7 --- /dev/null +++ b/ci-templates/auto-rules/humble-default.yml @@ -0,0 +1,4 @@ +include: ci-templates/auto-rules/no-default.yml + +variables: + DEFAULT_DISTRO: humble diff --git a/ci-templates/auto-rules/no-default.yml b/ci-templates/auto-rules/no-default.yml index 51bac7fddc7a9ac16db95fafe914314b44591be8..f67a44b8f7b40255f58ede3bbd4d020e3ae449d3 100644 --- a/ci-templates/auto-rules/no-default.yml +++ b/ci-templates/auto-rules/no-default.yml @@ -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,13 @@ 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 .py3_template: rules: diff --git a/ci-templates/auto-rules/with-rosinstall/humble-default.yml b/ci-templates/auto-rules/with-rosinstall/humble-default.yml new file mode 100644 index 0000000000000000000000000000000000000000..98a639a7a249a94414e7facb88ddccea2c6e4679 --- /dev/null +++ b/ci-templates/auto-rules/with-rosinstall/humble-default.yml @@ -0,0 +1,4 @@ +include: ci-templates/auto-rules/with-rosinstall/no-default.yml + +variables: + DEFAULT_DISTRO: humble diff --git a/ci-templates/industrial-ci-templates.yml b/ci-templates/industrial-ci-templates.yml index 4281ca83e233d400a38c97af15c94450c61c6bb4..d3e3011e3b4323b6bde4673a8e0b6591432f53ec 100644 --- a/ci-templates/industrial-ci-templates.yml +++ b/ci-templates/industrial-ci-templates.yml @@ -1,3 +1,6 @@ +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: diff --git a/ci-templates/syntax-check.yml b/ci-templates/syntax-check.yml index f83449568e237e8d818330ee5fb02e446b84b1a4..a54b8c1697e45386c05210f63c1da765586a408f 100644 --- a/ci-templates/syntax-check.yml +++ b/ci-templates/syntax-check.yml @@ -1,13 +1,15 @@ +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 @@ -68,5 +70,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 diff --git a/rosdistro/rosdep_tecnalia.yaml b/rosdistro/rosdep_tecnalia.yaml index 3564c8563ecda1b420ac4a7c25f7cf32a9434979..577912997ea3723ad57a3d73967237d0be1b4e98 100644 --- a/rosdistro/rosdep_tecnalia.yaml +++ b/rosdistro/rosdep_tecnalia.yaml @@ -14,6 +14,7 @@ peak: phoxicontrol: ubuntu: bionic: [phoxicontrol] + focal: [phoxicontrol] robotnik_base_hw_lib: ubuntu: [ros-kinetic-robotnik-base-hw-lib]