Hi all-
I am attempting to perform a
publishHTML post-build action in my Shared Library pipeline code. I am
having a problem coming up with the correct syntax.
I am referencing the steps instance from my vars/runFunctionalTests.groovy global variable:
import org.magento.ci.tests.Functional
def call() {
node {
def functionalTest = new Functional('Functional')
buildImages(functionalTest)
parallel functionalTest.execute(steps, label_slave)
}
}
Snippet from Functional (src/tests/Functional.groovy) class of what I have tried but have not been successful:
@NonCPS
def execute(DSL steps, String agentLabel) {
: :
// References to ArtifactArchiver and JUnitResultArchiver work fine.
steps.step([$class: 'ArtifactArchiver', artifacts: 'results/*,
*-results.tar.gz', excludes: null])
steps.step([$class: 'JUnitResultArchiver', allowEmptyResults: true, testResults: 'phpunit.xml'])
// All of these attempts fail.
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'results', reportFiles: 'report.html', reportName: 'HTML Report', reportTitles: ''])
steps.step([$class: 'htmlpublisher.HtmlPublisherTarget', allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'results', reportFiles: 'report.html', reportName: 'ACB HTML Report', reportTitles: ''])
def htmlReport = new htmlpublisher.HtmlPublisherTarget('ACB HTML Report', 'results', 'report.html', false, false, false)
steps.step(htmlReport)
}
Thanks in advance,
Ann
Hello Ann,
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'target/allure-reports', reportFiles: 'index.html', reportName: 'Allure Report'])
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0625eb92-a198-4677-97b9-525139fa601c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
steps.step([$class: 'PublishHTMLStep', allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'results', reportFiles: 'report.html', reportName: 'HTML Report', reportTitles: ''])
I get this error:--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a843956e-e4df-45e0-9a4e-59343c539a25%40googlegroups.com.
"This approach has limitations; for example, it prevents the declaration of a superclass.
Alternately, a set of steps
can be passed explicitly to a library class, in a
constructor, or just one method"
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/261699f8-b0c8-4926-8de7-5db65461df55%40googlegroups.com.
No worries. Glad you got it up and running. I too able sometimes guilty of making things too difficult so I know the feeling :)
Richard
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/bc2113f3-79ab-4370-ab30-992f7fbc2878%40googlegroups.com.