Fetching artifacts from failed pipeline

26 views
Skip to first unread message

Tobias Petrén

unread,
May 10, 2019, 7:21:13 AM5/10/19
to go-cd
Hi.

I have pipeline A that creates an artifact (regardless if the pipeline fails or not). Pipeline B is supposed to fetch this artifact but I seem to only be able to fetch the artifact when pipeline A has passed. If pipeline A fails, pipeline B will fetch the artifact from the latest time that pipeline A passed.

How do I make it so that pipeline B always fetches the artifact from pipeline A (regardless of if it failed or passed).

Regards,
Tobias

Ashwanth Kumar

unread,
May 10, 2019, 7:47:07 AM5/10/19
to go...@googlegroups.com
Short answer: You can't. 

The principle in general is to fetch only artifacts from successful builds, because fetching artifacts from builds would mean the output may be incomplete or not even present. There isn't any deterministic way to know. Hence you can't do that. 

Given that, I can think of two possible solutions to your problem
  1. Given you care more about your artifacts from pipeline A and it's being generated fine, why does the pipeline A still fail? 
  2. May be you can consider breaking your pipeline A into 2 stages (if not already), where the first stage produces the artifacts and pass successfully while the second stage can contain the tasks that might fail today. In your pipeline B, you can depend on pipeline A's first stage that way you can be sure that you're always getting the latest green build's artifacts of the pipeline A. 

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/823ebf09-9b06-4a7f-93a3-ce6878c43832%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Ashwanth Kumar / ashwanthkumar.in

Reply all
Reply to author
Forward
0 new messages