Refactor publishing on CI to use a single job#3122
Conversation
c2c9e36 to
5e5f69a
Compare
There is also another one: if publication of a single module fails, we need to clean up staging area on Maven before restarting job, because we may have artefacts which are already there. |
|
🎯 Code Coverage 🔗 Commit SHA: 5e5f69a | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3122 +/- ##
===========================================
+ Coverage 70.77% 70.80% +0.03%
===========================================
Files 893 893
Lines 33014 33014
Branches 5554 5554
===========================================
+ Hits 23363 23373 +10
+ Misses 8102 8100 -2
+ Partials 1549 1541 -8 🚀 New features to boost your workflow:
|
Thanks for mentioning this. For now I think it shouldn't be a problem. IIUC after this change all the artifacts will be grouped in a single "deployment" in Sonatype, so if something fails we'll need to drop only one "deployment". However I'm not a huge expert in this and haven't actually tried it, so I might be wrong. Edited release page so that during release we don't forget about it. |
What does this PR do?
Using a single invocation of
gradle publishToSonatypecommand to publish all modules. Now we don't have to update publishing tasks when we add a new module.The only potential downside of such change is that now all the modules will be built in the same container and the parallelism will be limited by the number of cores available there. Thus we can have a slight increase in the total build time in develop branch and during release.
However I don't expect the increase will be huge. We can check it here after the merge. I suspect that setting up the container, downloading gradle and other dependencies takes a significant chunk of the time https://gitlab.ddbuild.io/DataDog/dd-sdk-android/-/jobs/1336551097 (and now this will be done only once).
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)