Initiate a rollback of a specified application to a specified version if installation fails.
Runs if Install Application step is failed and install_app.outputs.rollbackVersion exists.
- credentials (username and password for a service account)
- instance URLs for your dev, test, prod, etc. environments
- sys_id or scope for your app
- sys_id for your ATF Test Suite
On GitHub, go in your repository settings, click on the secret Secrets and create a new secret.
Create secrets called
NOW_USERNAME
NOW_PASSWORD
NOW_INSTALL_INSTANCE
only the domain string is required from the instance URL, for example https://domain.service-now.comAPP_SYS_ID
orAPP_SCOPE
https://github.com/ServiceNow/sncicd_githubworkflow
- name: Rollback Application
if: ${{ failure() && steps.install_app.outputs.rollbackVersion }}
uses: ServiceNow/sncicd-rollback-app@1.0 # like username/repo-name
with:
version: ${{steps.install_app.outputs.rollbackVersion}}
env:
nowUsername: ${{ secrets.NOW_USERNAME }}
nowPassword: ${{ secrets.NOW_PASSWORD }}
nowInstallInstance: ${{ secrets.NOW_INSTALL_INSTANCE }}
appSysID: ${{ secrets.APP_SYS_ID }}
appScope: ${{ secrets.APP_SCOPE }}
Inputs:
- version - Application version to install. Takes the version for rollback from the install application step. steps.install_app.outputs.rollbackVersion is an id of the step
Environment variable should be set up in the Step 1
- nowUsername - Username to ServiceNow instance
- nowPassword - Password to ServiceNow instance
- nowInstallInstance - ServiceNow instance for rollback application
- appSysID - Required if app_scope is not specified. The sys_id of the application
- appScope - Required if app_sys_id is not specified. The scope name of the application, such as x_aah_custom_app
Tests should be ran via npm commands:
npm run test
npm run integration
npm run buid
npm run format
npm run lint
ServiceNow built this integration with the intent to help customers get started faster in adopting CI/CD APIs for DevOps workflows, but will not be providing formal support. This integration is therefore considered "use at your own risk", and will rely on the open-source community to help drive fixes and feature enhancements via Issues. Occasionally, ServiceNow may choose to contribute to the open-source project to help address the highest priority Issues, and will do our best to keep the integrations updated with the latest API changes shipped with family releases. This is a good opportunity for our customers and community developers to step up and help drive iteration and improvement on these open-source integrations for everyone's benefit.
Initially, ServiceNow product management and engineering representatives will own governance of these integrations to ensure consistency with roadmap direction. In the longer term, we hope that contributors from customers and our community developers will help to guide prioritization and maintenance of these integrations. At that point, this governance model can be updated to reflect a broader pool of contributors and maintainers.