Skip to content

Commit 2bee562

Browse files
Releasing 6.2.0 version
1 parent 92d3bda commit 2bee562

File tree

17 files changed

+241
-199
lines changed

17 files changed

+241
-199
lines changed

README.md

Lines changed: 49 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ npm unlink .
5555
### Building Docker Image
5656

5757
```sh
58-
docker build -t servicenowdocker/sndevops:6.0.0 .
58+
docker build -t servicenowdocker/sndevops:6.2.0 .
5959
```
6060

6161
```sh
62-
docker push servicenowdocker/sndevops:6.0.0
62+
docker push servicenowdocker/sndevops:6.2.0
6363
```
6464

6565
## Integrating with GitLab
@@ -95,6 +95,42 @@ COMMIT_BRANCH: <commit-branch>
9595
WORKFLOW_NAME: <workflow-name>
9696
```
9797

98+
### Proxy Configuration (Optional)
99+
100+
If your ServiceNow instance is behind a proxy or you need to route requests through a proxy server, you can configure the following environment variables:
101+
102+
```
103+
PROXY_ENDPOINT: <proxy-url> # e.g., http://localhost:7080 or https://proxy.example.com:8080
104+
PROXY_USERNAME: <proxy-username> # Optional: for proxy authentication
105+
PROXY_PASSWORD: <proxy-password> # Optional: for proxy authentication
106+
PROXY_AUTH: <proxy-api-key> # Optional: alternative authentication using API key
107+
```
108+
109+
**Notes:**
110+
- `PROXY_ENDPOINT` can be either HTTP or HTTPS
111+
- For backward compatibility, `HTTP_PROXY` and `HTTPS_PROXY` are also supported as fallback options
112+
- If using self-signed certificates with HTTPS proxy, set `NODE_TLS_REJECT_UNAUTHORIZED=0` (for testing only)
113+
- Authentication can be provided via:
114+
- Username/Password: Use `PROXY_USERNAME` and `PROXY_PASSWORD`
115+
- API Key: Use `PROXY_AUTH`
116+
- No authentication: Leave authentication variables unset
117+
118+
**Example with proxy:**
119+
```yaml
120+
stages:
121+
- package
122+
123+
package:
124+
stage: package
125+
image: servicenowdocker/sndevops:6.2.0
126+
variables:
127+
PROXY_ENDPOINT: "https://proxy.example.com:8080"
128+
PROXY_USERNAME: "proxy_user"
129+
PROXY_PASSWORD: "proxy_pass"
130+
script:
131+
- sndevopscli create package -n "package-name" -a '[{"name":"artifact-name","repositoryName":"artifact-repo-name","version":"1.3.0"}]'
132+
```
133+
98134
**Example with passing all ServiceNow information via commandline**
99135
```yaml
100136

@@ -105,7 +141,7 @@ stages:
105141

106142
package:
107143
stage: package
108-
image: servicenowdocker/sndevops:6.0.0
144+
image: servicenowdocker/sndevops:6.2.0
109145
script:
110146
- sndevopscli create artifact -a '[{"name":"artifact-name","repositoryName":"artifact-repo-name" ,"version":"1.3.0"}]'
111147
- sndevopscli create package -n "package-name" -a '[{"name":"artifact-name","repositoryName":"artifact-repo-name" ,"version":"1.3.0"}]
@@ -117,7 +153,7 @@ stages:
117153

118154
package:
119155
stage: package
120-
image: servicenowdocker/sndevops:6.0.0
156+
image: servicenowdocker/sndevops:6.2.0
121157
script:
122158
- sndevopscli create artifact -u <servicenow-url> -t <tool-id> --token <tool-token> -a '[{"name":"artifact-name","repositoryName":"artifact-repo-name" ,"version":"1.3.0"}]'
123159
- sndevopscli create package -u <servicenow-url> -t <tool-id> --token <tool-token> -n "package-mame" -a '[{"name":"artifact-name","repositoryName":"artifact-repo-name" ,"version":"1.3.0"}]
@@ -141,7 +177,7 @@ stages:
141177

142178
ServiceNow DevOps Change:
143179
stage: DevOpsChangeApproval
144-
image: servicenowdocker/sndevops:6.0.0
180+
image: servicenowdocker/sndevops:6.2.0
145181
script:
146182
- 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"}}'
147183

@@ -181,7 +217,7 @@ stages:
181217

182218
ServiceNow DevOps Sonar Scan Results:
183219
stage: DevOpsSonarStage
184-
image: servicenowdocker/sndevops:6.0.0
220+
image: servicenowdocker/sndevops:6.2.0
185221
script:
186222
- sndevopscli create sonar -url 'https://sonarcloud.io' -projectKey 'xxxxxxx' -branch 'master'
187223

@@ -206,7 +242,7 @@ stages:
206242

207243
ServiceNow DevOps Security Scan Results:
208244
stage: DevOpsSecurityScanStage
209-
image: servicenowdocker/sndevops:6.0.0
245+
image: servicenowdocker/sndevops:6.2.0
210246
script:
211247
- sndevopscli create securityScan -p "{\"pipelineInfo\":{\"buildNumber\":\"buildNumber\",\"pipelineExecutionUrl\":\"pipelineExecutionUrl\" },\"securityResultAttributes\":{ \"scanner\":\"Veracode\",\"applicationName\":\"PetStoreAPI-Github\",\"buildVersion\":\"\",\"securityToolId\":\"\"}}"
212248

@@ -234,7 +270,7 @@ stages:
234270

235271
ServiceNow DevOps Get Change:
236272
stage: DevOpsGetChange
237-
image: servicenowdocker/sndevops:6.0.0
273+
image: servicenowdocker/sndevops:6.2.0
238274
script:
239275
- sndevopscli get change -p "{\"buildNumber\":\"buildNumber\",\"stageName\":\"ServiceNow DevOps Change Step\",\"pipelineName\":\"GitlabDockerGetAndUpdateChange\"}"
240276

@@ -246,6 +282,9 @@ This specifies ID of the Job where we have created change request.
246282
stageName: [mandatory]
247283
This specifies the Job name where we have created change request..
248284

285+
pipelineExecutionId: [optional]
286+
This specifies the Pipeline Execution Id(Running ID of the pipeline)..
287+
249288
pipelineName: [mandatory]
250289
This specifies the pipeline name.
251290

@@ -270,7 +309,7 @@ stages:
270309

271310
ServiceNow DevOps Update Change:
272311
stage: DevOpsUpdateChangeStage
273-
image: servicenowdocker/sndevops:6.0.0
312+
image: servicenowdocker/sndevops:6.2.0
274313
script:
275314
- 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\"}"
276315

@@ -297,7 +336,7 @@ stages:
297336

298337
ServiceNow DevOps Change Step:
299338
stage: changeapproval
300-
image: servicenowdocker/sndevops:6.0.0
339+
image: servicenowdocker/sndevops:6.2.0
301340
script:
302341
- 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\"}}"
303342

github-ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ubuntu-latest
3636
needs: build
3737
container:
38-
image: servicenowdocker/sndevops:6.0.0
38+
image: servicenowdocker/sndevops:6.2.0
3939
env:
4040
CI_JOB_NAME: "ServiceNowDevOpsChange"
4141

@@ -48,7 +48,7 @@ jobs:
4848
runs-on: ubuntu-latest
4949
needs: ServiceNowDevOpsChange
5050
container:
51-
image: servicenowdocker/sndevops:6.1.0
51+
image: servicenowdocker/sndevops:6.2.0
5252
env:
5353
CI_JOB_NAME: "ServiceNowDevOpsChange"
5454

@@ -61,7 +61,7 @@ jobs:
6161
runs-on: ubuntu-latest
6262
needs: build
6363
container:
64-
image: servicenowdocker/sndevops:6.1.0
64+
image: servicenowdocker/sndevops:6.2.0
6565
env:
6666
CI_JOB_NAME: "ArtifactAndPackage"
6767
steps:
@@ -75,7 +75,7 @@ jobs:
7575
needs: ArtifactAndPackage
7676
runs-on: ubuntu-latest
7777
container:
78-
image: servicenowdocker/sndevops:6.1.0
78+
image: servicenowdocker/sndevops:6.2.0
7979
env:
8080
CI_JOB_NAME: "ServiceNowDevOpsSonarScanResults"
8181
steps:
@@ -88,7 +88,7 @@ jobs:
8888
runs-on: ubuntu-latest
8989
needs: build
9090
container:
91-
image: servicenowdocker/sndevops:6.1.0
91+
image: servicenowdocker/sndevops:6.2.0
9292
steps:
9393
- name: security scan
9494
run: |

gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image: servicenowdocker/sndevops:6.1.0
1+
image: servicenowdocker/sndevops:6.2.0
22
stages:
33
- pre-build
44
- build

harness-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pipeline:
4545
identifier: Sonar_container
4646
spec:
4747
connectorRef: docker_connector # harness docker connector
48-
image: servicenowdocker/sndevops:6.1.0
48+
image: servicenowdocker/sndevops:6.2.0
4949
command: |-
5050
export SNOW_URL="<+variable.SNOW_URL>"
5151
export SNOW_TOOLID="<+variable.SNOW_TOOLID>"
@@ -93,7 +93,7 @@ pipeline:
9393
identifier: security
9494
spec:
9595
connectorRef: docker_connector # harness docker connector
96-
image: servicenowdocker/sndevops:6.1.0
96+
image: servicenowdocker/sndevops:6.2.0
9797
command: |-
9898
export SNOW_URL="<+variable.SNOW_URL>"
9999
export SNOW_TOOLID="<+variable.SNOW_TOOLID>"
@@ -156,7 +156,7 @@ pipeline:
156156
identifier: ServiceNow_change
157157
spec:
158158
connectorRef: docker_connector # harness docker connector
159-
image: servicenowdocker/sndevops:6.1.0
159+
image: servicenowdocker/sndevops:6.2.0
160160
command: |-
161161
# set mandetory variables. These can be set from Environment variable section of Optional configuration as well.
162162
export HARNESS_STAGE_NAME="<+stage.identifier>"

package-lock.json

Lines changed: 0 additions & 141 deletions
This file was deleted.

src/api/artifact/artifactManager.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ class ArtifactManager extends SnDevopsApi {
2626

2727
try {
2828
payload = this._getRequestBodyForArtifactRegistration(artifactJson);
29-
let httpHeaders = { headers: this._getAuthHeaderWithToken() };
30-
31-
response = await axios.post(url.toString(), JSON.stringify(payload), httpHeaders);
29+
response = await axios.post(url.toString(), JSON.stringify(payload), this._getAxiosConfig());
3230
} catch(e){
3331
if (e.message.includes('ECONNREFUSED') || e.message.includes('ENOTFOUND')) {
3432
throw new Error('Artifact cannot be registered because the ServiceNow Instance URL is invalid. Enter the correct URL and try again.');

0 commit comments

Comments
 (0)