I'm not one of the original authors, however I suspect that is because if
you are using pipelines-as-code they generally expect folks to clone/copy
the original pipeline yaml/json/groovy rather than use an alternate
representation via the UI, so it possibly wasn't a priority.

The Admin > Pipelines tab does allow you to download/export to a different
pipeline-as-code format, or as you say, you can use the APIs to get the API
JSON representation.

For what it's worth you *can* fetch artifacts from the result of one
templated pipeline into another templated pipeline, but generally you need
to parameterise the upstream pipeline's *fetch path* from the downstream
pipeline template. In other words, when you create an instance of
downstream-pipeline from the template and you want to fetch from
upstream-pipeline3 you would set the parameter of "upstream-pipeline-name"
to "upstream-pipeline3". The fetch task inside the downstream-pipeline
template would have the pipeline value set to #{upstream-pipeline-name} and
otherwise hard-code the stage/job fetails to match the upstream template.

-Chad

On Mon, Apr 24, 2023 at 6:01 PM Stygian Smash <[email protected]>
wrote:

>     I originally wanted to clone multiple pipelines and modify their
> meterial to different git branch. But then I find out that I can't clone or
> extract template from pipelines that are defined in configuration
> repository. I wonder if there is any other way to accomplish this when
> using the "pipeline as code" feature. All I can think of is to encapsulate
> the GoCD api.
>     By the way, template may not suit me because I can not fetch artifacts
> from another template
>
>     Thanks in advance.
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/go-cd/550e59f7-6692-47a1-aa0e-273be3eeb37dn%40googlegroups.com
> <https://groups.google.com/d/msgid/go-cd/550e59f7-6692-47a1-aa0e-273be3eeb37dn%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/CAA1RwH8iZiEW-ouW1eFCVRhzfeNn_83i6gSbMS_zU%2B9h1gkhmg%40mail.gmail.com.

Reply via email to