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

Run Jenkins jobs on custom builds of Drake #376

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

tyler-yankee
Copy link
Collaborator

@tyler-yankee tyler-yankee commented Mar 6, 2025

This introduces parameters on each of the Jenkins examples to be able to be run the CI jobs with alternative versions of Drake. Towards #22574, and a follow-up of #374.

Parameterization of Individual Examples

  • drake_bazel_external: uses Bazel's --override-module flag when calling bazel test //...
  • drake_bazel_external_legacy: sets the EXAMPLES_LOCAL_DRAKE_PATH environment variable to use the locally pulled copy of Drake
  • drake_cmake_external: adds options to the CMakeLists.txt for the commit hash and sha256 (no longer have to manually comment-out code for this - yay!)

Other Incidental Changes

  • Adds parameters to the setup/install_prereqs and .gitHub/ci_build_test scripts as necessary
  • Explicitly extracts Drake as drake (and adds to .bazelignore, etc.) rather than the default drake-master, since names would be inconsistent with arbitrary commit hashes

Result Workflow

A developer with a PR on Drake could test their changes on DEE by requesting a build from the bot:

@drake-jenkins-bot linux-jammy-unprovisioned-external-examples please

Of course, it's also possible to run via the Jenkins UI.


This change is Reviewable

Copy link
Collaborator Author

@tyler-yankee tyler-yankee left a comment

Choose a reason for hiding this comment

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

+@williamjallen and +@Aiden2244 ... how about we do the same sort of thing for feature review on this that we did for #374? Let's hold off on testing @drake-jenkins-bot for now, since it probably should work but I'll need a PR on Drake first. If you want to run a test, run with parameters from this job and make sure to use this branch of DEE.

Reviewable status: all discussions resolved, LGTM missing from assignee williamjallen, LGTM missing from assignee aiden2244, platform LGTM missing (waiting on @Aiden2244 and @williamjallen)

Copy link
Collaborator Author

@tyler-yankee tyler-yankee left a comment

Choose a reason for hiding this comment

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

I should also note that the pipeline script on the Jenkins job linked above will eventually be put into drake-jenkins-jobs, but I wanted to test and get something working before delving into that adventure.

Reviewable status: all discussions resolved, LGTM missing from assignee williamjallen, LGTM missing from assignee aiden2244, platform LGTM missing (waiting on @Aiden2244 and @williamjallen)

Copy link
Collaborator

@Aiden2244 Aiden2244 left a comment

Choose a reason for hiding this comment

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

:lgtm: recent Jenkins run matches the example you provided earlier.

Reviewable status: all discussions resolved, LGTM missing from assignee williamjallen, platform LGTM missing (waiting on @williamjallen)

Copy link
Collaborator

@Aiden2244 Aiden2244 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: all discussions resolved, LGTM missing from assignee williamjallen, platform LGTM missing (waiting on @williamjallen)

Copy link
Collaborator

@williamjallen williamjallen left a comment

Choose a reason for hiding this comment

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

I did a code-only review. Things look good in general, but I'm worried about the duplicated case statements between examples. Does anything verify that they are all the same? Even if all that matters is having the end result be the same, I worry that having different code to do the same or similar tasks in different places will create a maintenance nightmare in the future.

Reviewed 16 of 16 files at r1, all commit messages.
Reviewable status: 1 unresolved discussion, LGTM missing from assignee williamjallen, platform LGTM missing (waiting on @Aiden2244)


drake_cmake_external/.github/ci_build_test line 23 at r1 (raw file):

chmod -R a+w build || true
rm -rf build

This whitespace-only change isn't relevant to the rest of the PR and should be reverted.

Copy link
Collaborator Author

@tyler-yankee tyler-yankee left a comment

Choose a reason for hiding this comment

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

It is unfortunate that the only thing preventing us from including (drake_bazel_external/setup/install_prereqs, drake_cmake_installed/setup/install_prereqs) in the file_sync_test is the last line, passing --with-bazel to Drake's prereq installation.

Since it's only two examples, and they have some logical grouping (with Jenkins CI), I could see maintenance being slightly annoying in certain cases but not a nightmare.

Reviewable status: 1 unresolved discussion, LGTM missing from assignee williamjallen, platform LGTM missing (waiting on @Aiden2244 and @williamjallen)


drake_cmake_external/.github/ci_build_test line 23 at r1 (raw file):

Previously, williamjallen (William Allen) wrote…

This whitespace-only change isn't relevant to the rest of the PR and should be reverted.

If I understand correctly, this is a whitespace after the newline termination. My editor must have automatically made the change.

I'd argue we're making enough modifications to this file in this PR, that a change to keep the whitespace and newline style consistent with the rest of the code base should be warranted.

Copy link
Collaborator

@williamjallen williamjallen left a comment

Choose a reason for hiding this comment

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

Comments have been addressed with reasonable justifications for the current approach.

Reviewable status: all discussions resolved, LGTM missing from assignee williamjallen, platform LGTM missing (waiting on @Aiden2244)

Copy link
Collaborator Author

@tyler-yankee tyler-yankee left a comment

Choose a reason for hiding this comment

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

+@jwnimmer-tri for platform review, please!

Reviewable status: all discussions resolved, LGTM missing from assignee williamjallen, LGTM missing from assignee jwnimmer-tri, platform LGTM missing (waiting on @Aiden2244 and @jwnimmer-tri)

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.

4 participants