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
Problem: testing buildability of docs, then building them again to publish a package, is a waste of resources
Solution: add a way to post a standard "dist" tarball of the package with prepared manpages, so the publishing helper (as implemented by Jenkins farm admins) can use it for quicker packaging.
Signed-off-by: Jim Klimov <[email protected]>
Copy file name to clipboardexpand all lines: Jenkinsfile
+16-2
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,10 @@ pipeline {
52
52
defaultValue: false,
53
53
description: 'Attempt a build with docs in this run? (Note: corresponding tools are required in the build environment)',
54
54
name: 'DO_BUILD_DOCS')
55
+
booleanParam (
56
+
defaultValue: false,
57
+
description: 'Publish as an archive a "dist" tarball from a build with docs in this run? (Note: corresponding tools are required in the build environment; enabling this enforces DO_BUILD_DOCS too)',
58
+
name: 'DO_DIST_DOCS')
55
59
booleanParam (
56
60
defaultValue: true,
57
61
description: 'Attempt "make check" in this run?',
@@ -145,12 +149,19 @@ pipeline {
145
149
}
146
150
}
147
151
stage ('build with DOCS') {
148
-
when { expression { return ( params.DO_BUILD_DOCS ) } }
152
+
when { expression { return ( params.DO_BUILD_DOCS|| params.DO_DIST_DOCS) } }
149
153
steps {
150
154
dir("tmp/build-DOCS") {
151
155
deleteDir()
152
156
unstash 'prepped'
153
157
sh 'CCACHE_BASEDIR="`pwd`" ; export CCACHE_BASEDIR; ./configure --enable-drafts=yes --with-docs=yes'
sh 'CCACHE_BASEDIR="`pwd`" ; export CCACHE_BASEDIR; make -k -j4 || make'
155
166
sh 'echo "Are GitIgnores good after make with docs? (should have no output below)"; git status -s || if [ "${params.REQUIRE_GOOD_GITIGNORE}" = false ]; then echo "WARNING GitIgnore tests found newly changed or untracked files" >&2 ; exit 0 ; else echo "FAILED GitIgnore tests" >&2 ; exit 1; fi'
Copy file name to clipboardexpand all lines: Jenkinsfile-deploy.example
+7-2
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,10 @@ pipeline {
31
31
defaultValue: '',
32
32
description: 'The commit ID of the sources to check out (may be not current HEAD of that repo/branch)',
33
33
name: 'DEPLOY_GIT_COMMIT')
34
+
string (
35
+
defaultValue: '',
36
+
description: 'URL to a "dist" archive prepared by the build (e.g. with pregenerated docs and config script) which will be fetched, and used instead of (or combined with) git-archive checkout contents during further packaging; note all the DEPLOY_GIT_* arguments are still required if this feature is used.',
Copy file name to clipboardexpand all lines: zproject_jenkins.gsl
+21-2
Original file line number
Diff line number
Diff line change
@@ -130,6 +130,15 @@ pipeline {
130
130
description: 'Attempt a build with docs in this run? (Note: corresponding tools are required in the build environment)',
131
131
name: 'DO_BUILD_DOCS')
132
132
booleanParam (
133
+
. if ( !(defined(project.jenkins_dist_docs)) | (project.jenkins_dist_docs ?= 0) )
134
+
. # asciidoc and xmlto are external tools that may be not installed in general case
135
+
defaultValue: false,
136
+
. else
137
+
defaultValue: true,
138
+
. endif
139
+
description: 'Publish as an archive a "dist" tarball from a build with docs in this run? (Note: corresponding tools are required in the build environment; enabling this enforces DO_BUILD_DOCS too)',
140
+
name: 'DO_DIST_DOCS')
141
+
booleanParam (
133
142
. if project.jenkins_test_check ?= 0
134
143
defaultValue: false,
135
144
. else
@@ -295,7 +304,7 @@ pipeline {
295
304
}
296
305
}
297
306
stage ('build with DOCS') {
298
-
when { expression { return ( params.DO_BUILD_DOCS ) } }
sh 'CCACHE_BASEDIR="`pwd`" ; export CCACHE_BASEDIR; make -k -j4 || make'
311
327
sh 'echo "Are GitIgnores good after make with docs? (should have no output below)"; git status -s || if [ "${params.REQUIRE_GOOD_GITIGNORE}" = false ]; then echo "WARNING GitIgnore tests found newly changed or untracked files" >&2 ; exit 0 ; else echo "FAILED GitIgnore tests" >&2 ; exit 1; fi'
0 commit comments