You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by re...@apache.org on 2022/04/27 13:18:14 UTC
[uima-build-jenkins-shared-library] 01/01: [UIMA-6437] Allow publishing HTML documentation from Jenkinsfile
This is an automated email from the ASF dual-hosted git repository.
rec pushed a commit to branch feature/UIMA-6437-Allow-publishing-HTML-documentation-from-Jenkinsfile
in repository https://gitbox.apache.org/repos/asf/uima-build-jenkins-shared-library.git
commit 59215d180f18f2137ab2cd595a4ec41aec4f7bbe
Author: Richard Eckart de Castilho <re...@apache.org>
AuthorDate: Wed Apr 27 15:18:08 2022 +0200
[UIMA-6437] Allow publishing HTML documentation from Jenkinsfile
- Add new 'docPath' configuration option - if set trigger the publishHTML plugin
---
vars/createConfiguration.groovy | 3 ++-
vars/defaultPipeline.groovy | 15 +++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/vars/createConfiguration.groovy b/vars/createConfiguration.groovy
index 1ec756a..7c316a6 100644
--- a/vars/createConfiguration.groovy
+++ b/vars/createConfiguration.groovy
@@ -22,7 +22,8 @@ def call(body) {
agentLabel: '',
maven: 'maven_latest',
jdk: 'jdk_1.8_latest',
- extraMavenArguments: ''
+ extraMavenArguments: '',
+ docPath: null
]
body.resolveStrategy = Closure.DELEGATE_FIRST
diff --git a/vars/defaultPipeline.groovy b/vars/defaultPipeline.groovy
index 68a7f21..b3e150e 100644
--- a/vars/defaultPipeline.groovy
+++ b/vars/defaultPipeline.groovy
@@ -133,6 +133,21 @@ def call(body) {
def javaDocIssues = scanForIssues tool: javaDoc()
publishIssues issues: [mavenConsoleIssues, javaIssues, javaDocIssues]
}
+
+ script {
+ if (config.docPath != null) {
+ publishHTML([
+ allowMissing: false,
+ alwaysLinkToLastBuild: true,
+ keepAll: false,
+ reportDir: config.docPath,
+ includes: '**/*',
+ reportFiles: 'index.html',
+ reportName: 'Documentation',
+ reportTitles: 'Documentation'
+ ])
+ }
+ }
}
}
}