-
Couldn't load subscription status.
- Fork 1.1k
Description
What is your question?
Our team has been working on implementing the products pipeline flow from the CI Tutorial in the docs.
We do have similar Artifactory repos that correspond to packages, products and develop.
We have the build working pretty well with a re-usable GitHub Actions workflow. We can feed an arbitrary conanfile and a list of target profiles / build systems and have it build everything that is missing in a dynamic way, uploading to products along the way. What's still work in progress is the promotion workflow.
In the documentated example the entire flow can be summarized as:
- Create lockfile
- Generate build order for every desired configuration
- Merge build orders (with
--reduce) - Iterate through packages that need to be built, for each:
a) Build missing package
b) Convert build output to list
c) Upload list toproductsrepo (in practice will only be the one package that was just built, everything else will generally already be inproductsrepo because it must have been built earlier per build order). - Combine uploaded lists, preserve this somewhere
- Test the built packages in
productsrepo - Later promote uploaded list via
conan download / uploadorconan art:promoteusing persisted list fromstep 5.
This works pretty well, but I'm curious what you recommend for the following scenario:
- Let's assume we have a simple/flat build order of
PkgA/1.0,PkgB/1.0andPkgC/1.0. - Run
steps 1-4above and say thatPkgC/1.0fails to build butPkgA/1.0andPkgB/1.0have built successfully and have been uploaded toproductsrepo. - We don't continue to
step 5because of the failure and go resolve the issue withPkgC/1.0build (could be bad version or a build system issue, whatever). - We try to run
steps 1-4again and this time the reduced build order is onlyPkgC/1.0(becausePkgA/1.0andPkgB/1.0already exist inproductsrepo from earlier attempt), this completes successfully. - When we get to
step 7above we only have the list withPkgC/1.0soPkgA/1.0andPkgB/1.0are not promoted.
I see several ways to solve this but was wondering what others think:
- We could clear the
productsrepo between attempts. Not ideal because we share this repo among multiple products. I've seen mention that some teams dynamically create Artifactory repos on the fly for each run but this is not an option for us unfortunately. - We could go to each attempt (multiple workflow runs) and collect all the uploaded lists and combine those. Not ideal trying to find all these individual workflow runs.
- We could compute a complete build graph for each configuration, convert each to a list, combine and use that as the promotion list instead of basing it on what was built. Might be a little wasteful when using
conan download / uploadpromotion (maybe there is a way to filter out packages that are already indevelop?) but perhaps it is not a big deal withconan art:promote.
We're kind of leaning toward option 3 here, is that an OK approach? Are we totally missing something?
Thank you in advance!
Have you read the CONTRIBUTING guide?
- I've read the CONTRIBUTING guide