Skip to content
Snippets Groups Projects
Commit 0e06ecd2 authored by Prada Sarasola, Miguel's avatar Prada Sarasola, Miguel
Browse files

Merge branch '52-ddeploy-job-failing-when-enforcing-labels-alt' into 'master'

Resolve "Ddeploy job failing when enforcing labels"

Closes #52

See merge request tecnalia_robotics-public/gitlab_templates!84
parents 5f6e2f7c dcfb9f91
No related branches found
No related tags found
No related merge requests found
variables:
GITLAB_TEMPLATES_BRANCH: master
.industrial_ci: .industrial_ci:
stage: build stage: build
before_script: before_script:
...@@ -10,7 +13,8 @@ ...@@ -10,7 +13,8 @@
DOCKER_IMAGE: "${ARTIFACT_DOCKER_URL}/flexbotics-base-devel:${ROS_DISTRO}" DOCKER_IMAGE: "${ARTIFACT_DOCKER_URL}/flexbotics-base-devel:${ROS_DISTRO}"
ADDITIONAL_DEBS: curl ADDITIONAL_DEBS: curl
PARALLEL_BUILDS: 2 # keep this for now, since there seems to be memory limit issues in the ci VM 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" GITLAB_TEMPLATES_BRANCH: master
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 CMAKE_ARGS: -DCMAKE_CXX_FLAGS=-Wno-ignored-attributes -Wno-int-in-bool-context
...@@ -21,6 +25,7 @@ ...@@ -21,6 +25,7 @@
DOCKER_PUSH_NAME: ${CI_PROJECT_PATH} DOCKER_PUSH_NAME: ${CI_PROJECT_PATH}
DOCKER_PUSH_TAG: ${CI_COMMIT_REF_NAME} DOCKER_PUSH_TAG: ${CI_COMMIT_REF_NAME}
DDEPLOY_YAML: ddeploy.yaml DDEPLOY_YAML: ddeploy.yaml
GITLAB_TEMPLATES_BRANCH: master
before_script: before_script:
- apk add --update python3 git py3-pip git-lfs bash curl jq - apk add --update python3 git py3-pip git-lfs bash curl jq
# forward the SSH authentication into the Docker executor # forward the SSH authentication into the Docker executor
...@@ -40,22 +45,22 @@ ...@@ -40,22 +45,22 @@
script: script:
# Run ddeploy # Run ddeploy
- ddeploy --yaml ${DDEPLOY_YAML} - ddeploy --yaml ${DDEPLOY_YAML}
# Get ID of image created by ddeploy # Get the full name of the most recently built image
- 'DOCKER_ID=$(docker images --format="{{.ID}}" | head -1)' - 'DDEPLOY_IMAGE_NAME=$(docker images --format="{{.Repository}}:{{.Tag}}" | head -1)'
- curl -Ls https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/master/scripts/enforce_labels.bash | bash -s -- ${DOCKER_ID} - 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. # Tag and push with the branch or tag name.
- echo "Pushing to ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}" - 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} - docker push ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}
# Tag and push with commit sha # Tag and push with commit sha
- echo "Pushing to ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${CI_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} - docker push ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${CI_COMMIT_SHA}
# Tag and push with latest only if it's on the default branch # Tag and push with latest only if it's on the default branch
- > - >
if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then if [ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]; then
echo "Pushing to ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:latest" 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; docker push ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:latest;
fi fi
rules: rules:
......
variables:
GITLAB_TEMPLATES_BRANCH: master
########################################################## ##########################################################
## Check formating of C and C++ files using clang-format ## Check formating of C and C++ files using clang-format
########################################################## ##########################################################
clang_format: clang_format:
stage: .post stage: .post
before_script: before_script:
- apk add --update bash coreutils tar wget - apk add --update bash coreutils tar wget
- git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci.git .ci_config -b legacy - 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 script: .ci_config/gitlab.sh
variables: variables:
ROS_DISTRO: kinetic ROS_DISTRO: kinetic
...@@ -80,5 +82,5 @@ adoc_syntax: ...@@ -80,5 +82,5 @@ adoc_syntax:
before_script: before_script:
- apk add --update curl asciidoctor bash - apk add --update curl asciidoctor bash
script: 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 when: always
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment