From 4466cf1ae8e78c576a8a85a1bb2b77e7d7cc3211 Mon Sep 17 00:00:00 2001 From: Saikrishna Bairamoni <84093461+SaikrishnaBairamoni@users.noreply.github.com> Date: Fri, 9 Feb 2024 12:43:46 -0500 Subject: [PATCH 1/4] update configs to point candidate images --- .circleci/config.yml | 2 +- .github/workflows/dockerhub.yml | 1 + Dockerfile | 2 +- docker/checkout.bash | 6 +++--- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index aaa85a1f..8e60f0fe 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,7 +28,7 @@ jobs: # Pull docker image from docker hub # XTERM used for better catkin_make output docker: - - image: usdotfhwastoldev/carma-base:develop + - image: usdotfhwastolcandidate/carma-base:lavida user: carma environment: TERM: xterm # use xterm to get full display output from build diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 439a920c..1e17df67 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -5,6 +5,7 @@ on: branches: - "develop" - "release/*" + - "release/lavida" jobs: dockerhub: diff --git a/Dockerfile b/Dockerfile index 313c2b1c..adb8966d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM usdotfhwastoldev/carma-base:develop as base_image +FROM usdotfhwastolcandidate/carma-base:lavida as base_image FROM base_image as build diff --git a/docker/checkout.bash b/docker/checkout.bash index f873a153..a92cb689 100755 --- a/docker/checkout.bash +++ b/docker/checkout.bash @@ -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 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 release/lavida + sudo git clone https://github.com/usdot-fhwa-stol/carma-utils.git ${dir}/src/CARMAUtils --branch release/lavida + sudo git clone https://github.com/usdot-fhwa-stol/autoware.ai.git ${dir}/src/autoware.ai --branch release/lavida fi sudo apt-get update From ce2570fba92fa1d9e2cd78910f8a8d7635539010 Mon Sep 17 00:00:00 2001 From: paulbourelly999 <77466294+paulbourelly999@users.noreply.github.com> Date: Tue, 9 Apr 2024 16:33:10 -0400 Subject: [PATCH 2/4] Update version numbers to 4.5.0 (#23) # PR Details ## Description ## Related GitHub Issue ## Related Jira Key ## Motivation and Context ## How Has This Been Tested? ## Types of changes - [ ] 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: - [ ] 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 --- .circleci/config.yml | 2 +- .github/workflows/dockerhub.yml | 6 ++++-- Dockerfile | 2 +- docker/checkout.bash | 6 +++--- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8e60f0fe..57ce2b44 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,7 +28,7 @@ jobs: # Pull docker image from docker hub # XTERM used for better catkin_make output docker: - - image: usdotfhwastolcandidate/carma-base:lavida + - image: usdotfhwastol/carma-base:carma-system-4.5.0 user: carma environment: TERM: xterm # use xterm to get full display output from build diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 1e17df67..77c53d2d 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -3,9 +3,11 @@ name: Docker Hub build on: push: branches: - - "develop" + - develop + - master - "release/*" - - "release/lavida" + tags: + - "carma-system-*" jobs: dockerhub: diff --git a/Dockerfile b/Dockerfile index adb8966d..9333372a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM usdotfhwastolcandidate/carma-base:lavida as base_image +FROM usdotfhwastol/carma-base:carma-system-4.5.0 as base_image FROM base_image as build diff --git a/docker/checkout.bash b/docker/checkout.bash index a92cb689..c83abd68 100755 --- a/docker/checkout.bash +++ b/docker/checkout.bash @@ -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 release/lavida - sudo git clone https://github.com/usdot-fhwa-stol/carma-utils.git ${dir}/src/CARMAUtils --branch release/lavida - sudo git clone https://github.com/usdot-fhwa-stol/autoware.ai.git ${dir}/src/autoware.ai --branch release/lavida + 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 From b332bdc74cf8019cc73797c4520808006c911235 Mon Sep 17 00:00:00 2001 From: dev Date: Fri, 19 Apr 2024 10:31:28 -0400 Subject: [PATCH 3/4] Update build and checkout to remove branch coupling --- .circleci/config.yml | 4 ++-- .github/workflows/docker.yml | 4 ---- Dockerfile | 7 +++++-- docker/checkout.bash | 22 ++++++++++++---------- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 57ce2b44..2811fc46 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,13 +22,13 @@ 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 jobs: build: # Pull docker image from docker hub # XTERM used for better catkin_make output docker: - - image: usdotfhwastol/carma-base:carma-system-4.5.0 + - image: usdotfhwastoldev/carma-base:develop user: carma environment: TERM: xterm # use xterm to get full display output from build diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 2589eb12..6ea9b537 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,10 +1,6 @@ name: Docker build on: - push: - branches-ignore: - - "develop" - - "release/*" pull_request: types: [opened, synchronize, reopened] diff --git a/Dockerfile b/Dockerfile index 9333372a..ba1a4259 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,14 @@ -FROM usdotfhwastol/carma-base:carma-system-4.5.0 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 FROM base_image diff --git a/docker/checkout.bash b/docker/checkout.bash index c83abd68..f7398866 100755 --- a/docker/checkout.bash +++ b/docker/checkout.bash @@ -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) @@ -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 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 + 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" fi - +#TODO This probably needs to be moved into install.sh sudo apt-get update sudo apt-get install ros-foxy-nmea-msgs -y sudo apt-get install ros-foxy-gps-tools -y From f264f8e3eb525d45ee7de7165030974b24836a46 Mon Sep 17 00:00:00 2001 From: dev Date: Fri, 19 Apr 2024 12:34:29 -0400 Subject: [PATCH 4/4] Remove carma-utils and carma-msgs out of conditional in checkout.sh --- docker/checkout.bash | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docker/checkout.bash b/docker/checkout.bash index f7398866..dd79510e 100755 --- a/docker/checkout.bash +++ b/docker/checkout.bash @@ -35,14 +35,11 @@ while [[ $# -gt 0 ]]; do ;; esac done - +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" 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 "$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" fi #TODO This probably needs to be moved into install.sh