-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added error conditions with custom error messages
- Loading branch information
1 parent
af2e8f3
commit 0f57435
Showing
4 changed files
with
286 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Test | ||
|
||
|
||
on: | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set Node.js 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Compile | ||
run: npm run build | ||
|
||
|
||
changeApproval: | ||
name: ServiceNow Change Approval | ||
needs: build | ||
runs-on: ubutun-latest | ||
|
||
steps: | ||
- name: ServiceNow Change Approval | ||
uses: ServiceNow/[email protected] | ||
with: | ||
devops-integration-user-name: ${{ secrets.SN_DEVOPS_USER }} | ||
devops-integration-user-password: ${{ secrets.SN_DEVOPS_PASSWORD }} | ||
instance-url: ${{ secrets.SN_INSTANCE_URL }} | ||
tool-id: ${{ secrets.SN_ORCHESTRATION_TOOL_ID }} | ||
context-github: ${{ toJSON(github) }} | ||
job-name: 'ServiceNow Change Approval' | ||
change-request: '{"setCloseCode":"true","attributes":{"short_description":"Automated Software Deployment","description":"Automated Software Deployment.","assignment_group":"a715cd759f2002002920bde8132e7018","implementation_plan":"Software update is tested and results can be found in Test Summaries Tab; When the change is approved the implementation happens automated by the CICD pipeline within the change planned start and end time window.","backout_plan":"When software fails in production, the previous software release will be re-deployed.","test_plan":"Testing if the software was successfully deployed"}}' | ||
interval: '100' | ||
timeout: '3600' | ||
|
||
deploy: | ||
name: Deploy | ||
needs: changeApproval | ||
runs-on: ubutun-latest | ||
|
||
steps: | ||
- name: Run Deployment Script | ||
run: echo "Deployment Finished....." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.