-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0ea7a1
commit 616e086
Showing
1 changed file
with
88 additions
and
0 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,88 @@ | ||
# Pipeline with two change approvals | ||
|
||
name: pipeline2 | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Run a one-line script | ||
run: echo Running build step | ||
test: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Copy results | ||
run: echo "fake test step" | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
|
||
steps: | ||
- name: ServiceNow DevOps Register Artifact | ||
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: 'publish' | ||
artifacts: '[{"name": "com:demo4","version": "1.${{ github.run_number }}","semanticVersion": "1.${{ github.run_number }}.0","repositoryName": "${{ github.repository }}"}]' | ||
|
||
deploy-to-uat: | ||
name: deploy-to-uat | ||
needs: publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
# - name: ServiceNow Change | ||
# 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: 'Deploy' | ||
# change-request: '{"setCloseCode":"true","attributes":{"short_description":"Deploy to UAT","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' | ||
# changeCreationTimeOut: '3600' | ||
# abortOnChangeCreationFailure: true | ||
# abortOnChangeStepTimeout: true | ||
|
||
deploy-to-prod: | ||
name: deploy-to-prod | ||
needs: publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
# - name: ServiceNow Change | ||
# 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: 'Deploy' | ||
# change-request: '{"setCloseCode":"true","attributes":{"short_description":"Deploy to production","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' | ||
# changeCreationTimeOut: '3600' | ||
# abortOnChangeCreationFailure: true | ||
# abortOnChangeStepTimeout: true |