Skip to content

Add possibility to pass custom cmake args to colcon build #256

Add possibility to pass custom cmake args to colcon build

Add possibility to pass custom cmake args to colcon build #256

Workflow file for this run

name: GitLab
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
trigger-ros:
runs-on: ubuntu-latest
steps:
- name: Trigger pipeline
run: |
curl --silent --fail --request POST --form "token=${{ secrets.DOCKER_ROS_CI_TRIGGER_GITLAB_TOKEN }}" --form "ref=main" --form "variables[DOCKER_ROS_GIT_REF]=${{ github.sha }}" "https://gitlab.ika.rwth-aachen.de/api/v4/projects/1886/trigger/pipeline" | jq -r .id > id
- name: Upload pipeline ID
uses: actions/upload-artifact@v4
with:
name: id_ros
path: id
watch-ros:
runs-on: ubuntu-latest
needs: trigger-ros
steps:
- name: Get pipeline ID
uses: actions/download-artifact@v4
with:
name: id_ros
- name: Wait for pipeline completion
run: |
PIPELINE_ID=$(cat id)
while true; do
sleep 30
PIPELINE_STATUS=$(curl --silent --header "PRIVATE-TOKEN: ${{ secrets.DOCKER_ROS_CI_READ_PIPELINE_GITLAB_TOKEN }}" "https://gitlab.ika.rwth-aachen.de/api/v4/projects/1886/pipelines/$PIPELINE_ID" | jq -r .status)
echo "Pipeline status: $PIPELINE_STATUS (https://gitlab.ika.rwth-aachen.de/fb-fi/ops/docker-ros-ci/-/pipelines/$PIPELINE_ID)"
if [[ $PIPELINE_STATUS == "success" ]]; then
break
elif [[ $PIPELINE_STATUS == "failed" ]]; then
exit 1
elif [[ $PIPELINE_STATUS == "canceled" ]]; then
exit 1
fi
done
trigger-ros2:
runs-on: ubuntu-latest
steps:
- name: Trigger pipeline
run: |
curl --silent --fail --request POST --form "token=${{ secrets.DOCKER_ROS_CI_TRIGGER_GITLAB_TOKEN }}" --form "ref=ros2" --form "variables[DOCKER_ROS_GIT_REF]=${{ github.sha }}" "https://gitlab.ika.rwth-aachen.de/api/v4/projects/1886/trigger/pipeline" | jq -r .id > id
- name: Upload pipeline ID
uses: actions/upload-artifact@v4
with:
name: id_ros2
path: id
watch-ros2:
runs-on: ubuntu-latest
needs: trigger-ros2
steps:
- name: Get pipeline ID
uses: actions/download-artifact@v4
with:
name: id_ros2
- name: Wait for pipeline completion
run: |
PIPELINE_ID=$(cat id)
while true; do
sleep 30
PIPELINE_STATUS=$(curl --silent --header "PRIVATE-TOKEN: ${{ secrets.DOCKER_ROS_CI_READ_PIPELINE_GITLAB_TOKEN }}" "https://gitlab.ika.rwth-aachen.de/api/v4/projects/1886/pipelines/$PIPELINE_ID" | jq -r .status)
echo "Pipeline status: $PIPELINE_STATUS (https://gitlab.ika.rwth-aachen.de/fb-fi/ops/docker-ros-ci/-/pipelines/$PIPELINE_ID)"
if [[ $PIPELINE_STATUS == "success" ]]; then
break
elif [[ $PIPELINE_STATUS == "failed" ]]; then
exit 1
elif [[ $PIPELINE_STATUS == "canceled" ]]; then
exit 1
fi
done