Let’s say you have several branch pipelines running. When a merge request occurs, it builds the docker image and all artifacts to test in the pipeline for the merge. Then when the merge is approved, it has to do the same build in the master pipeline to generate new images and artifacts so that we can push them to production.
My question is how can I get the master branch to see the previously built artifacts from a previous pipeline and use them, so that instead of rebuilding, we just do some kind of release step. I know about the Jobs api, but how can I dynamically specify to gitlab which is the correct pipeline to pull the artifacts from?
We are using Jfrog to publish the artifacts to. The main question I run into is how do you know which branch you would want to pull the artifacts from. Since multiple branches may publish artifacts around the same time, and you may not want the most recent one.
Also, we are using Merge Train. I don’t know if that matters.
What are you seeing, and how does it differ from what you expect to see?
Currently we build/publish all images in the merge request pipeline, and do the same in the master pipeline.
What version are you on (Hint:
/help) ? and are you using self-managed or gitlab.com?