Skip to content

Commit

Permalink
Merge pull request #336 from husarion/2.0.3-20240606
Browse files Browse the repository at this point in the history
Release  to ros2
  • Loading branch information
github-actions[bot] authored Jun 6, 2024
2 parents c600d57 + 9eef42f commit 807ee36
Show file tree
Hide file tree
Showing 31 changed files with 209 additions and 67 deletions.
17 changes: 17 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "en-US"
early_access: false
reviews:
profile: "chill"
request_changes_workflow: false
high_level_summary: true
poem: false
review_status: true
collapse_walkthrough: false
auto_review:
enabled: true
drafts: false
base_branches:
- "ros2-devel"
chat:
auto_reply: true
24 changes: 24 additions & 0 deletions .github/workflows/protect-default-branch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Validate PR head branch
on:
pull_request:
branches:
- ros2

jobs:
check-head-branch:
runs-on: ubuntu-latest
steps:
- name: Check allowed branches
run: |
pattern="^[0-9]+\.[0-9]+\.[0-9]+-[0-9]{8}$" # This regex matches the X.X.X-YYYYMMDD pattern
if [[ "${{ github.head_ref }}" == *"hotfix"* ]]; then
echo "PR from a branch containing 'hotfix' is allowed."
exit 0
elif [[ "${{ github.head_ref }}" =~ $pattern ]]; then
echo "PR from a branch matching X.X.X-YYYYMMDD pattern is allowed."
exit 0
else
echo "PRs must come from branches containing 'hotfix' phrase or matching X.X.X-YYYYMMDD pattern."
exit 1
fi
4 changes: 2 additions & 2 deletions .github/workflows/release-candidate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
repository_owner: husarion
repository_name: ${{ matrix.repo }}
new_branch_name: ${{ env.RC_BRANCH_NAME }}
new_branch_ref: ros2
new_branch_ref: ros2-devel
access_token: ${{ secrets.GH_PAT}}

update_tags_in_compose:
Expand All @@ -58,7 +58,7 @@ jobs:
wait_interval: 10
client_payload: |
{
"target_branch": "${{ env.RC_BRANCH_NAME }}",
"branch_name": "${{ env.RC_BRANCH_NAME }}",
"image_tag": "humble-${{ env.RC_BRANCH_NAME }}"
}
Expand Down
55 changes: 26 additions & 29 deletions .github/workflows/release-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
inputs:
version:
description: Release version, must match release candidate version. IMPORTANT - required format
`X.X.X`, eg `2.0.1`.
`X.X.X`, (e.g. `2.0.1`).
required: true
date:
description: Release date stamp, must match release candidate date. IMPORTANT - required format
`YYYYMMDD`, eg `20240430`.
`YYYYMMDD`, (e.g. `20240430`).
required: true
release_name:
description: Name of the release to be created. Version in the first place is recommended (e.g.
`2.0.0-alpha`).
`2.0.1-alpha`).
required: true
automatic_mode:
type: boolean
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
wait_interval: 10
client_payload: |
{
"target_branch": "${{ env.RC_BRANCH_NAME }}",
"release_candidate": "${{ env.RC_BRANCH_NAME }}",
"version": "${{ github.event.inputs.version }}",
"release_name": "${{ github.event.inputs.release_name }}",
"automatic_mode": "${{ github.event.inputs.automatic_mode }}",
Expand All @@ -63,66 +63,63 @@ jobs:
with:
owner: husarion
repo: panther_ros
github_token: ${{ secrets.GITHUB_TOKEN }} # Use the default GITHUB_TOKEN for local repository
github_token: ${{ secrets.GITHUB_TOKEN }} # Use the default GITHUB_TOKEN for local repository
workflow_file_name: release-repository.yaml
ref: ${{ env.RC_BRANCH_NAME }}
wait_interval: 10
client_payload: |
{
"target_branch": "${{ env.RC_BRANCH_NAME }}",
"release_candidate": "${{ env.RC_BRANCH_NAME }}",
"version": "${{ github.event.inputs.version }}",
"release_name": "${{ github.event.inputs.release_name }}",
"automatic_mode": "${{ github.event.inputs.automatic_mode }}",
"prerelease": "${{ github.event.inputs.prerelease }}"
}
release_panther_docker:
name: Release panther-docker repository
rebuild_and_push_docker_images:
name: Rebuild panther docker images with new version
runs-on: ubuntu-22.04
needs:
- release_panther_ros
runs-on: ubuntu-22.04
steps:
- name: Trigger repository release workflow
- name: Trigger repository build workflow
uses: convictional/trigger-workflow-and-wait@v1.6.1
with:
owner: husarion
repo: panther-docker
github_token: ${{ secrets.GH_PAT }}
workflow_file_name: release-repository.yaml
workflow_file_name: ros-docker-image.yaml
ref: ${{ env.RC_BRANCH_NAME }}
wait_interval: 10
client_payload: |
{
"target_branch": "${{ env.RC_BRANCH_NAME }}",
"version": "${{ github.event.inputs.version }}",
"date": "${{ github.event.inputs.date }}",
"release_name": "${{ github.event.inputs.release_name }}",
"automatic_mode": "${{ github.event.inputs.automatic_mode }}",
"prerelease": "${{ github.event.inputs.prerelease }}"
"build_type": "development",
"target_distro": "humble"
}
build_and_push_docker_images:
name: Build panther docker images
if: ${{ fromJSON(github.event.inputs.automatic_mode) == true }}
release_panther_docker:
name: Release panther-docker repository
needs:
- release_panther_docker
- rebuild_and_push_docker_images
runs-on: ubuntu-22.04
steps:
- name: Trigger repository build workflow
- name: Trigger repository release workflow
uses: convictional/trigger-workflow-and-wait@v1.6.1
with:
owner: husarion
repo: panther-docker
github_token: ${{ secrets.GH_PAT }}
workflow_file_name: ros-docker-image.yaml
ref: ${{ env.MAIN_BRANCH }}
workflow_file_name: release-repository.yaml
ref: ${{ env.RC_BRANCH_NAME }}
wait_interval: 10
client_payload: |
{
"build_type": "stable",
"target_distro": "humble",
"target_release": "${{ github.event.inputs.version }}",
"target_date": "${{ github.event.inputs.date }}"
"release_candidate": "${{ env.RC_BRANCH_NAME }}",
"version": "${{ github.event.inputs.version }}",
"date": "${{ github.event.inputs.date }}",
"release_name": "${{ github.event.inputs.release_name }}",
"automatic_mode": "${{ github.event.inputs.automatic_mode }}",
"prerelease": "${{ github.event.inputs.prerelease }}"
}
release_panther_rpi_os_image:
Expand All @@ -143,7 +140,7 @@ jobs:
wait_interval: 10
client_payload: |
{
"target_branch": "${{ env.RC_BRANCH_NAME }}",
"release_candidate": "${{ env.RC_BRANCH_NAME }}",
"version": "${{ github.event.inputs.version }}",
"release_name": "${{ github.event.inputs.release_name }}",
"automatic_mode": "${{ github.event.inputs.automatic_mode }}",
Expand Down
60 changes: 37 additions & 23 deletions .github/workflows/release-repository.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ name: Release repository
on:
workflow_dispatch:
inputs:
target_branch:
description: Target branch for the release.
release_candidate:
description: Branch name of the release candidate.
required: true
version:
description: New version (used for tag and package versioning).
Expand All @@ -30,64 +30,65 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAIN_BRANCH: ros2
DEVEL_BRANCH: ros2-devel
steps:
- name: Checkout
- name: Checkout to rc branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.target_branch }}
ref: ${{ github.event.inputs.release_candidate }}

