It's a reasonable question. Possible different way of thinking about this:

When you have varying numbers of artifacts that are related to one another,
put them in a directory together and artifact the whole directory as a
single artifact (on the upload side). That way it is not dependent on any
individual log, result etc. Either use scripting to collect them together
post build (pre artifact) or change build scripting to ensure things all go
into "one place".

If I recall correctly, you can still pull sub-paths of a given artifact in
dependent pipelines rather than the "whole thing", in a way that the
dependent job will fail if the artifact didn't include a given file/folder.
(if I am wrong on this, this is not a great suggestion) This would allow to
weaken some of the "contract" mentioned below?

-Chad


On Thu, Jan 11, 2024 at 12:29 PM 'Alexey Savchkov' via go-cd <
go-cd@googlegroups.com> wrote:

> Can we come back to this point in 2024? Optional artifacts is a valid and
> natural case and are common in other CI systems. For example, when running
> tests I want to collect core dumps if they occur. Another example is a job
> which depending on its input parameters produces a varying number of
> artifacts (optional debug files, logs, reports or similar). The necessity
> to make dummy artifacts in all such cases only to satisfy GoCD internal
> logic is troublesome and disturbing. Could you please consider adding an
> "optional" attribute of the artifact element?
>
> четверг, 25 июня 2015 г. в 20:10:09 UTC+6, Aravind SV:
>
>> On Thu, Jun 25, 2015 at 7:19 AM, Pat McGrath <pmcg...@gmail.com> wrote:
>>
>>> So it seems unless you generate content the job will fail, is it
>>> possible to indicate that the artifact is optional ?
>>>
>>
>> No. :( The artifact declaration is a contract, something the downstream
>> pipelines can depend on.
>>
>> You can have a final task which creates dummy files, I suppose. But, that
>> feels like cheating. If a downstream pipeline uses it, then it will need to
>> validate that it is not a dummy file.
>>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/go-cd/aa2762ac-18e9-4fff-a7bc-37a7a92be694n%40googlegroups.com
> <https://groups.google.com/d/msgid/go-cd/aa2762ac-18e9-4fff-a7bc-37a7a92be694n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/CAA1RwH8hmiS8%3DDidFVTqjAERs6-tG%3Dnmed_O5%2B5cuY%3DPzj0%2BpQ%40mail.gmail.com.

Reply via email to