GoCD Pipeline Views - Can they be copied across users?

Skip to first unread message

Chris Gillatt

Aug 22, 2023, 4:21:30 AM8/22/23
to go-cd
I think that the user-configurable pipeline views in GoCD are stored against the user in the DB.  I'm pretty sure that without messing around with the DB, migrating views (or sharing or exporting them) would not be possible.  Could anyone confirm this please?

The reason I ask is that we've migrated from one auth plugin to another, and as a result, all users now have a new username (old: user.name, new: user.name@domain).  This means the users have lost their views.  It's not a biggie, and moving from LDAP to OIDC auth is a much bigger win than keeping views, but thought I'd just ask the question.


Chad Wilson

Aug 22, 2023, 5:11:07 AM8/22/23
to go...@googlegroups.com

While it comes with some risks, it probably wouldn't be super difficult to update the views/filters (PIPELINESELECTIONS) to point to the new user IDs for each user with an appropriate query? IIRC there should be max one row per user (can't recall if it's 1-to-(0,1) or 1-to-1 from USERS).

Not aware of any specific export or share support. The UI uses an internal API /go/api/internal/pipeline_selection to retrieve (GET) and update (PUT) the views in one big block as an array of "filters", which in theory you could use to get a JSON representation of your individual views if you can still login with the old username. If one is more savvy, one could then also PUT the collection back to the same API to update views when authenticated with the new username - but obviously this is undocumented/unsupported and would require some browser "Inspect" digging :-)


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/8280b950-9e20-4291-845a-e35de44634ffn%40googlegroups.com.

Chris Gillatt

Aug 22, 2023, 5:39:35 AM8/22/23
to go-cd
Thanks Chad - I'll take a look at those suggestions!
Reply all
Reply to author
0 new messages