-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ika-rwth-aachen/feature/github-action
Enable docker-ros GitHub action
- Loading branch information
Showing
17 changed files
with
1,129 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: GitHub | ||
|
||
on: [push] | ||
|
||
jobs: | ||
|
||
trigger-ros: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: convictional/[email protected] | ||
with: | ||
owner: ika-rwth-aachen | ||
repo: docker-ros-ci | ||
ref: main | ||
workflow_file_name: ros.yml | ||
client_payload: '{"docker-ros-git-ref": "${{ github.sha }}"}' | ||
github_token: ${{ secrets.DOCKER_ROS_CI_TRIGGER_GITHUB_TOKEN }} | ||
|
||
trigger-ros2: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: convictional/[email protected] | ||
with: | ||
owner: ika-rwth-aachen | ||
repo: docker-ros-ci | ||
ref: main | ||
workflow_file_name: ros2.yml | ||
client_payload: '{"docker-ros-git-ref": "${{ github.sha }}"}' | ||
github_token: ${{ secrets.DOCKER_ROS_CI_TRIGGER_GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: GitLab | ||
|
||
on: [push] | ||
|
||
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@v3 | ||
with: | ||
name: id | ||
path: id | ||
|
||
watch-ros: | ||
runs-on: ubuntu-latest | ||
needs: trigger-ros | ||
steps: | ||
- name: Get pipeline ID | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: id | ||
- 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@v3 | ||
with: | ||
name: id | ||
path: id | ||
|
||
watch-ros2: | ||
runs-on: ubuntu-latest | ||
needs: trigger-ros2 | ||
steps: | ||
- name: Get pipeline ID | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: id | ||
- 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 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.