- name: Create release candidate
id: create_release_candidate
- name: Catkin release
id: catkin_release
uses: at-wat/catkin-release-action@v1
with:
version: ${{ github.event.inputs.version }}
git_user: action-bot
git_email: action-bot@action-bot.com
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Create pull request
- name: Catkin release - create PR
run: |
gh pr create \
--base ${{ github.event.inputs.target_branch }} \
--head ${{ steps.create_release_candidate.outputs.created_branch }} \
--title "Release ${{ steps.create_release_candidate.outputs.version}}" \
--base ${{ github.event.inputs.release_candidate }} \
--head ${{ steps.catkin_release.outputs.created_branch }} \
--title "Release ${{ steps.catkin_release.outputs.version}}" \
--body "This PR incorporates package(s) version and changelog update."
- name: Merge pull request
- name: Catkin release - merge PR
if: ${{ fromJSON(github.event.inputs.automatic_mode) == true }}
run: |
gh pr merge ${{ steps.create_release_candidate.outputs.created_branch }} \
gh pr merge ${{ steps.catkin_release.outputs.created_branch }} \
--merge --delete-branch
- name: Checkout to main
if: ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode)
- name: Checkout to main branch
if: ${{ github.event.inputs.release_candidate != env.MAIN_BRANCH && fromJSON(inputs.automatic_mode)
== true }}
uses: actions/checkout@v4
with:
ref: ${{ env.MAIN_BRANCH }}

