项目作者: kobanyan

项目描述 :
A Jenkins Pipeline Shared Library to report jenkins jobs.
高级语言: Groovy
项目地址: git://github.com/kobanyan/jenkins-job-reporter.git
创建时间: 2017-06-11T15:19:47Z
项目社区:https://github.com/kobanyan/jenkins-job-reporter

开源协议:

下载


Jenkins Job Reporter

A Jenkins Pipeline Shared Library to report jenkins jobs.

Usage

  1. @Library('jenkins-job-reporter')
  2. excludes = [
  3. hudson.matrix.MatrixConfiguration.class,
  4. ]
  5. jobHandlers = [
  6. new com.github.kobanyan.jenkins_job_reporter.reporters.DefaultJobReporter(),
  7. new com.github.kobanyan.jenkins_job_reporter.reporters.ParameterizedJobReporter(),
  8. ]
  9. propertyHandlers = [
  10. new com.github.kobanyan.jenkins_job_reporter.reporters.BuildDiscarderPropertyReporter(),
  11. new com.github.kobanyan.jenkins_job_reporter.reporters.ParametersDefinitionPropertyReporter(),
  12. ]
  13. node() {
  14. stage('Build Report') {
  15. def reporter = new com.github.kobanyan.jenkins_job_reporter.JenkinsJobReporter(
  16. excludes: excludes,
  17. jobHandlers: jobHandlers,
  18. propertyHandlers: propertyHandlers,
  19. )
  20. def report = reporter.report()
  21. stage('Archive Report') {
  22. def file = 'report.json'
  23. writeFile file: file, text: report
  24. archiveArtifacts artifacts: file
  25. }
  26. }
  27. }