If we were to use GitHub Actions to build the war file and upload it as an artifact (to GitHub Actions), where would we add it to the workflow?
In our "build with Maven" step, we do a mvn install rather than a mvn package: https://github.com/IQSS/dataverse/blob/1c356b44f5f190d5da0c2dfd3ef42590accd5db1/.github/workflows/maven_unit_test.yml#L50
I'm interested in adding this to the Java 17 pull request, if possible.
The install is necessary because of the SPI module
It will build and install the WAR file in the local Maven repo as well
Do you want to have the WAR as an artifact independent of any integration tests running?
(Or maybe even use it externally to feed an integration test?)
If it should be uploaded after unit tests but before integration tests, that step needs to be in the maven_unit_test.yml workflow
Otherwise in container_app_push.yml
You probably see this line here: https://github.com/poikilotherm/dataverse/blob/1c356b44f5f190d5da0c2dfd3ef42590accd5db1/.github/workflows/maven_unit_test.yml#L70-L70
That's were I delete the WAR file from the local Maven repo so it won't be infecting the cache
Uploading an artifact should happen just before that step
I did notice that "We don't want to cache the WAR file, so delete it" comment. Make sense to have the artifact upload just before.
... if you want to upload before you know integration / E2E test results
well... :sweat_smile:
maybe we upload two versions: tested and untested :grimacing:
I'm confused though. The war is in ~/.m2/repository/edu/harvard/iq/dataverse rather than target?
It probably is in both
The install step will copy it from target to .m2
Ok, cool. Now I'm wondering to myself why I always type mvn package instead of mvn install. Both seem to create the war file.
Please be aware that the CI command always uses the parent module
This way, the SPI package (or any other future modules we might add) is in the reactor
We must use the install target for Maven, as package would invoke that target, but then the submodules would not be around when the main app is being built
@Oliver Bertuch do you feel like making a PR into https://github.com/IQSS/dataverse/pull/9764 to push the war file to GitHub Artifacts (or whatever it's called).
This is not critical as long as the SPI module did not change, as it can be pulled from Maven Central. But then the workflow breaks for PRs to the SPI module
Maybe we could prototype the war upload with this tiny app: https://github.com/IQSS/dataverse-people
Or we could go straight to the Java 17 branch :big_smile:
:+1: J17
Cool. Do you want to make a PR?
OK
Oh wait
PR or push?
PR onto J17 branch?
I think I'd like to look at it. It's already in QA. So PR please if you don't mind.
So PR for develop, aye?
Oh, I was thinking PR into the Java 17 PR.
But it's in QA?
Is that OK to add?
What's driving this is that we'd like to be able to point QA at a Java 17 war artifact.
Well, if it's a PR. I'll look at it and communicate with QA about merge it or not. The timing, basically.
Roger roger
Phew. Sorry so complicated.
If it was earlier (PR still in progress), I'd say just push directly to the branch.
Do you want an issue first?
Oh! If you want. Might be nice for tracking.
Maybe this will be the start of cutting releases with GitHub Actions. :stuck_out_tongue_wink:
@Oliver Bertuch I've always been told to do a package so I've always done a package - should I update all the Jenkins jobs (and Ansible, and whatever else) to install instead?
Retention days?
Oliver Bertuch said:
Retention days?
1, or 2, or 7 or whatever. This is for Kevin's benefit.
@Don Sizemore that depends on what you are trying to do. If you want to properly build the SPI along with the rest, see that job for the command to use
OK I'll make it 7 days.
7 sounds fine
I'll name the artifact dataverse-java$jdk.war so it's easier to keep them apart if we ever use the matrix again
(Same name = overwrite)
Sure, sounds fine.
We're aware of https://github.com/actions/upload-artifact#zipped-artifact-downloads rihgt?
Oliver Bertuch said:
We're aware of https://github.com/actions/upload-artifact#zipped-artifact-downloads rihgt?
that's minor.
No worries
@Philip Durbin here's the PR but there no code change so it won't run now. https://github.com/IQSS/dataverse/pull/9789
Should I push some small code change to test?
Yes, please
Walking the dog. Back soon.
Run is a success: https://github.com/IQSS/dataverse/actions/runs/5890761815?pr=9789
Artifact here: https://github.com/IQSS/dataverse/suites/15187396659/artifacts/867845145
Perfect. Merged! Thanks, @Oliver Bertuch !! ![]()
Wasn't very complicated.
Will impact build times though - takes ~44s to upload the data
Meh, it's worth the extra time.
I just summarized what we did here: https://github.com/IQSS/dataverse/pull/9764#issuecomment-1682261825
Thanks again!
Philip Durbin has marked this topic as resolved.
Last updated: Nov 01 2025 at 14:11 UTC