5

It does not seem to be possible to change the name of an existing pipeline anywhere in GoCD. As simple as it sounds, is there any way to rename a GoCD pipeline that doesn't require a long series of actions in the UI?

The only way I was able to rename a pipeline is to clone it under a new name and then delete the old one. But deleting a pipeline also isn't straight-forward because is not possible to remove a pipeline that still belongs to some environment. Therefore, I first had to remove the pipeline from all environments and only then I was able to delete it.

There are some similar discussions about renaming pipelines here and there but since they are like five years old I thought a simple pipeline rename must somehow be supported in the meantime...

dokaspar
  • 8,186
  • 14
  • 70
  • 98

3 Answers3

10

You'll have to change the pipeline name inside the Config XML. To get there, go to: Admin -> Config XML. You'll need to change this in two places on the config.

Jamie
  • 306
  • 3
  • 3
1

You can use gocd api call https://api.gocd.org/17.3.0/#edit-pipeline-config and just

`$ curl 'https://ci.example.com/go/api/admin/pipelines/my_pipeline' \
      -u 'username:password' \
      -H 'Accept: application/vnd.go.cd.v3+json' \
      -H 'Content-Type: application/json' \
      -H 'If-Match: "e064ca0fe5d8a39602e19666454b8d77"' \
      -X PUT \
      -d '{
            "name": "my_pipeline",

          }'`
yadayada
  • 327
  • 1
  • 3
  • 14
1

First you'll have to un-link that pipeline from pipeline dependency and environment.

Then, you can go to 'Admin' > 'Config XML'and edit the name on XML file.

"Save" and You're good to go!

Twinkle
  • 11
  • 2