lastSuccessful promotion artifact url

4 views
Skip to first unread message

Tim Williams

unread,
Feb 11, 2015, 2:06:38 PM2/11/15
to jenkins...@googlegroups.com
Hi All,
I'd like to know how to get an artifact of the lastSuccessful
promotion independent of the project build number.

For example, I figured I can get the artifact for a known project build by:

/job/${project-name}/${build-number}/promotion/${promotion-name}/lastSuccessful/target/artifact/target/foo.war

or concretely,
/job/foo/45/promotion/integration/lastSuccessful/target/artifact/target/foo.war

But, I'm interested in the artifact of the last successful promotion
to "integration" - regardless of the project's build number.

I know I can use lastBuild for the project-build number but this
particular promotion is manual so it can't be expected to be promoted
on every build. I suppose I could walk the build backward until I
don't get a 404 for the lastSuccessful, but that feels so very
wrong... hopefully there's another way?

Thanks,
--tim
Reply all
Reply to author
Forward
0 new messages