-
Notifications
You must be signed in to change notification settings - Fork 940
build and run testDocker on PRs #8846
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
Conversation
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
Signed-off-by: Sally MacFarlane <[email protected]>
so the error prone PR besu-eth/besu-errorprone-checks#13 fixes the root cause that was flagged initially here - so this besu PR would be just if we want to run build & test docker on PRs rather than just on merge to main. I would argue it's worth it if it doesn't slow down the PR build time. It takes 5 min and it's run in parallel. Maybe we would get enough signal from running on 1 of 2 runners |
def dockerBuildVersion = project.hasProperty('release.releaseVersion') ? project.property('release.releaseVersion') : "${rootProject.version}" | ||
def dockerOrgName = project.hasProperty('dockerOrgName') ? project.getProperty("dockerOrgName") : "hyperledger" | ||
def dockerArtifactName = project.hasProperty("dockerArtifactName") ? project.getProperty("dockerArtifactName") : "besu" | ||
def dockerBuildVersion = project.hasProperty('release.releaseVersion') && project.property('release.releaseVersion') ? project.property('release.releaseVersion') : "${rootProject.version}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this line achieve? project.hasProperty('release.releaseVersion') && project.property('release.releaseVersion')
? @macfarla
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
project.hasProperty is does it exist
project.property will give true if it's not null
kind of like getting a value from a java Optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basically this set of changes was to make sure docker org name and artifact name never get set to empty
@@ -0,0 +1,81 @@ | |||
name: docker develop build and test only | |||
|
|||
on: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can further enhance this by adding:
on:
pull_request:
branches:
- main
this will allow this workflow to only trigger for PR requests against main
branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
# Set the build target name as an environment variable | ||
echo "BUILD_TARGET_NAME=${BUILD_TARGET_NAME}" >> $GITHUB_ENV | ||
|
||
- name: Checkout Repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@macfarla Checkout Repo must (usually) be the first job i.e. should appear before Prepare.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in this case prepare has to be first because it sets up the platform and some environment variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - few comments that can be incorporated.
Signed-off-by: Sally MacFarlane <[email protected]>
PR description
Previously testDocker task was only run on merge to main. This PR modifies the workflows so that those checks run at PR stage
This PR starts with a commit to reproduce the issue with errorprone check not being picked up until buildDocker (merge to main), and then modifies the workflows so that those checks run at PR stage.* change was made to BlobType (remove final keyword) to trigger the original issueFor some reason the errorprone check only fails on besu-arm runner not the ubuntu-arm one or ubuntu-22-04eg on this run you can see the errorprone check fails the build for 1 of 2 runners https://github.com/hyperledger/besu/actions/runs/15864950425?pr=8846and once the final keyword is fixed, both runners succeedErrorprone root cause #8730 was fixed separately
Fixed Issue(s)
inspired by #8730
Thanks for sending a pull request! Have you done the following?
doc-change-required
label to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew spotlessApply
./gradlew build
./gradlew acceptanceTest
./gradlew integrationTest
./gradlew ethereum:referenceTests:referenceTests