@docupace/pipeline 1.0.5-alpha.5 → 1.0.5-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/next/jenkins.js +2 -3
package/package.json
CHANGED
package/src/next/jenkins.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import axios from 'axios';
|
|
2
2
|
|
|
3
3
|
const JENKINS_URL = 'http://devops.corp.docupace.com';
|
|
4
4
|
const JOB_NAME = 'auto-deploy-site';
|
|
@@ -20,8 +20,7 @@ export async function triggerJenkinsJob() {
|
|
|
20
20
|
{
|
|
21
21
|
auth: { username: USERNAME, password: API_TOKEN },
|
|
22
22
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
23
|
-
|
|
24
|
-
validateStatus: (status) => status === 302, // Jenkins responds with 302 after job is triggered
|
|
23
|
+
validateStatus: (status) => status === 201 || status === 302, // Accept 201 and 302 as valid statuses
|
|
25
24
|
},
|
|
26
25
|
);
|
|
27
26
|
|