Browse Source

CI improvement: move docs upload to separate build

Jamie Curnow 1 năm trước cách đây
mục cha
commit
dcb9628c36
1 tập tin đã thay đổi với 3 bổ sung20 xóa
  1. 3 20
      Jenkinsfile

+ 3 - 20
Jenkinsfile

@@ -92,10 +92,6 @@ pipeline {
 							sh 'yarn install'
 							sh 'yarn build'
 						}
-						dir(path: 'docs/dist') {
-							sh 'tar -czf ../docs.tgz *'
-						}
-						archiveArtifacts(artifacts: 'docs/docs.tgz', allowEmptyArchive: false)
 					}
 				}
 				stage('Cypress') {
@@ -185,30 +181,17 @@ pipeline {
 		}
 		stage('Docs / Comment') {
 			parallel {
-				stage('Master Docs') {
-					when {
-						allOf {
-							branch 'master'
-							not {
-								equals expected: 'UNSTABLE', actual: currentBuild.result
-							}
-						}
-					}
-					steps {
-						npmDocsReleaseMaster()
-					}
-				}
-				stage('Develop Docs') {
+				stage('Docs Job') {
 					when {
 						allOf {
-							branch 'develop'
+							when { branch pattern: "^(develop|master)$", comparator: "REGEXP"}
 							not {
 								equals expected: 'UNSTABLE', actual: currentBuild.result
 							}
 						}
 					}
 					steps {
-						npmDocsReleaseDevelop()
+						build wait: false, job: 'nginx-proxy-manager-docs', parameters: [string(name: 'docs_branch', value: "$BRANCH_NAME")]
 					}
 				}
 				stage('PR Comment') {