zoukankan      html  css  js  c++  java
  • Publishing HTML Reports in Pipeline

    Publishing HTML Reports in Pipeline

    当时steps{step()} 老是报错,后面改成steps{script{}}可以了,

    Running on autotest-01 in /opt/jenkins_agent/workspace/testforhtml
    [Pipeline] {
    [Pipeline] stage
    [Pipeline] { (Results)
    [Pipeline] publishHTML
    [htmlpublisher] Archiving HTML reports...
    [htmlpublisher] Archiving at BUILD level /opt/jenkins_agent/workspace/testforhtml to /var/jenkins_home/jobs/testforhtml/builds/13/htmlreports/HTML_20Report
    [Pipeline] step
    [Pipeline] }
    [Pipeline] // stage
    [Pipeline] }
    [Pipeline] // node
    [Pipeline] End of Pipeline
    java.lang.NullPointerException
    	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
    	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
    	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at java.lang.Thread.run(Thread.java:748)
    Finished: FAILURE

    stage('Results') {
    steps{
    step(
    publishHTML([allowMissing: false,
    alwaysLinkToLastBuild: false,
    keepAll: false,
    reportDir: '/tmp/',
    reportFiles: 'dbpay.html',
    reportName: 'HTML Report',
    reportTitles: ''])
    )}}

    stage('Results') {
    steps{
    script{
    publishHTML([allowMissing: false,
    alwaysLinkToLastBuild: false,
    keepAll: false,
    reportDir: '/tmp/',
    reportFiles: 'dbpay.html',
    reportName: 'HTML Report',
    reportTitles: ''])
    }}}

  • 相关阅读:
    HDU1879 kruscal 继续畅通工程
    poj1094 拓扑 Sorting It All Out
    (转)搞ACM的你伤不起
    (转)女生应该找一个玩ACM的男生
    poj3259 bellman——ford Wormholes解绝负权问题
    poj2253 最短路 floyd Frogger
    Leetcode 42. Trapping Rain Water
    Leetcode 41. First Missing Positive
    Leetcode 4. Median of Two Sorted Arrays(二分)
    Codeforces:Good Bye 2018(题解)
  • 原文地址:https://www.cnblogs.com/maxforb/p/14621605.html
Copyright © 2011-2022 走看看