-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (76 loc) · 3.91 KB
/
pipeline2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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