A few suggestions: 1. By environment. if you're referring to Environments in GoCD, then you should be able to clone the pipeline and assign the environments accordingly after the clone. It's a few extra clicks but the easiest way. 2. If you can convert the pipeline to YAML/JSON then you can use any of the pipeline as code libraries <https://github.com/tomzo/gocd-yaml-config-plugin#environment> to write the plugins. This is the next best way to do that, and it also has benefits like easy maintenance and review into what changed directly as part of your code. This is the recommended approach if you already have pipelines as code or want to invest in it to decouple the whole process from GoCD. 3. Another way is to copy the *<pipeline>...</pipeline>* parts of the ( cruise-config <https://docs.gocd.org/current/configuration/configuration_reference.html#pipeline>) XML, change whatever that's needed and paste it (with a different value for the *'name="..."'*) so it becomes a new pipeline. Then update the *<pipelines>...</pipelines> <https://docs.gocd.org/current/configuration/configuration_reference.html#environment-pipelines>* inside the *<environment>...</environment> *XML tags to associate them to the right environment. You might want to do this only with a maintenance window, so there aren't any external writes during that time to avoid missing changes.
As always, please always take a backup <https://docs.gocd.org/current/advanced_usage/one_click_backup.html> before attempting to play with the config XML so you can restore back <https://docs.gocd.org/current/advanced_usage/one_click_backup.html#restoring-gocd-using-backup> in case of any issues. On Wed, 27 Jul 2022 at 14:59, Nayan Makwana <[email protected]> wrote: > I have more than 30 deployment server environment and I don't want to > create each & every pipeline for all the environment. I tried templating > option but it it not work in my scenario. so is there any plugin or api > available to copy whole pipeline because all environment have same > resource and functionality ? > > Thanks in Advance > Nayan MAkwana > > -- > 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/ca38034d-f661-4c99-802c-05394986b010n%40googlegroups.com > <https://groups.google.com/d/msgid/go-cd/ca38034d-f661-4c99-802c-05394986b010n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Ashwanth Kumar / ashwanthkumar.in -- 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/CAD9m7CwqVHQd1fBV4aCdjVFiN%3D7FJ1xhGzpegJgsjw6RbZMbWA%40mail.gmail.com.
