ServiceNow DevOps custom actions from GitHub marketplace
-
- UpdatedJan 30, 2025
- 7 minutes to read
- Yokohama
- DevOps
Use the custom actions from the GitHub marketplace to collect SonarQube scan data, security data, pause or resume workflow, or resume workflow until a change request is approved or rejected in your instance, or get and update change request details and so on.
Alternatively, you can use Docker container images to implement custom actions for GitHub Actions pipelines. For more information, see Implement custom actions for pipelines using generic Docker container image.
ServiceNow DevOps SonarQube custom action
Save the SonarQube scan results of a project initiated by the workflow run in your ServiceNow instance. You must create the SonarQube tool in your instance and use the ServiceNow DevOps SonarQube custom action at the steps level of a job in the workflow.
- Navigate to .
- Navigate to Task Execution record. and selecting a relevant
- Create SonarQube tool in your instance.
Generate token from ServiceNow instance using the generated token. For more information, see Onboard SonarQube to DevOps Change Velocity — Workspace and Onboard SonarQube to DevOps Change Velocity — Classic.
page in your SonarQube tool and create tool in the - Create the following Secrets to save SonarQube scan results in the ServiceNow instance.
- SONAR_HOST_URL: SonarQube instance URL. For example, https://sonarcloud.io
- SONAR_PROJECT_KEY: The key to identify a project in the SonarQube instance. For example, org.examples:demo
- Configure the ServiceNow
DevOps SonarQube custom action in the workflow.
The custom action
servicenow-devops-sonar
must be configured at steps level of job in the workflow with uses keyword. The inputs of this custom action must not be tampered to save SonarQube analysis results in the ServiceNow instance. For more information, see ServiceNow DevOps Sonar.
ServiceNow DevOps Test Report custom action
Save unit test results of the project initiated by the workflow run in your ServiceNow instance. The ServiceNow DevOps Test Report custom action must be used at the steps level of job in the workflow.
View the unit test results saved in your ServiceNow instance by navigating to .
You can also view by navigating to Task Execution record.
and clicking a relevant- Create Secrets in the GitHub Repository.
- Configure the DevOps Test Report custom action in the workflow.
The custom action
servicenow-devops-test-report
must be configured at steps level of job in the workflow with uses keyword. The inputs of this custom action must not be tampered to save the unit test results in your ServiceNow instance. For more information, see ServiceNow DevOps Test Report.
ServiceNow DevOps Register Artifact custom action
Save artifacts created or deployed by the workflow run in your ServiceNow instance. Use the ServiceNow DevOps Register Artifact custom action at steps level of job in the workflow.
View the artifacts details saved in your instance by navigating to
.- Create Secrets in the GitHub Repository.
- Configure ServiceNow
DevOps Register Artifact custom action in the workflow.
The custom action
servicenow-devops-register-artifact
must be configured at steps level of job in the workflow with uses keyword. The inputs of this custom action must not be tampered to save artifact details in your instance. For more information, see ServiceNow DevOps register artifacts.
ServiceNow DevOps Register Package custom action
Save packages created or deployed by the workflow run in the ServiceNow instance. Use the ServiceNow DevOps Register Package custom action at steps level of job in the workflow.
View the package details saved in the ServiceNow instance by navigating to .
- Create Secrets in the GitHub Repository.
- Configure ServiceNow
DevOps Register Artifact custom action in the workflow.
The custom action
servicenow-devops-register-package
must be configured at steps level of job in the workflow with uses keyword. The inputs of this custom action must not be tampered to save artifact details in your instance. For more information, see ServiceNow DevOps register package.
ServiceNow DevOps Change Automation custom action
Create a change request in the ServiceNow instance to pause and resume the workflow run from the ServiceNow instance.
Use the ServiceNow DevOps Change Automation custom action at steps level of job in the workflow. If the change is not created within the time period specified in the threshold (changeCreationTimeOut), and the abortOnChangeCreationFailure parameter is enabled, the pipeline will be aborted.
This custom action creates a change request in ServiceNow, enables the Change Control option, and polls the ServiceNow instance at the defined time interval for change status until either the change is approved or rejected or the timeout threshold (timeout) is reached. GitHub aborts the workflow run if the timeout threshold is reached and the abortOnChangeStepTimeout parameter is enabled.
This custom action immediately resumes the workflow run when change receipt is enabled for pipeline in ServiceNow without waiting for the change to be approved or rejected in the ServiceNow instance.
View the change created for the workflow run in the ServiceNow instance by navigating to .
The change number with status pending_decision is displayed in the GitHub Actions console while polling the ServiceNow instance for change status. The details like change comments, approved by, approved on, and status are logged in GitHub Actions console after the change is approved or rejected or canceled by the user in the ServiceNow instance.
You can navigate to the console logs in your pipeline to view the state of a change request when a change request is created, change details will be displayed as per the polling time interval. The policy conditions associated with the change request state will also be evaluated and displayed in the logs. For example, if the DevOps Change Request Advanced Automation policy is activated, the policy conditions will be evaluated and the corresponding decision made (auto-approve/auto-reject/manual-approval) will be displayed in the logs.
- number
- details
- status
- sys_id
- type
- risk
- priority
- changeState
- plannedStartDate
- plannedEndDate
- changeRequestURL
- DevOps Model Change Policy: Only logs will be displayed on change creation and when the change state is updated.
- DevOps Change Request Minimal Automation Policy: Logs along with change decision and policy conditions corresponding to the change decision will be displayed.
- DevOps Change Request Advanced Automation Policy: Logs along with change decision and policy conditions corresponding to the change decision will be displayed.
- Fields
- code_coverage
- commits_without_work_item
- integration_tests_failed
- load_tests_failed
- regression_tests_failed
- num_of_outages_in_last_7_days
- num_of_current_outages
- num_of_open_incidents
- total_num_of_commits
- tests_passing_percent
- risk
- code_security
- commits
- Operators
- <=
- >=
- !=
- =
- <
- >
- ISNOTEMPTY
- ISEMPTY
- BETWEEN
- ANYTHING
- NSAMEAS
- SAMEAS
- GT_FIELD
- LT_FIELD
- Create Secrets in the GitHub Repository.
- Configure ServiceNow
DevOps Change Automation custom action in the workflow.
The custom action
servicenow-devops-change
must be configured at steps level of job in the workflow with uses keyword. The inputs of this custom action must not be tampered to create change in your instance and poll for change status every number of seconds. For more information, see ServiceNow DevOps change automation.
ServiceNow DevOps Get Change Github Action
Retrieve the change request number in a GitHub Actions pipeline based on specific change details.
The ServiceNow DevOps Get Change Github Action custom action must be added at the step level in a pipeline job to retrieve the change request number from a ServiceNow instance by specifying change details.
ServiceNow DevOps Update Change Github Action
Update change request details associated with a GitHub Actions pipeline.
The ServiceNow DevOps Update Change Github Action custom action must be added at the step level in a pipeline job to update the change request in a ServiceNow instance. The change request number whose details need to be updated and the change request details to be updated must be specified as input.
ServiceNow DevOps Security Results Action
Retrieve security scan results in ServiceNow.
The ServiceNow DevOps Security Results Action custom action must be added at the step level in a pipeline job to retrieve security scan results in ServiceNow.
On this page
- ServiceNow DevOps SonarQube custom action
- ServiceNow DevOps Test Report custom action
- ServiceNow DevOps Register Artifact custom action
- ServiceNow DevOps Register Package custom action
- ServiceNow DevOps Change Automation custom action
- ServiceNow DevOps Get Change Github Action
- ServiceNow DevOps Update Change Github Action
- ServiceNow DevOps Security Results Action