- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2024 04:49 AM
Hello community members,
Has anyone worked on CICD rollback functionality in Servicenow ?
Currently, I see two subflows available for rollback
one with sysid and other with scope id however the functionality is not working as expected tested multiple times with configurations but no clue . There is not even enough post or articles with respect to that.
Hence, if anyone has worked upon it please let me know your thoughts .
Regards,
Solved! Go to Solution.
- Labels:
-
cicd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 06:12 AM
Finally got solution of this after doing multiple rounds of testing on some other subflows like Batch INstall , to understand how the entire process of how CICD subflows works.
I found ServiceNow documentation for CICD piece bit inadequate.
However, I will share my learning. I hope someone, someday will benefit from it.
So the entire cicd for rollback piece works like this
Once you make chances in source instance in custom application for latest version and Submit it (for publishing)
A deployment request is created in target instance . And in that by default approvals for AES group is generated.
Once you approve the request and make the deployment request as close published , it doesnt update the
application to the latest version automatically at that instant .
Rather, you have to go to "My Company Applications" and search your custom
application and there you will see ( an orange dot appearing in your application) which is indication of
various versions available , so once you select the latest version you need to select update and then fill next popup select option to continue with INSTALL . Once you do this then the latest version is installed at that moment.
This is very important step.
Because while working on Rollback with ID , you will mention the older version in setup. But
the real fact is it is already on the old version since you didnt install the latest version . HEnce,
your rollback will fail multiple times with different reason.
-----------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 12:02 PM
In the subflow there are a couple of logging opportunities upon failure. Have you checked those logs in the flow execution details? If so, what errors are you seeing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 04:05 AM - edited 02-22-2024 04:06 AM
Hi Paige,
Thanks for response.
I checked those logs but somehow I am not sure what needs to be done to fix that.
For example :
Error received in one of the testing was like below:
status 3
status label : Failed
Error : empty
status message : This context is not the most recent recorded:CICD initiative , most recent context : some other custom app name.
I am not sure why this is coming despite providing correct app sysid , version to rollback to and url of the destination where it needs to rollbacked is correct..
Let me know your thoughts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 09:29 AM
Ultimately this is looking at the Rollback Contexts (sys_rollback_context) table. Try looking at that table and locating the item you are attempting to rollback. Ensure that the context is there. If you try to manually roll it back from that record do you run into the same or a similar issue? Have you tried to roll back multiple applications and run into the same issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2024 02:44 AM
Hi Paige,
Can't see anything related to the that item in Rollback context table (in source instance).
Yes i did try testing " Rollback with id/scope " for different custom applications but it didnt work.
Error I think is pretty much similar in all cases .
Note : I did try rollback of one of my sample app in target instance via information given in this documentation
since oob rollback flow was not working but that reflected only in that instance it didn't propagated to source instance.
Let me know your thoughts, also if you can point me to some support article with respect to handling CICD errors,
that would be helpful.