Jenkins Build Promotion Strategy

24 views
Skip to first unread message

Matt Harris

unread,
Feb 16, 2015, 5:43:32 PM2/16/15
to jenkins...@googlegroups.com
Hello,

I seem to be wrestling with jenkins and the build promotion plugin and I fear i'm misusing the technology.  A little backstory:

I have a simple .net web application that i build with ant into a zip file, and I have told jenkins to archive the artifacts upon a successful build.

I thought I would build 4 Promotion steps:
1 - promote to dev
2 - promote to qa
3 - promote to uat
4 - promote to prod

Each promotion step is essentially to copy the artifacts for the promoted build to 1 or multiple windows file shares. That's it.

My first stab at this was to write into my build.xml script a promote-to-xxx target that I could execute with ant on each promotion step. Basically I used PROMOTION_NUMBER to build a URL to the archived artifacts so I can download them with ant and then unpack them at multiple windows file share endpoints. I promote to dev at the conclusion of the build, and this works perfectly every time. However, if I IMMEDIATELY try to manually promote-to-qa, my build.xml is GONE, even though it will always exist in the workspace. I can only attribute this to the fact that the promotion is running on a different slave than the original build ran on. I've also since seen the blurb on the promotion wiki about how one should not rely on workspace files for promotions, so this attempt seems to be a bad implementation. On to the next idea.

My 2nd thought was that perhaps I could just use the copy artifacts plugin to copy the artifacts somewhere. This works, except for the part where I can't seem to use this plugin to unzip an archive. Also, if I have 5 endpoints, then I need to invoke this plugin 5 different times. It seems obvious the copy plugin was not designed for what I'm attempting to use it for.

So, I said all of that to ask this: Is there some other way these plugins were intended to be utilized? It seems I'm fighting with odd roadblocks at every turn. In my head it seems like the promotion plugin is made to do exactly what I'm trying to do, but I can't seem to find a simple or clean implementation that facilitates the functionality. Can anyone offer insight on the right thing to do here?
Reply all
Reply to author
Forward
0 new messages