Programatically upload update sets after clone finish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2024 05:29 AM
Hi all!
Here at my company, we have a few non-prod ServiceNow instances used in our release cycle. For these instances, we've built a few code utilities and make use of a few community utilities such as addToUpdateSet and Xplore. However, we're very strict about what we deploy to Prod, so these utilities are always redeployed *only* to the non-prod instances after we finish a clone. This is a time-consuming task, so I'm looking into ways to automate it.
My main idea is to store the update set XMLs as attachments somewhere inside the instances themselves and have a flow or similar tool use some sort of upload API to load the XMLs into the instance as records (the same process the front-end does). Then, we could preview and commit them. The problem is: I don't know which APIs to use for this. Does anyone have any insights or could point me in the right direction? 😃
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2024 08:18 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2024 09:28 AM
Hi there,
What you might do is having the update set on PRD, though only in your retrieved update sets. This way it will always be cloned to the target instance for the clone. Personally I don't like such update sets in PRD, though that's up to you ofcourse. It might limit a manual step of having to import the update set.
Then have clone cleanup script, to preview and commit the update set. Shouldn't be to difficult, since the code to preview and commit is available on your instance. Just open the UI Actions which you normally manually use 🙂
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field