Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to fail a build because there are no artifacts?

Deleted user Apr 19, 2015

In Bamboo (5.7.2) one can have multiple artifact definitions for a given build plan. Am I missing something, or it does not seem possible to configure for each artifact definition how many artifacts it must produce, otherwise build should fail. Now it seems that one can have many artifact definitions but all are allowed not to produce any artifacts, and build will just happily pass and output "There have been no artifacts set up for this job." even though definitions are there.

3 answers

1 accepted

1 vote
Answer accepted

The build will only fail if Bamboo detects that there are jobs with artifact subscriptions for that artifact. You could set up a job depending on all these artifacts. Make it run on a local agent to make it faster.

Deleted user Apr 19, 2015

It's a workaround, yes, thanks. Already applied similar workaround, created a stage in same build, after artifact producing stage, to download and verify that artifacts are there. But that's stupid. I should be able to at least control those constraints from artifact definition, choose whether it's ok for no artifacts to come out of artifact definition or not. Created a bug report https://jira.atlassian.com/browse/BAM-15872

That behaviour is by design, it's not a bug.

Deleted user Apr 19, 2015

Please give me an example, where that behavior is useful, that same artifact definition in same build plan sometimes produces and sometimes not artifacts, and that you'd like/expect build to pass in both cases. Please share link(s) if this behaviour of artifact definition is documented somewhere. I only see one hint of this behavior on build definition create/edit popup page, it has this note "If you subscribe to an unavailable shared artifact the build will fail.". What if artifact is not shared? Do you think this behaviour adheres to principle of least astonishment? In other words, would you expect this behaviour as Bamboo user?

Like typoheads2 likes this

I completely agree with @[deleted].  This designed behavior makes no sense.  Please explain the logic behind the design of this behavior.

Like typoheads2 likes this

For anyone coming back to this thread it looks like a required checkbox has been added to the artifact definition.

https://confluence.atlassian.com/bamboo/configuring-a-job-s-build-artifacts-289277071.html

Like Elisha Mooring likes this

I came back to this thread :) running Bamboo version 6.7.2

However, {{required}} option does not seem to work anymore (since we upgraded from Bamboo 5.9(?).x).

I had accidentally specified the wrong location for my xml and even though it was a {{required}} artifact the build did not fail, it just published the artifact with 0 bytes.

 

What is going on?

 

Should be noted: Plan is run on a remote (linux) agent, while the Bamboo server is running on Win 10 machine. However, the artifact successfully publishes if the path and filename is correct (and not wrong as I mentioned above)

I have the same seen the same behavior on 6.7.2 build 60706.

Did you find any success in either solving or explaining the contradiction?

I agree with Stevo on this one. I have a build and then I can't create an artifact because the necessary artifact subdirectory does not exist. Why do I want that to be successful? It violates your whole premise of Fail Fast because, now, some downstream build is going to fail not the original one.

You even highlight the error in red in the log file - so I don't think even you guys think it's successful.

Maybe there are  times when artifact creation should not be a failure, but it should be simple enough to add a boolean for this in the artifact definition.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

190 views 4 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you