Get artifact path for latest build of a specific branch?

I can see from the documentation that I can get the artifact path of the latest build like so:
/repository/download/PROJECTNAME/.lastSuccessful/ArtifactStuffHere.html

But what I really want is to get to the last successful build of my branch (which is the default branch of the build config)
/repository/download/PROJECTNAME_ANDBRANCHSPECIFIED/.lastSuccessful/ArtifactStuffHere.html

I am using GIT for source control.  Does anyone know how to do this?

2 comments
Comment actions Permalink

Hi,

To download artifacts of the last successful build for a specific branch please add "?branch=<branch_name>" parameter to the end of the corresponding URL.

0
Comment actions Permalink

How can I be sure I am getting the master branch?  If I add that querystring and put nonsense in it I still get to my artifacts.

/repository/download/PROJECT/.lastFinished/index.html?branch=mssaster
/repository/download/PROJECT/.lastFinished/index.html?branch=master

Both of these show the same result so how do I know?

NM Its working

0

Please sign in to leave a comment.