How to set up a ServiceNow CI/CD environment

Table of Contents

Table of Contents

If your DevOps teams are using ServiceNow, you may be wondering how to implement CI/CD or Continuous Integration/Continuous Deployment (or Delivery). Is it even doable? And if so, what is the best way to do it? Firstly—yes, implementing CI/CD on ServiceNow is possible. However, because ServiceNow isn’t as mature as other platforms, it’s much more difficult to do pure CI/CD.

Shifting your development model from global to scoped apps

The release of ServiceNow Orlando allowed users to manage application changes through the Source Control system (GitHub repositories) and release processes through a ServiceNow CI/CD pipeline. That said, this requires you to configure and shift your development model from global to scoped apps.

Doing so makes the development process more modular and isolated. Scoped applications in ServiceNow allow for better control and management of the application lifecycle. 

Each scoped app acts as a standalone entity, ensuring that any changes or developments made within one app do not impact others. A scoped application setup aligns perfectly with the principles of CI/CD, facilitating smoother and more efficient development workflows.

Introducing a Source Control system in the development process allows you to:

  • Collaborate better: Effectively manage code changes for multiple developers on your team by using Git repo integration.
  • Optimize and streamline ServiceNow DevOps: Automate change deployment and get them from development so you can run tests and go into production faster.
  • Accelerate development: Deliver applications rapidly so your team can iterate on feedback early and often.

So, what does CI/CD mean in ServiceNow terms? For starters, development teams can work in a shared Git repository for better collaboration. Managers also have full transparency of the work being done. And excitingly, deployment pipelines can be automated from development all the way to production.


Is this part of the agile model?

Agile development teams need a CI/CD-enabled platform to automate end-to-end development and deployment processes. CI/CD enables ServiceNow developers to leverage modern-day Continuous Integration and Continuous Delivery toolsets. As such, they can innovate with the agility needed to meet the increasing demands of today’s users and scale with the growing complexity of unique business objectives and KPIs.

The benefits include:

Improved developer collaboration with selective commits and collision avoidance. When multiple developers are working on different features of the same application, they can individually commit their changes to the Git repository. 

Let’s say one developer is working on improving the user interface, while another focuses on backend logic. They can separately commit their changes without overwriting each other’s work, significantly reducing the risk of code conflicts.

Simplified application development with branching and merging within Git repositories. This facilitates developers to work on different versions or features of an application simultaneously. 

For example, a developer can create a new branch in the Git repository to develop a new feature while the main branch remains stable. Once the feature is ready and tested, it can be merged back into the main branch, streamlining the development process and ensuring that new features are integrated smoothly.

Automated deployments with IntegrationHub Spokes and CI/CD REST APIs. You can streamline the process of moving code from development to production. 

For instance, once a developer commits code, it can automatically trigger a series of actions like code analysis, testing, and deployment to a staging environment. After successful testing, the code can be deployed to production through automated pipelines, reducing manual effort and speeding up the deployment process.

Git plays an important part in ServiceNow CI/CD

ServiceNow CI/CD: The setup

The setup is straightforward in any ServiceNow instance upgraded to Orlando or beyond. 

Open the App Engine Studio app, create a new Application, and configure the Source Control repository (external services like GitHub, BitBucket, and others are free with private and public options). 

From there, you can use the Studio functions such as:

  • Create a repository
  • Create branches
  • Link an application to source control
  • Commit application changes to source control
  • Compare application file differences
  • Include application table records in an application
  • Merge committed changes from a branch
  • Create and manage stashes
  • Create tags
  • Avoid and resolve conflicts when working collaboratively

Working with ServiceNow CI/CD

Development of business rules, UI scripts, and other components can continue as usual, but now you use the Studio to push your changes. That way, any changes can be pulled from other instances and tested without the need to publish the application into the internal apps repository.
Different teams have the ability to work in different branches without conflicts until they decide to merge their changes into the main branch to be deployed in a user testing instance.

Promoting high quality app development

