Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync develop to master #25

Merged
merged 5 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ version: 2
# Run static code analyzer for SourceCloud
# Upload test results
# Every run command should start with source ${INIT_ENV} to ensure all default dependancies are available

# TODO : Move this to github actions to take advantage of dynamic base branch selection
paulbourelly999 marked this conversation as resolved.
Show resolved Hide resolved
jobs:
build:
# Pull docker image from docker hub
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Docker build

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

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ name: Docker Hub build
on:
push:
branches:
- "develop"
- develop
- master
- "release/*"
tags:
- "carma-system-*"

jobs:
dockerhub:
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
FROM usdotfhwastoldev/carma-base:develop as base_image
ARG DOCKER_ORG=usdotfhwastoldev
ARG DOCKER_TAG=develop
FROM ${DOCKER_ORG}/carma-base:${DOCKER_TAG} as base_image

FROM base_image as build
ARG GIT_BRANCH=develop

COPY --chown=carma . /home/carma/autoware.auto
RUN chmod -R 775 /home/carma/autoware.auto/docker/checkout.bash
RUN chmod -R 775 /home/carma/autoware.auto/docker/install.sh
RUN /home/carma/autoware.auto/docker/checkout.bash
RUN /home/carma/autoware.auto/docker/checkout.bash -b ${GIT_BRANCH}
RUN ./home/carma/autoware.auto/docker/install.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since users will typically use the build-image.sh script directly, which calls this Dockerfile, do we want to update build-image.sh to take a git branch as an argument, and then pass it as a GIT_BRANCH arg into Dockerfile?

Though, less of a priority since we don't build an Autoware.Auto image (instead, this repo is checked out during the autoware.ai build) for usage in CARMA Platform.


FROM base_image
Expand Down
22 changes: 12 additions & 10 deletions docker/checkout.bash
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
set -exo pipefail

dir=~
BRANCH=develop
while [[ $# -gt 0 ]]; do
arg="$1"
case $arg in
-d|--develop)
BRANCH=develop
-b|--branch)
BRANCH=$2
shift
shift
;;
-r|--root)
Expand All @@ -34,16 +36,16 @@ while [[ $# -gt 0 ]]; do
esac
done

if [[ "$BRANCH" = "develop" ]]; then
sudo git clone https://github.com/usdot-fhwa-stol/carma-msgs.git ${dir}/src/CARMAMsgs --branch $BRANCH
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
if [[ "$BRANCH" == "develop" ]] || [[ "$BRANCH" == "master" ]]; then
sudo git clone https://github.com/usdot-fhwa-stol/carma-msgs.git ${dir}/src/CARMAMsgs --branch "$BRANCH"
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 carma-"$BRANCH"
else
sudo git clone https://github.com/usdot-fhwa-stol/carma-msgs.git ${dir}/src/CARMAMsgs --branch develop
sudo git clone https://github.com/usdot-fhwa-stol/carma-utils.git ${dir}/src/CARMAUtils --branch develop
sudo git clone https://github.com/usdot-fhwa-stol/autoware.ai.git ${dir}/src/autoware.ai --branch carma-develop
sudo git clone https://github.com/usdot-fhwa-stol/carma-msgs.git ${dir}/src/CARMAMsgs --branch "$BRANCH"
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"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like carma-msgs and carma-utils repos can be moved out of the conditional.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved.

fi

#TODO This probably needs to be moved into install.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: We should probably create github or JIRA ticket (in devops backlog) to properly track this

sudo apt-get update
sudo apt-get install ros-foxy-nmea-msgs -y
sudo apt-get install ros-foxy-gps-tools -y
Expand Down
Loading