Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Derive the Artifact URL for external reference?

JonnyG July 4, 2011

We just upgraded from Bamboo 2.7.2 to 3.1.4, and it looks like the URLs for the artifact files has changed.

Has anyone found a way to derive the URL for an artifact file so it can be provided to an external app which will download the package?

Currently, the URL looks like this:
/browse/<ProjectKey>-<PlanKey>-<BuildNumber>/artifact/<JobKey>/<Artifact Name Description>/ZipFileName.zip

Is there a way to derive this inside the NAnt job for any given random project artifact?

https://bamboo.mydomain.local/browse/${bamboo.ProjectKey??}-${bamboo.PlanKey??}-${bamboo.buildNumber}/artifact/${bamboo.JobKey??}/${??}/ZipFileName.zip

4 answers

1 accepted

1 vote
Answer accepted
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 5, 2011

Use first two parts of bamboo.buildKey to determine <ProjectKey>-<PlanKey>

Use bamboo.buildNumber to determine <BuildNumber>

Use last part of bamboo.buildKey to determine <JobKey> . Note that if your artifact is a shared artifact, you should use 'shared' instead of job key.

The <Artifact Name Description> is the label you have given to your artifact with spaces substituted with dashes.

JonnyG July 5, 2011

Thanks for your help, i was afraid it would involve some kind of string parsing :-\

Is the Artifact-Name-Description array not available from within Bamboo in any way?

1 vote
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 5, 2011

Well, it is. You can get the URLs and the array using REST calls, but that's slightly more complicated. Have a look at REST documentation ( <tt>results/result/artifacts/artifact/link</tt> )

JonnyG July 5, 2011

Thanks for your help!

0 votes
JonnyG July 5, 2011

We are providing the URL to an external program to store and later download the artifact. Thus the requirement for the full URL to the resulting ArtifactNameDescription\artifactName.zip location.

0 votes
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 5, 2011

Do you need the URL to use it to download the artifact or just to store the URL somewhere?

JonnyG July 5, 2011

We are providing the URL to an external program to store and later download the artifact. Thus the requirement for the full URL to the resulting ArtifactNameDescription\artifactName.zip location.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events