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

Create a build artifact?

Kendall Shaw February 28, 2015

I am having trouble understanding the documentation. I want the plan to create a file and have it presented in some way in a UI so that a human can click somewhere and get the file.

In a stage artifact definition, does artifact location mean the place where my build will put artifacts? Or is there some mysterious mechanism by which bamboo puts files in that location?

What is the copy expression relative to? If it's generic bamboo location blah, how does my script find out where that is so it knows to deposit files there for bamboo to copy, if that is necessary?

2 answers

1 accepted

0 votes
Answer accepted
Kendall Shaw March 1, 2015

The copy pattern is required, so I do need it. It is an inclusion pattern.

It appears that:

out/some-file

doesn't work, because the pattern is relative to the location.

Any of these work:

some-file

**/*

*

This does not:

out/*

 

https://confluence.atlassian.com/display/BAMBOO/Configuring+a+job%27s+build+artifacts

I missed this in the documentation:

  • The location is relative to the build directory. Do not use the absolute path to refer to the location.
  • The copy pattern is relative to the location specified.

"The build directory" is ${bamboo_agentWorkingDirectory}.${bamboo.buildKey}

Your build script puts the artifact into the specified location (as opposed to your build script needing to expect it to have been put there by some builtin task).

0 votes
Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2015

In a stage artifact definition, does artifact location mean the place where my build will put artifacts? Or is there some mysterious mechanism by which bamboo puts files in that location?

Whatever your build generates in the Tasks tab can be defined as an artifact in the Artifacts tab. You just need to give it a name, place to find it and what regex to find the artifact.

Kendall Shaw March 1, 2015

The place to find it and what regex to find the artifact is the part I am asking about.

 

Do I put the artifact there? Or do I find the artifact there?

 

I've tried using this definition, e.g.:

Location: out

Copy pattern: out/some-file

 

My build script puts some-file in ${bamboo_agentWorkingDirectory}.${bamboo.buildKey}/out

After the build, the file is there, but the result of the build says the job created no artifacts.

 

If Location means the place where Bamboo put the artifacts (somehow), I have no idea what value that would be.

Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 1, 2015

You need to understand the difference between "Location" and "regex". If you already specify the location, you don't need to add the location in your regex.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events