Implementing CI/CD can be extremely beneficial for DevOps teams, as it streamlines the development process and ensures a higher standard of code quality before reaching the user testing phase.
This approach encourages regular, smaller updates rather than large, infrequent ones, which then leads to a more agile and responsive development cycle. During this phase, rigorous quality controls become crucial. At this stage, we recommend implementing Quality Gates.

Quality Gates helps ServiceNow platform owners to separate and prevent new quality issues introduced since the baseline, putting the focus on new issues instead of legacy issues and save time on code reviews.

Recognized as a critical component of IT projects, Quality Gates come in the form of a checklist that you review at specific phases of the project. This enables teams to spot and reject code with high-severity issues from being merged into the main branch. Gates are previously shown to the developers during their regular activities, but it is not compulsory to fix them until they are happy with the functionality or during their development.

At Quality Clouds, we implement Quality Gates on ServiceNow by checking for items like:

  • Business Rules defined on the Global table  
  • Unused Inactivity Monitors 
  • Potential Recursive Business Rules 
  • GlideRecord usage on Client Scripts 
  • High Security Settings plugin disabled and more.

Correcting these items before deployment ensures the application’s performance and security are optimized, reducing the risk of critical issues in the production environment.
For instance, addressing unused inactivity monitors can prevent unnecessary resource consumption. Meanwhile, handling recursive business rules helps you sidestep system crashes or performance degradation.
By proactively resolving these high-severity items, you can guarantee a smoother and more reliable user experience post-deployment.

We help automate quality control in ServiceNow

At Quality Clouds, we believe Continuous Quality (CQ) is the best way to build clean code proactively. Accomplishing this uses CI/CD tooling to detect and reject potential quality violations that may imply technical debt and hidden risks.

Now, the state of a ServiceNow application may be checked into GitHub source control, and the same application may be deployed onto any number of ServiceNow instances. The result? You reduce human error and enable a rapid /agile development paradigm where features are continuously developed and tested. Teams implement a fast feedback loop that’s achieved by automating the testing and release process (i.e., the DevOps model).

Quality Clouds helps software development teams maintain quality control on ServiceNow by giving you tools to implement a ServiceNow CI/CD pipeline. From real-time code checking to analytics and reporting, these features provide comprehensive oversight and control over the development process.

Ready to get started?

See how Quality Clouds can enhance your ServiceNow platforms' governance, compliance, and quality in real-time.

What is CI in ServiceNow?

Continuous Integration (CI) in ServiceNow is the practice of automatically integrating code changes from multiple developers into a single software project. It involves regularly merging code changes into a central repository, where automated builds and tests are run. ServiceNow CI typically uses tools like Source Control to manage and track these changes in the ServiceNow instance.

What is CI/CD as a service?

CI/CD as a service refers to cloud-based solutions that provide CI/CD tools and infrastructure. These services allow development teams to automate their build, test, and deployment processes without having to set up and maintain their own CI/CD infrastructure. They typically offer scalable, flexible, and accessible platforms for implementing CI/CD pipelines.

How can you use CI/CD on ServiceNow?

In ServiceNow, you can use CI/CD by integrating with source control systems like GitHub, GitLab, or Bitbucket and setting up automated processes for code integration, testing, and deployment. ServiceNow offers tools and features, such as the Automated Test Framework and Flow Designer, to support these processes. This allows for smoother transitions from development to testing and production and ensures higher quality in application delivery.
Interested in what we do?
Find out how Quality Clouds can enhance your SaaS platforms' governance, compliance, and quality in real-time.
Angel Marquez
With over 25 years of technology and business development experience in the industry. Specialized in application lifecycle development, governance and enterprise architecture. Worked with major technology companies in Financial Services and consultancy firms. As an entrepreneur, launched a Salesforce services company in 2011 to help implement Salesforce successfully. Expertise: Including large software architectures, DevOps, ALM, ServiceNow, Salesforce and Microsoft Cloud. Tough leadership in setting up governance frameworks and quality assurance programs across enterprises.

Want to learn more? Let's talk: