You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-11Lines changed: 20 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,16 @@
1
-
# app-devops-gitlab-docker
1
+
# app-devops-gitlab
2
2
3
3
New repository for developing a plugin to integrate between ITSM DevOps and GitLab pipelines
4
4
5
+
### Owners
6
+
7
+
> ramachandrarao.p
8
+
9
+
### How to build on Jenkins
10
+
* Create a `pom.xml` file at the root level
11
+
* Go to the [BT1 Service Catalog](https://buildtools1.service-now.com/nav_to.do?uri=%2Fcom.glideapp.servicecatalog_cat_item_view.do%3Fv%3D1%26sysparm_id%3D9dbd0c54db1acb403a3d5dd5ce961948%26sysparm_link_parent%3Dad2fecb72bfc310052f7c71317da157e%26sysparm_catalog%3De0d08b13c3330100c8b837659bba8fb4%26sysparm_catalog_view%3Dess%26sysparm_view%3Dess) to request a Jenkins job
12
+
13
+
Once the request is processed, a multi-branch job is created on https://buildmaster-hotel.devsnc.com and will build any branches that match [ServiceNow branch naming convention](https://buildtools1.service-now.com/kb_view_customer.do?sysparm_article=KB0528607).
5
14
6
15
# CLI example using npm modules
7
16
@@ -56,11 +65,11 @@ npm unlink .
56
65
### Building Docker Image
57
66
58
67
```sh
59
-
docker build -t servicenowdocker/sndevops:6.0.0 .
68
+
docker build -t servicenowdocker/sndevops:6.1.0 .
60
69
```
61
70
62
71
```sh
63
-
docker push servicenowdocker/sndevops:6.0.0
72
+
docker push servicenowdocker/sndevops:6.1.0
64
73
```
65
74
66
75
## Integrating with GitLab
@@ -106,7 +115,7 @@ stages:
106
115
107
116
package:
108
117
stage: package
109
-
image: servicenowdocker/sndevops:6.0.0
118
+
image: servicenowdocker/sndevops:6.1.0
110
119
script:
111
120
- sndevopscli create artifact -a '[{"name":"artifact-name","repositoryName":"artifact-repo-name" ,"version":"1.3.0"}]'
112
121
- sndevopscli create package -n "package-name" -a '[{"name":"artifact-name","repositoryName":"artifact-repo-name" ,"version":"1.3.0"}]
- sndevopscli create change -p '{"changeStepDetails":{"timeout":3600,"interval":100},"attributes":{"short_description":"Automated Software Deployment","description":"Automated Software Deployment.","assignment_group":"XXXXXXX","implementation_plan":"Software update is tested and results can be found in Test Summaries Tab.","backout_plan":"When software fails in production, the previous software release will be re-deployed.","test_plan":"Testing if the software was successfully deployed or not"}}'
- sndevopscli get change -p "{\"buildNumber\":\"buildNumber\",\"stageName\":\"ServiceNow DevOps Change Step\",\"pipelineName\":\"GitlabDockerGetAndUpdateChange\"}"
241
250
@@ -271,7 +280,7 @@ stages:
271
280
272
281
ServiceNow DevOps Update Change:
273
282
stage: DevOpsUpdateChangeStage
274
-
image: servicenowdocker/sndevops:6.0.0
283
+
image: servicenowdocker/sndevops:6.1.0
275
284
script:
276
285
- sndevopscli update change -n 'CHGXXXXXX' -p "{\"short_description\":\"Automated Software Deployment\",\"description\":\"Automated Software Deployment.\",\"assignment_group\":\"XXXXX\",\"implementation_plan\":\"Software update is tested and results can be found in Test Summaries Tab.\",\"backout_plan\":\"When software fails in production, the previous software release will be re-deployed.\",\"test_plan\":\"Testing if the software was successfully deployed or not\"}"
277
286
@@ -298,7 +307,7 @@ stages:
298
307
299
308
ServiceNow DevOps Change Step:
300
309
stage: changeapproval
301
-
image: servicenowdocker/sndevops:6.0.0
310
+
image: servicenowdocker/sndevops:6.1.0
302
311
script:
303
312
- sndevopscli create change -p "{\"changeStepDetails\":{\"timeout\":3600,\"interval\":100},\"autoCloseChange\":true,\"attributes\":{\"short_description\":\"Automated Software Deployment\",\"description\":\"Automated Software Deployment.\",\"assignment_group\":\"xxxxxxxx\",\"implementation_plan\":\"Software update is tested and results can be found in Test Summaries Tab.\",\"backout_plan\":\"When software fails in production, the previous software release will be re-deployed.\",\"test_plan\":\"Testing if the software was successfully deployed or not\"}}"
console.log('\n \x1b[1m\x1b[36m'+"The job is under change control. A callback request is created and polling has been started to retrieve the change info."+'\x1b[0m\x1b[0m');
93
+
}
94
+
81
95
interval=interval>=100 ? interval : 100;
82
96
timeout=timeout>=100 ? timeout : 3600;
83
97
@@ -91,14 +105,12 @@ class ChangeRequestManager extends SnDevopsApi {
console.log('\n \x1b[1m\x1b[36m'+"The job is under change control. A callback request is created and polling has been started to retrieve the change info."+'\x1b[0m\x1b[0m');
0 commit comments