Automatically create change request ticket in ServiceNow
We have a customer who wants to integrate GitLab pipelines with ServiceNow. Whenever there is a requested change to production, that is already mediated as a change management system within ServiceNow. So they want GitLab integrated. A change in production could be new code that is deployed, a change to environment variables, or a change in infrastructure. Whenever, there is a change to production, there should be a change request, represented as a ServiceNow ticket. That ticket allows people to approve the change request, as well as possibly even create downstream validation tasks.
In particular, here is a requested workflow/integration with GitLab.
New code is ready to be deployed to production, by GitLab, via a merge request pipeline. As part of that GitLab pipeline, it calls out to ServiceNow to create a change request ticket. When that change request ticket is approved, it calls back to GitLab, to continuing the deployment pipeline. When the deployment is complete, GitLab calls out to ServiceNow again, and adds a
validation task to the change request ticket. This will allow a business user or maybe another automated process to validate the change in production is valid, perhaps performance-wise or correctness-wise.
How should GitLab talk to ServiceNow? Should it block the pipeline? Or should it be async callbacks? Should it be event driven? How will credentials be handled on both ends?