2017-02-20 5 views
0

生成されたvalgrind結果を、dslスクリプトを使用するjenkinsで公開する方法を教えてください。私はpublishers.archiveArtifacts/publishers.archiveJunitを行うことができますが、私はvalgrindのために同じことをすることはできません。jenkins dslスクリプトを使用してvalgrind結果を公開する方法

私が試した事に従うがConfigure Blockjobコンテキストでのみ使用可能ですが、publishersコンテキストではない

job.publishers { 
configure { node -> 
    node << 'org.jenkinsci.plugins.valgrind.ValgrindPublisher' { 
    } 
} 
} 

javaposse.jobdsl.dsl.helpers.publisher.PublisherContext.configure() is applicable for argument types: 
(builders.JobBuilder$_create_job_closure6_closure19) values 
[[email protected]] 

答えて

0

例外を以下ました:別の方法として

job('example-1') { 
    configure { node -> 
    node/publishers << 'org.jenkinsci.plugins.valgrind.ValgrindPublisher' { 
     // options 
    } 
    } 
} 

、あなたが使用することができますAutomatically Generated DSL

job(String name) { 
    publishers { 
    valgrindPublisher { 
     pattern(String value) 
     failThresholdInvalidReadWrite(String value) 
     failThresholdDefinitelyLost(String value) 
     failThresholdTotal(String value) 
     unstableThresholdInvalidReadWrite(String value) 
     unstableThresholdDefinitelyLost(String value) 
     unstableThresholdTotal(String value) 
     publishResultsForAbortedBuilds(boolean value) 
     publishResultsForFailedBuilds(boolean value) 
     failBuildOnMissingReports(boolean value) 
     failBuildOnInvalidReports(boolean value) 
    } 
    } 
} 
+0

このパブリッシャー{node {'org.jenkinsci.plugins.valgrind.ValgrindPublisher' {}}}}を発行しましたが、dslがエラーを投げました – Shiva

+0

私は答えを更新しました。 – daspilker

関連する問題