Hi,

We currently have two simple pipeline jobs, one for each 
repository/application we are building. These jobs are triggered when 
someone pushes code to the repository in GitLab. So if you push code to the 
api repository on the develop branch, it will trigger the api job in 
Jenkins, clone the develop branch, run some tests and then save the 
artifacts. This works great. We have then a "installer" pipeline job that 
we will run manually. This job will be using artifacts from these two other 
jobs and I'm using Copy Artifact plugin to achieve this. The tricky part 
here is that I would like to specify in the installer job which branches to 
get the artifacts from. So my idea was to have a parameter (ex: API_BRANCH) 
for each application. I can get artifacts from the last successful build by 
using Copy Artifact plugin but that could be any branch, the last pushed. 
It is possible to filter on parameters with Copy Artifact plugin which 
would have worked, but the GitLab plugin does not send variables (such as 
branch) from GitLab as parameters, so that will not work.

So my question is if that is possible to tag/name artifact in some kind of 
way. So when someone is pushing code to a repository and the build is 
successful, it will save the artifacts and name/tag it "repo-branch" or 
something similar. Or if it possible to set parameters on a job from 
variables sent in. I could then use parameter filters with Copy Artifact to 
get the last successful build from the build with the parameter=develop. 
Another idea I had was to clone the repositories with the SCM module 
instead, but that doesn't work since one of the application has to be 
built. And it also feels a little bit ugly to use files that have not been 
through the whole "pipeline".

I'm sorry if the description is a little bit unclear. It can be hard to 
explain something that you are not sure about. I have tried to search and 
see how other peoples have been solving this but I have not been able to 
find a similar "case". I could also be thinking very wrong and that there 
are much better ways to what I want to do.

Thanks in advance,
/Daniel


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/09edbc6d-80a0-4286-8ca6-0d60dc5e8a8b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to