Skip to content

Commit

Permalink
Merge release Isetta (#103)
Browse files Browse the repository at this point in the history
<!-- Thanks for the contribution, this is awesome. -->

# PR Details
This PR is to merge release branch isetta to master for release 4.3.0
## Description

<!--- Describe your changes in detail -->

## Related Issue

<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [ ] Defect fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that cause existing functionality
to change)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ ] I have added any new packages to the sonar-scanner.properties file
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
[CARMA Contributing
Guide](https://github.com/usdot-fhwa-stol/carma-platform/blob/develop/Contributing.md)
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
  • Loading branch information
codygarver authored Feb 9, 2023
2 parents 188bd63 + ac859fe commit 5ed75db
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 12 deletions.
11 changes: 8 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ jobs:
# Pull docker image from docker hub
# XTERM used for better catkin_make output
docker:
- image: usdotfhwastol/autoware.ai:carma-system-4.2.0
- image: usdotfhwastol/autoware.ai:carma-system-4.3.0
user: carma
environment:
TERM: xterm # use xterm to get full display output from build
INIT_ENV: /home/carma/.base-image/init-env.sh
ROS_2_ENV: /opt/ros/foxy/setup.bash
working_directory: "/opt/carma/"
# Execution steps
steps:
Expand All @@ -51,16 +52,20 @@ jobs:
command: |
source ${INIT_ENV}
./src/CARMAVelodyneLidarDriver/docker/checkout.bash -r ${PWD}
sed -i '/colcon build/ s/$/ --packages-up-to velodyne_lidar_driver_wrapper driver_shutdown_ros2/' ~/.ci-image/engineering_tools/code_coverage/make_with_coverage.bash
- run:
name: Build Driver
command: |
source ${INIT_ENV}
build-wrapper-linux-x86-64 --out-dir /opt/carma/bw-output bash make_with_coverage.bash -m -e /opt/carma/ -o ./coverage_reports/gcov
source ${ROS_2_ENV}
./src/CARMAVelodyneLidarDriver/docker/install.sh
make_with_coverage.bash -m -e /opt/carma/ -o ./coverage_reports/gcov
- run:
name: Run C++ Tests
command: |
source ${INIT_ENV}
bash make_with_coverage.bash -t -e /opt/carma/ -o ./coverage_reports/gcov
source ${ROS_2_ENV}
make_with_coverage.bash -t -e /opt/carma/ -o ./coverage_reports/gcov
# Run SonarCloud analysis
# PR Branchs and number extracted from Circle variables and github api
# Circle CI seems to make a change to the base branch, so we must fetch --force to ensure correct git file change stats
Expand Down
10 changes: 7 additions & 3 deletions .sonarqube/sonar-scanner.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@

sonar.projectKey=usdot-fhwa-stol_CARMAVelodyneLidarDriver
sonar.organization=usdot-fhwa-stol
sonar.cfamily.build-wrapper-output=/opt/carma/bw-output
sonar.cfamily.cache.enabled=false
sonar.cfamily.compile-commands=/opt/carma/build/compile_commands.json
sonar.host.url=https://sonarcloud.io
sonar.sources=velodyne_lidar_driver_wrapper/src/
# sonar.cfamily.gcov.reportsPath=/opt/carma/coverage_reports/gcov
# sonar.tests=velodyne_lidar_driver_wrapper/test/
sonar.cfamily.gcov.reportsPath=/opt/carma/coverage_reports/gcov
#sonar.tests=velodyne_lidar_driver_wrapper/test/
sonar.coverageReportPaths=/opt/carma/coverage_reports/gcov/coverage.xml
sonar.cpp.file.suffixes=.cpp,.h,.tpp
sonar.c.file.suffixes=-
# Set Git as SCM sensor
sonar.scm.disabled=false
sonar.scm.enabled=true
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations under
# the License.

FROM usdotfhwastol/autoware.ai:carma-system-4.2.0 as setup
FROM usdotfhwastol/autoware.ai:carma-system-4.3.0 as setup

ARG ROS1_PACKAGES=""
ENV ROS1_PACKAGES=${ROS1_PACKAGES}
Expand All @@ -24,7 +24,7 @@ COPY --chown=carma . /home/carma/src/
RUN ~/src/docker/checkout.bash
RUN ~/src/docker/install.sh

FROM usdotfhwastol/autoware.ai:carma-system-4.2.0
FROM usdotfhwastol/autoware.ai:carma-system-4.3.0


ARG BUILD_DATE="NULL"
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
| CicleCI Build Status | Sonar Code Quality | DockerHub Release | DockerHub Release Candidate | DockerHub Develop |
|------|-----|-----|-----|------|
[![CircleCI](https://img.shields.io/circleci/build/gh/usdot-fhwa-stol/carma-velodyne-lidar-driver/develop?label=CircleCI)](https://app.circleci.com/pipelines/github/usdot-fhwa-stol/carma-velodyne-lidar-driver?branch=develop) | [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=usdot-fhwa-stol_CARMAVelodyneLidarDriver&metric=alert_status)](https://sonarcloud.io/dashboard?id=usdot-fhwa-stol_CARMAVelodyneLidarDriver) | [![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/usdotfhwastol/carma-velodyne-lidar-driver?label=carma-velodyne-lidar-driver)](https://hub.docker.com/repository/docker/usdotfhwastol/carma-velodyne-lidar-driver) | [![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/usdotfhwastolcandidate/carma-velodyne-lidar-driver?label=carma-velodyne-lidar-driver)](https://hub.docker.com/repository/docker/usdotfhwastolcandidate/carma-velodyne-lidar-driver) | [![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/usdotfhwastoldev/carma-velodyne-lidar-driver?label=carma-velodyne-lidar-driver)](https://hub.docker.com/repository/docker/usdotfhwastoldev/carma-velodyne-lidar-driver)

# CARMAVelodyneLidarDriver
CARMAVelodyneLidarDriver contains a driver wrapper for usage with the standard Velodyne LiDAR driver to integrate with the CARMA Platform

Expand Down
4 changes: 2 additions & 2 deletions docker/checkout.bash
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ if [[ "$BRANCH" = "develop" ]]; then
git clone https://github.com/usdot-fhwa-stol/carma-msgs.git ${dir}/src/CARMAMsgs --branch $BRANCH
git clone https://github.com/usdot-fhwa-stol/carma-utils.git ${dir}/src/CARMAUtils --branch $BRANCH
else
git clone https://github.com/usdot-fhwa-stol/carma-msgs.git ${dir}/src/CARMAMsgs --branch carma-system-4.2.0
git clone https://github.com/usdot-fhwa-stol/carma-utils.git ${dir}/src/CARMAUtils --branch carma-system-4.2.0
git clone https://github.com/usdot-fhwa-stol/carma-msgs.git ${dir}/src/CARMAMsgs --branch carma-system-4.3.0
git clone https://github.com/usdot-fhwa-stol/carma-utils.git ${dir}/src/CARMAUtils --branch carma-system-4.3.0
fi
6 changes: 6 additions & 0 deletions docker/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-a

# Install the driver and pointcloud conversion package
sudo apt install ros-foxy-velodyne-driver -y ros-foxy-velodyne-pointcloud

# Don't proceed in Continuous Integration environment
if [[ "$CI" == "true" ]]; then
exit
fi

# Build wrapper
cd ~
if [[ ! -z "$ROS2_PACKAGES" ]]; then
Expand Down
11 changes: 9 additions & 2 deletions hooks/pre_build
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@

if [[ "$SOURCE_BRANCH" = "develop" ]]; then
# add -d flag to checkout.bash and update image dependencies
sed -i "s|checkout.bash|checkout.bash -d|g; s|usdotfhwastol/|usdotfhwastoldev/|g; s|:[0-9]*\.[0-9]*\.[0-9]*|:develop|g s|:CARMA[a-zA-Z]*_[0-9]*\.[0-9]*\.[0-9]*|:develop|g; s|:carma-[a-zA-Z]*-[0-9]*\.[0-9]*\.[0-9]*|:develop|g" \
sed -i "s|checkout.bash|checkout.bash -d|g; s|usdotfhwastol/|usdotfhwastoldev/|g; s|:[0-9]*\.[0-9]*\.[0-9]*|:develop|g; s|:CARMA[a-zA-Z]*_[0-9]*\.[0-9]*\.[0-9]*|:develop|g; s|:carma-[a-zA-Z]*-[0-9]*\.[0-9]*\.[0-9]*|:develop|g" \
Dockerfile
elif [[ "$SOURCE_BRANCH" =~ ^release/.*$ ]]; then
# swap checkout branch in checkout.bash to release branch

# Update Dockerfile to point to release images
RELEASE_NAME=$(echo $SOURCE_BRANCH | cut -d "/" -f 2)
sed -i "s|usdotfhwastol/|usdotfhwastolcandidate/|g; s|usdotfhwastoldev/|usdotfhwastolcandidate/|g; s|:[0-9]*\.[0-9]*\.[0-9]*|:$RELEASE_NAME|g; s|:CARMA[a-zA-Z]*_[0-9]*\.[0-9]*\.[0-9]*|:$RELEASE_NAME|g; s|:carma-[a-zA-Z]*-[0-9]*\.[0-9]*\.[0-9]*|:$RELEASE_NAME|g; s|:develop|:$RELEASE_NAME|g" \
Dockerfile
# swap checkout branch in checkout.bash to release branch
sed -i "/usdot-fhwa-stol/ s|--branch .*|--branch $SOURCE_BRANCH|g" \

# swap checkout branch in checkout.bash to release branch
RELEASE_NAME=$(echo $SOURCE_BRANCH | cut -d "/" -f 2)
sed -i "s|usdotfhwastol/|usdotfhwastolcandidate/|g; s|usdotfhwastoldev/|usdotfhwastolcandidate/|g; s|:[0-9]*\.[0-9]*\.[0-9]*|:$RELEASE_NAME|g; s|:CARMA[a-zA-Z]*_[0-9]*\.[0-9]*\.[0-9]*|:$RELEASE_NAME|g; s|:carma-[a-zA-Z]*-[0-9]*\.[0-9]*\.[0-9]*|:$RELEASE_NAME|g; s|:develop|:$RELEASE_NAME|g" \
Dockerfile
sed -i "s|--branch .*|--branch $SOURCE_BRANCH|g" \
docker/checkout.bash
fi

0 comments on commit 5ed75db

Please sign in to comment.