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

Clean up gzdev calls and use docker cache via ADD for gzdev changes #1200

Merged
merged 5 commits into from
Nov 18, 2024

Conversation

j-rivero
Copy link
Contributor

@j-rivero j-rivero commented Nov 6, 2024

The PR clean up most of the gzdev code that deal with possible changes in gzdev configuraton in different parts of the Dockerfile: The mechanism used is to leverage the caching actions to the Docker layer caching using the ADD https://api.github.com/repos/gazebo-tooling/gzdev/git/refs/heads/$branch version.json that should invalidate the cache on changes done to the branch inside gzdev (affecting code or configurations). The current implementation will invalidate all the cache on any change to the gzdev branch.

The PR also changes the installation of gzdev to be under the /root directory.

Signed-off-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Jose Luis Rivero <[email protected]>
cat >> Dockerfile << DELIM_OSRF_REPO_GIT
RUN rm -fr ${GZDEV_DIR}
RUN git clone https://github.com/gazebo-tooling/gzdev -b ${GZDEV_BRANCH} ${GZDEV_DIR}
RUN if [ -n $GZDEV_TRY_BRANCH ]; then \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To support also docker caching the GZDEV_TRY_BRANCH this check has been taken out of the Dockerfile and a new ADD to check the GZDEV_TRY_BRANCH was added in adding to the two git commands.

@j-rivero
Copy link
Contributor Author

j-rivero commented Nov 6, 2024

I've been executing it several times in https://build.osrfoundation.org/job/_test_gz_math-ci-gz-math7-noble-amd64/ playing with changes in gzdev and try branch. Seemed to me to work as expected.

@j-rivero j-rivero marked this pull request as ready for review November 8, 2024 18:51
@j-rivero
Copy link
Contributor Author

Going to merge this one before it stays for too long out of my radar. Build Status another test build

@j-rivero j-rivero merged commit cac3694 into master Nov 18, 2024
2 checks passed
@j-rivero j-rivero deleted the jrivero/cleanup_gzdev branch November 18, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant