Skip to content

Commit

Permalink
Merge release/lavida (4.5.0) branch into master (#22)
Browse files Browse the repository at this point in the history
<!-- Thanks for the contribution, this is awesome. -->

# PR Details
## Description
**Requires closing #23**
<!--- Describe your changes in detail -->

## Related GitHub Issue

<!--- This project only accepts pull requests related to open GitHub
issues or Jira Keys -->
<!--- 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 DO NOT name partially fixed issues, instead open an issue
specific to this fix -->
<!--- Please link to the issue here: -->

## Related Jira Key

<!-- e.g. CAR-123 -->

## 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**](https://github.com/usdot-fhwa-stol/carma-platform/blob/develop/Contributing.md)
document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
@MishkaMN
  • Loading branch information
MishkaMN authored Apr 9, 2024
2 parents 70c426d + ce2570f commit 0cbe800
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# Pull docker image from docker hub
# XTERM used for better catkin_make output
docker:
- image: usdotfhwastol/carma-base:carma-system-4.3.0
- image: usdotfhwastol/carma-base:carma-system-4.5.0
user: carma
environment:
TERM: xterm # use xterm to get full display output from build
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Docker build

on:
push:
branches-ignore:
- "develop"
- "release/*"
pull_request:
types: [opened, synchronize, reopened]

jobs:
docker:
uses: usdot-fhwa-stol/actions/.github/workflows/docker.yml@main
17 changes: 17 additions & 0 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Docker Hub build

on:
push:
branches:
- develop
- master
- "release/*"
tags:
- "carma-system-*"

jobs:
dockerhub:
uses: usdot-fhwa-stol/actions/.github/workflows/dockerhub.yml@main
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM usdotfhwastol/carma-base:carma-system-4.3.0 as base_image
FROM usdotfhwastol/carma-base:carma-system-4.5.0 as base_image

FROM base_image as build

Expand Down
33 changes: 27 additions & 6 deletions docker/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,43 +23,64 @@ echo ""
echo "##### $IMAGE Docker Image Build Script #####"
echo ""

ROS1_PACKAGES=""
ROS2_PACKAGES=""
ROS1_PACKAGES_COLLECT=false
ROS2_PACKAGES_COLLECT=false

while [[ $# -gt 0 ]]; do
arg="$1"
case $arg in
-v|--version)
ROS1_PACKAGES_COLLECT=false
ROS2_PACKAGES_COLLECT=false

COMPONENT_VERSION_STRING="$2"
shift
shift
;;
--system-release)
ROS1_PACKAGES_COLLECT=false
ROS2_PACKAGES_COLLECT=false

SYSTEM_RELEASE=true
shift
;;
-p|--push)
ROS1_PACKAGES_COLLECT=false
ROS2_PACKAGES_COLLECT=false

PUSH=true
shift
;;
-d|--develop)
ROS1_PACKAGES_COLLECT=false
ROS2_PACKAGES_COLLECT=false

USERNAME=usdotfhwastoldev
COMPONENT_VERSION_STRING=develop
shift
;;
--ros-1-packages|--ros1)
ROS1_PACKAGES=""
ROS1_PACKAGES_COLLECT=true
ROS2_PACKAGES_COLLECT=false

shift
;;
--ros-2-packages|--ros2)
ROS2_PACKAGES=""
ROS1_PACKAGES_COLLECT=false
ROS2_PACKAGES_COLLECT=true

shift
;;
*)
# Var test based on Stack Overflow question: https://stackoverflow.com/questions/5406858/difference-between-unset-and-empty-variables-in-bash
# Asker: green69
# Answerer: geekosaur
if [ "${ROS2_PACKAGES+set}" = "set" ]; then
ROS2_PACKAGES="$ROS2_PACKAGES $arg"
elif [ "${ROS1_PACKAGES+set}" = "set" ]; then
if $ROS1_PACKAGES_COLLECT; then
ROS1_PACKAGES="$ROS1_PACKAGES $arg"
elif $ROS2_PACKAGES_COLLECT; then
ROS2_PACKAGES="$ROS2_PACKAGES $arg"
else
echo "Unknown argument $arg..."
exit -1
Expand All @@ -70,7 +91,7 @@ while [[ $# -gt 0 ]]; do
done

if [[ ! -z "$ROS1_PACKAGES$ROS2_PACKAGES" ]]; then
echo "Performing incremental build of image to rebuild packages: $ROS1_PACKAGES $ROS2_PACKAGES..."
echo "Performing incremental build of image to rebuild packages: ROS1>> $ROS1_PACKAGES ROS2>> $ROS2_PACKAGES..."

echo "Updating Dockerfile references to use most recent image as base image"
# Trim of docker image LS command sourced from
Expand Down
6 changes: 3 additions & 3 deletions docker/checkout.bash
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ if [[ "$BRANCH" = "develop" ]]; then
sudo git clone https://github.com/usdot-fhwa-stol/carma-utils.git ${dir}/src/CARMAUtils --branch $BRANCH
sudo git clone https://github.com/usdot-fhwa-stol/autoware.ai.git ${dir}/src/autoware.ai --branch $BRANCH
else
sudo git clone https://github.com/usdot-fhwa-stol/carma-msgs.git ${dir}/src/CARMAMsgs --branch carma-system-4.3.0
sudo git clone https://github.com/usdot-fhwa-stol/carma-utils.git ${dir}/src/CARMAUtils --branch carma-system-4.3.0
sudo git clone https://github.com/usdot-fhwa-stol/autoware.ai.git ${dir}/src/autoware.ai --branch carma-system-4.3.0
sudo git clone https://github.com/usdot-fhwa-stol/carma-msgs.git ${dir}/src/CARMAMsgs --branch carma-system-4.5.0
sudo git clone https://github.com/usdot-fhwa-stol/carma-utils.git ${dir}/src/CARMAUtils --branch carma-system-4.5.0
sudo git clone https://github.com/usdot-fhwa-stol/autoware.ai.git ${dir}/src/autoware.ai --branch carma-system-4.5.0
fi

sudo apt-get update
Expand Down

0 comments on commit 0cbe800

Please sign in to comment.