-
Notifications
You must be signed in to change notification settings - Fork 985
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
Best way to promote packages #8934
Comments
No, you are totally right:
We need to start making this more evident in our docs.
Yes, the best strategy is what you have described, promotions of immutable packages from one server repo to another server repo.
Artifactory < 7.13 had a bug in the promotion of Conan packages, but if your Artifactory is above that, you should be able to use the "copy" command in the UI or the Artifactory API to promote packages from one repo to the other. This is much faster than the We were using the |
I use conan copy to test on a temporary location, and then promote to its final destination. I do not want to create 2 repositories each time. Would it be possible to create 2 packages (one to test), and zip the other package (so no conan repository publication) that would be uploaded to our conan repository only on the official "go" (that is, at the very end of our pipeline, we have this promotion job). This would allow conan to respect the "immutability" principle but still allow me to make available to the outside world only when I want.
I still think this validation tests step is needed even on master. In theory this would have been caught during MR, but in practice, some tests are so expensive we only do them on master. Some project might only want to promote on a daily or weekly basis:
Some project uses unstable as an intermediate staging area. In the non-mutable concept this would require to have 3 repositories !!! |
Yes, it will require 3 repositories. This is a known best practice, that has been proven to work at scale for other languages and package types. There are many advantages to this approach:
It is not necessary to create 3 repos everytime for every change, but instead 3 repos can be used for all different changes. The important piece is not to put things in important repos that haven't passed some quality check. |
@memsharded API copy is not going to work with Artifactory CE for C/C++, right? |
Hello. I am still investigating on how to be compatible with Conan 2, because promoting packages from user/channel to user/channel is essential to the way we build and make our package available to the rest of the developers. The way we build, test and release our package might not be the cutting edge state of the art but it is proven scalable and repeatable. However, like you said, some packages with conditional statement on their user/channel is not compatible with the promotion scheme (and they basically broke everything else, so we tend to not do any logic in the user/channel part of a package in a recipe). Here is basically our workflow:
I think I can live with requesting project teams to create 3 repositories with 3 retentions policies on Artifactory, instead of 1 repository with 3 retentions policies with slightly hard regular expression to write (we clean old package on unstable and testing). Working with 3 repositories actually simplify a lot this maintainance. |
In a project using conan 2 and Artifactory 7.84 we want to copy a conan package from one Artifactory (source) repo to another one (target).
To not route all the traffic slowly and costly via a client (conan download & updaload) we are looking for possibilities to do a server-side copy. Basically what we are looking for is a command or function which takes as input a lockfile and transfers exactly and only these recipe revisions and package revisions from one Artifactory repo to an other. Is there any function of command for that? As far as I understood the Artifactory copy function it can only copy single files or folders but not a specific conan package revision (which is only a subset of the files and folders in the source repo). |
Hi @SzBosch and all. This thread is a bit outdated. Now, the conan-extensions repo contains a We are also explicitly documenting CI flows including promotions, see ongoing work in conan-io/docs#3799. I'd suggest to close this ticket as responded, and you can create new tickets for any further question based on those resources. Thanks! |
Closing as outdated, for any further questions or issues, please create new tickets in https://github.com/conan-io/conan-extensions |
As we use pipelines to build packages and then run tests, we thought we would use an Artifactory repo promotion scheme to "upgrade" the status of our packages. For example, we build and create a package on a dev branch, and upload its binaries to conan-dev. Then spend time running through system tests. Once the package is vetted (could take weeks), we would move the package from a conan-dev repo to a conan-release repo in Artifactory.
The separate repos has an advantage of we can setup separate purge policies on each repo. (packages will only stay in conan-dev for 3 months, but will stay forever in conan-release).
It looks like from you documentation you never talk about moving packages or package promotion like this, but instead you may use a strategy of changing the channel reference of a package, so that name/version@user/dev will get renamed to name/version@user/release, but the package would stay in the same artifactory repo.
2a) We also have to sneaker net a mass amount of packages to another network and Artifactory. What is the best option to do a mass copy of packages?
The text was updated successfully, but these errors were encountered: