{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":21059,"path":"integrate-applications/integration-hub/cicd-spoke.md","title":"Continuous Integration and Continuous Delivery \\(CICD\\) Spoke","bundle":null,"doc_type":null,"release":"australia","body":"\n# Continuous Integration and Continuous Delivery \\(CICD\\) Spoke\n\nBuild a Continuous Integration and Continuation Delivery \\(CICD\\) pipeline for your ServiceNow instances. You can automate publishing and installing applications from an application repository, activating plugins, running ATF test suites, and running an instance scan.\n\n## CICD spoke application\n\nThe CICD spoke application is installed by default from the Orlando upgrade onward.\n\n## Spoke version\n\nContinuous Integration and Continuous Delivery \\(CICD\\) spoke v1.0.11 is the latest version.\n\n## Supported versions\n\nContinuous Integration and Continuous Delivery \\(CICD\\) REST API version 1.0.0, which is a ServiceNow AI Platform feature active by default.\n\n## Spoke flows\n\nThis spoke has no sample flows.\n\n## Spoke subflows\n\nThe Continuous Integration and Continuous Delivery \\(CICD\\) spoke provides sample subflows in the draft state to demonstrate automating CICD tasks. To customize a sample subflow, copy it to a new application scope. Available sample subflows include:\n\n<table id=\"table_hbd_qty_qfb\"><thead><tr><th>\n\nSubflow\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nActivate Plugin\n\n</td><td>\n\nActivate a plugin by ID on the specified instance URL.\n\n</td></tr><tr><td>\n\nApply Changes From Source Control With ID\n\n</td><td>\n\nApply remote changes from source control to an application by its Sys ID.\n\n</td></tr><tr><td>\n\nApply Changes From Source Control With Scope\n\n</td><td>\n\nApply remote changes from source control to an application by its scope name.\n\n</td></tr><tr><td>\n\nATF Suite Start With ID\n\n</td><td>\n\nStart a test suite by its Sys ID on the specified instance URL. Return the test suite execution results.\n\n</td></tr><tr><td>\n\nATF Suite Start With Name\n\n</td><td>\n\nStart a test suite by its name on the specified instance URL. Return the test suite execution results.\n\n</td></tr><tr><td>\n\nBatch Install\n\n</td><td>\n\nGiven a Batch Plan in JSON format, install multiple packages \\(applications, customizations to store applications, and plugins\\) together in a single batch operation. Example JSON:```\n{\n  \"applications\": [\n    {\n      \"id\": \"syd_id_abcefghi\",\n      \"type\": \"application\",\n      \"load_demo_data\": false,\n      \"requested_version\": \"1.0.2\",\n      \"notes\": \"User specific text to describe this application install\"\n    },\n    { \n      \"id\": \"syd_id_defabcde\",\n      \"type\": \"application\",\n      \"requested_version\": \"1.0.0\",\n      \"requested_customization_version\": \"2.0.7\",\n      \"notes\": \"Customization for CSM App1\"\n    },\n    {\n      \"id\": \"com.glide.some.plugin\",\n      \"type\": \"plugin\",\n      \"load_demo_data\": true,\n      \"notes\": \"Plugin related notes\"\n    }\n  ],\n  \"rollback_on_failure\": true\n}\n```\n\n</td></tr><tr><td>\n\nBatch Results\n\n</td><td>\n\nGiven the sys\\_id of a result object, view the installation status of each package along with entire batch plan.\n\n</td></tr><tr><td>\n\nBatch Rollback\n\n</td><td>\n\nWith a rollback ID, roll back the installation\\(s\\) of package\\(s\\) installed as a single batch.\n\n</td></tr><tr><td>\n\nGet Instance Scan Results\n\n</td><td>\n\nReturn Instance Scan execution results by progress ID. Scan\\_results always return but scan\\_finding results display only if present.\n\n</td></tr><tr><td>\n\nImport Application from Source Control\n\n</td><td>\n\nImport Application from Source Control using repository URL on the given instance.\n\n</td></tr><tr><td>\n\nInstance Scan Execute Full Scan\n\n</td><td>\n\nStart full Instance Scan on specified instance URL. Scan runs with all active checks.\n\n</td></tr><tr><td>\n\nInstance Scan Execute Point Scan\n\n</td><td>\n\nStart Instance Scan on specified instance starting from a particular table and record \\(the table and sys\\_ID\\). Target is scanned using all relevant and applicable checks.\n\n</td></tr><tr><td>\n\nInstance Scan Execute Suite Scan\n\n</td><td>\n\nStart full Instance Scan on specified instance URL using a specific suite of checks.\n\n</td></tr><tr><td>\n\nInstance Scan Execute Suite Scan on one or more scoped apps\n\n</td><td>\n\nStart Instance Scan on specified scoped apps using checks from a specified suite ID.\n\n</td></tr><tr><td>\n\nInstance Scan Execute Suite Scan on one or more update sets\n\n</td><td>\n\nStart Instance Scan on the specified update sets using checks from a specified suite ID.\n\n</td></tr><tr><td>\n\nInstall Application With ID\n\n</td><td>\n\nInstall an application by its Sys ID from the application repository.\n\n</td></tr><tr><td>\n\nInstall Application With Scope\n\n</td><td>\n\nInstall an application by its scope name from the application repository.\n\n</td></tr><tr><td>\n\nPublish Application With ID\n\n</td><td>\n\nPublish an application by its Sys ID to the application repository.\n\n</td></tr><tr><td>\n\nPublish Application With Scope\n\n</td><td>\n\nPublish an application by its scope name to the application repository.\n\n</td></tr><tr><td>\n\nRollback Application With ID\n\n</td><td>\n\nRoll back an application by its Sys ID. Confirm the rollback version number matches the specified version number or produce an error.\n\n</td></tr><tr><td>\n\nRollback Application With Scope\n\n</td><td>\n\nRoll back an application by its scope name. Confirm the rollback version number matches the specified version number or produce an error.\n\n</td></tr><tr><td>\n\nRollback Plugin\n\n</td><td>\n\nRoll back a plugin by ID on the specified instance URL to the last installed version.\n\n</td></tr><tr><td>\n\nWait Until Tracker Completes\n\n</td><td>\n\nWait for a tracker to complete its progress on the specified instance URL and return the results.\n\n</td></tr></tbody>\n</table>## Spoke actions\n\nThe Continuous Integration and Continuous Delivery \\(CICD\\) spoke provides actions to automate CICD tasks when events occurs in the ServiceNow AI Platform. Available actions include:\n\n|Category|Action|Description|\n|--------|------|-----------|\n|Application Repo|Install Application With ID|Install an application by its Sys ID from the application repository.|\n|Install Application With Scope|Install an application by its scope name from the application repository.|\n|Publish Application With ID|Publish an application by its Sys ID to the application repository.|\n|Publish Application With Scope|Publish an application by its scope name to the application repository.|\n|Rollback Application With ID|Rollback an application by its Sys ID. Confirm the rollback version number matches the specified version number or produce an error.|\n|Rollback Application With Scope|Roll back an application by its scope name. Confirm the rollback version number matches the specified version number or produce an error.|\n|ATF|ATF Get Suite Results|Return the test suite execution results by Sys ID.|\n|Get Execution Tracker Progress|Return tracker progress information by Sys ID.|\n|Start ATF Suite With ID|Start a test suite by its Sys ID on the specified instance URL.|\n|Start ATF Suite With Name|Start a test suite by its name on the specified instance URL.|\n|Batch Install|Batch Install|Install multiple applications at once|\n|Batch Results|View installation status of each package along with entire batch plan.|\n|Batch Rollback|With a rollback ID, roll back the installation\\(s\\) of package\\(s\\) installed as a single batch.|\n|Instance Scan|Get Instance Scan Results|Return Instance Scan execution results by progress ID. Scan\\_results always display but scan\\_finding results display only if present.|\n|Instance Scan Execute Full Scan|Return Instance Scan execution results by progress ID. Scan\\_results always return but scan\\_finding results display only if present.|\n|Instance Scan Execute Point Scan|Start full Instance Scan on specified instance URL. Scan runs with all active checks.|\n|Instance Scan Execute Suite Scan|Start Instance Scan on specified instance starting from a particular table and record \\(the table and sys\\_ID\\). Target is scanned using all relevant and applicable checks.|\n|Instance Scan Execute Suite Scan on one or more scoped apps|Start full Instance Scan on specified instance URL using a specific suite of checks.|\n|Instance Scan Execute Suite Scan on one or more update sets|Start Instance Scan on specified scoped apps using checks from a specified suite ID.|\n|Plugin|Activate Plugin|Activate a plugin by ID on the specified instance URL.|\n|Rollback Plugin|Rollback a plugin by ID on the specified instance URL to the last installed version.|\n|Source Control|Apply Changes From Source Control With ID|Apply remote changes from source control to an application by its Sys ID.|\n|Apply Changes From Source Control With Scope|Apply remote changes from source control to an application by its scope name.|\n|Import Application from Source Control|Import Application from Source Control using repository URL on the given instance.|\n\n## CICD account requirements\n\nThe Continuous Integration and Continuous Delivery \\(CICD\\) spoke requires creating basic authorization credentials. The user credentials must have either the admin or sn\\_cicd.sys\\_ci\\_automation roles to authorize CICD actions and flows.\n\n## Connection and credential alias requirements\n\nIntegration Hub uses aliases to manage connection and credential information, and OAuth credentials. Using an alias eliminates the need to configure multiple credentials and connection information profiles when using multiple environments. If the connection or credential information changes, you don't need to update any actions that use the connection.\n\nThis spoke uses the CICD alias record to authorize actions on local and remote instances. For information about setting up the spoke, see [Set up the Continuous Integration and Continuous Delivery \\(CICD\\) spoke](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/integration-hub/set-up-cicd.md).\n\n## MID Server requirements\n\nThese actions use REST calls, which can run on an instance or MID Server. Use the connection record associated with the CICD alias to configure where actions run as well as set MID Server selection attributes. For more information, see [MID server](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/servicenow-platform/mid-server-landing.md).\n\nTo set up the MID Server for this spoke, see [Set up MID Server for a spoke](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/integration-hub/config-adv-mid-settings-for-oauth-on-mid.md).\n\n"}}