How to Automated Deployments using Build and Release Pipelines

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2022 08:00 AM
Our team is looking at how to automate deployment from dev to test instances using Azure Pipelines, Git Pipelines, etc. Are there any API endpoints available to initiate a "Publish" and/or "Install" command on a ServiceNow instance? Basically, what we’re trying to create is a build pipeline that gets triggered by a pull request and then invoke the publish or install commands via a REST API call. This is basically what we do on the full stack development side of things (change is made, pull request approved, test is built). QA and Prod require a release approval.
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2022 08:16 AM
This is great Dale! After some initial investigation, it looks like to say publish an application I would need to do something like the following:
In ServiceNow:
- Install the Integration Hub Stater Pack
- Create a CI/CD credential to my repo.
- Create a Scripted REST API that calls the "Publish Application With Scope" subflow provided
In Jenkins, ADO, Github, etc:
- Create the build pipeline
- Trigger it manually
- Call the Scripted REST API endpoint with required inputs (i.e.scope, credential_alias, instance_url)
I'm going to try this and post my results. This won't work in a PDI since you can't publish to the store, so my goal is to at least hit the endpoint and get the error from the subflow.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2022 09:44 AM
Using this newfound knowledge, I've started a draft article on a software development lifecycle approach: https://community.servicenow.com/community?id=community_article&sys_id=ed60fb72db9f015008bbdb85ca961...