- name: Create pull request to main
if: ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode)
- name: Create PR to main branch
if: ${{ github.event.inputs.release_candidate != env.MAIN_BRANCH && fromJSON(inputs.automatic_mode)
== true }}
run: |
gh pr create \
--base ${{ env.MAIN_BRANCH }} \
--head ${{ github.event.inputs.target_branch }} \
--title "Release ${{ steps.create_release_candidate.outputs.version}} to ${{ env.MAIN_BRANCH }}" \
--head ${{ github.event.inputs.release_candidate }} \
--title "Release ${{ steps.catkin_release.outputs.version}} to ${{ env.MAIN_BRANCH }}" \
--body "This PR incorporates package(s) version and changelog update."
- name: Merge pull request to main
if: ${{ github.event.inputs.target_branch != env.MAIN_BRANCH && fromJSON(github.event.inputs.automatic_mode)
- name: Merge PR to main branch
if: ${{ github.event.inputs.release_candidate != env.MAIN_BRANCH && fromJSON(inputs.automatic_mode)
== true }}
run: |
gh pr merge ${{ github.event.inputs.target_branch }} \
gh pr merge ${{ github.event.inputs.release_candidate }} \
--merge --delete-branch
- name: Create prerelease
if: ${{ fromJSON(github.event.inputs.automatic_mode) == true && fromJSON(github.event.inputs.prerelease)
== true}}
run: |
gh release create ${{ steps.create_release_candidate.outputs.version }} \
gh release create ${{ steps.catkin_release.outputs.version }} \
--target ${{ env.MAIN_BRANCH }} \
--title ${{ github.event.inputs.release_name }} \
--generate-notes \
Expand All @@ -97,7 +98,20 @@ jobs:
if: ${{ fromJSON(github.event.inputs.automatic_mode) == true && fromJSON(github.event.inputs.prerelease)
== false}}
run: |
gh release create ${{ steps.create_release_candidate.outputs.version }} \
gh release create ${{ steps.catkin_release.outputs.version }} \
--target ${{ env.MAIN_BRANCH }} \
--title ${{ github.event.inputs.release_name }} \
--generate-notes
- name: Checkout to devel branch
if: ${{ env.DEVEL_BRANCH != env.MAIN_BRANCH && fromJSON(inputs.automatic_mode) == true }}
uses: actions/checkout@v4
with:
ref: ${{ env.DEVEL_BRANCH }}
fetch-depth: 0

- name: Update devel branch
if: ${{ env.DEVEL_BRANCH != env.MAIN_BRANCH && fromJSON(inputs.automatic_mode) == true }}
run: |
git pull origin ${{ env.MAIN_BRANCH }}
git push origin ${{ env.DEVEL_BRANCH }}
3 changes: 3 additions & 0 deletions panther/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package panther
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.0.3 (2024-06-06)
------------------

2.0.2 (2024-06-05)
------------------
* Merge pull request `#301 <https://github.com/husarion/panther_ros/issues/301>`_ from husarion/ros2-manager-refactor
Expand Down
2 changes: 1 addition & 1 deletion panther/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>panther</name>
<version>2.0.2</version>
<version>2.0.3</version>
<description>Meta package that contains all packages of Panther</description>
<maintainer email="support@husarion.com">Husarion</maintainer>
<license>Apache License 2.0</license>
Expand Down
11 changes: 11 additions & 0 deletions panther_battery/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
Changelog for package panther_battery
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.0.3 (2024-06-06)
------------------
* Merge pull request `#320 <https://github.com/husarion/panther_ros/issues/320>`_ from husarion/ros2-clear-logs
* Update panther_battery/src/battery_node.cpp
* Update panther_battery/src/battery_node.cpp
* MInor logging changes
* Minor log changes
* Exception changes in hardware_interfaces
* Revise panther_battery logs
* Contributors: Dawid Kmak, Paweł Irzyk, pawelirh

2.0.2 (2024-06-05)
------------------
* Merge pull request `#319 <https://github.com/husarion/panther_ros/issues/319>`_ from husarion/ros2-fix-battery-and-manager-tests
Expand Down
2 changes: 1 addition & 1 deletion panther_battery/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>panther_battery</name>
<version>2.0.2</version>
<version>2.0.3</version>
<description>Nodes monitoring the battery state of Husarion Panhter robot</description>
<maintainer email="support@husarion.com">Husarion</maintainer>
<license>Apache License 2.0</license>
Expand Down
3 changes: 3 additions & 0 deletions panther_bringup/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package panther_bringup
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.0.3 (2024-06-06)
------------------

2.0.2 (2024-06-05)
------------------
* Launch refactor (`#307 <https://github.com/husarion/panther_ros/issues/307>`_)
Expand Down
2 changes: 1 addition & 1 deletion panther_bringup/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>panther_bringup</name>
<version>2.0.2</version>
<version>2.0.3</version>
<description>Default launch files and configuration used to start Husarion Panther robot</description>
<maintainer email="support@husarion.com">Husarion</maintainer>
<license>Apache License 2.0</license>
Expand Down
6 changes: 6 additions & 0 deletions panther_controller/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog for package panther_controller
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.0.3 (2024-06-06)
------------------
* Merge pull request `#320 <https://github.com/husarion/panther_ros/issues/320>`_ from husarion/ros2-clear-logs
* Organize logs: panther_system and panther_imu
* Contributors: Dawid Kmak, pawelirh

2.0.2 (2024-06-05)
------------------
* Launch refactor (`#307 <https://github.com/husarion/panther_ros/issues/307>`_)
Expand Down
2 changes: 1 addition & 1 deletion panther_controller/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>panther_controller</name>
<version>2.0.2</version>
<version>2.0.3</version>
<description>ros2 controllers configuration for Panther</description>
<maintainer email="support@husarion.com">Husarion</maintainer>
<license>Apache License 2.0</license>
Expand Down
Loading

0 comments on commit 807ee36

Please sign in to comment.