Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-29742

Add Job DSL support for Reviewbot

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      As reviewbot is a really powerful plugin it would be great if DSL could support it.

      https://wiki.jenkins-ci.org/display/JENKINS/Jenkins-Reviewbot

        Attachments

          Activity

          Hide
          misery A. Klitzing added a comment -

          For everyone who wants to use it until it is officially supported.

          Parameter:

          	configure
          	{
          		project -> project / 'properties' / 'hudson.model.ParametersDefinitionProperty' / 'parameterDefinitions' << 'org.jenkinsci.plugins.jenkinsreviewbot.ReviewboardParameterDefinition' {
          			name('review.url')
          			defaultValue('')
          		}
          	}
          

          Polling:

          	configure
          	{
          		project -> project / 'builders' << 'org.jenkinsci.plugins.jenkinsreviewbot.ReviewboardPollingBuilder' {
          			reviewbotJobName 'JobName'
          			checkBackPeriod '2'
          			reviewbotRepoId '1'
          			restrictByUser 'true'
          			disableAdvanceNotice 'true'
          			processedReviewDates ''
          		}
          	}
          

          Notifier:

          	configure
          	{
          		project -> project / 'publishers' << 'org.jenkinsci.plugins.jenkinsreviewbot.ReviewboardNotifier' {
          			shipItOnSuccess 'false'
          			useMarkdown 'true'
          			customMessage ''
          		}
          	}
          
          Show
          misery A. Klitzing added a comment - For everyone who wants to use it until it is officially supported. Parameter: configure { project -> project / 'properties' / 'hudson.model.ParametersDefinitionProperty' / 'parameterDefinitions' << 'org.jenkinsci.plugins.jenkinsreviewbot.ReviewboardParameterDefinition' { name( 'review.url' ) defaultValue('') } } Polling: configure { project -> project / 'builders' << 'org.jenkinsci.plugins.jenkinsreviewbot.ReviewboardPollingBuilder' { reviewbotJobName 'JobName' checkBackPeriod '2' reviewbotRepoId '1' restrictByUser ' true ' disableAdvanceNotice ' true ' processedReviewDates '' } } Notifier: configure { project -> project / 'publishers' << 'org.jenkinsci.plugins.jenkinsreviewbot.ReviewboardNotifier' { shipItOnSuccess ' false ' useMarkdown ' true ' customMessage '' } }
          Hide
          daspilker Daniel Spilker added a comment -

          @misery: Please open a pull request to add support for the Jenkins-Reviewbot Plugin. It's not mandatory to support all options, just add those where you do not want to use the default value.

          Show
          daspilker Daniel Spilker added a comment - @misery: Please open a pull request to add support for the Jenkins-Reviewbot Plugin. It's not mandatory to support all options, just add those where you do not want to use the default value.
          Hide
          daspilker Daniel Spilker added a comment - - edited

          The upcoming generic DSL (https://github.com/jenkinsci/job-dsl-plugin/pull/816) will enable support for the Reviewbot plugin:

          job('example') {
            parameters {
              reviewboardParameterDefinition()
            }
            steps {
              reviewboardPollingBuilder {
                reviewbotJobName('JobName')
                checkBackPeriod('2')
                reviewbotRepoId('1')
                restrictByUser(true)
                disableAdvanceNotice(true)
              }
            }
            publishers {
              reviewboardNotifier {
                shipItOnSuccess(false)
                useMarkdown(true)
              }
            }
          }
          
          Show
          daspilker Daniel Spilker added a comment - - edited The upcoming generic DSL ( https://github.com/jenkinsci/job-dsl-plugin/pull/816 ) will enable support for the Reviewbot plugin: job( 'example' ) { parameters { reviewboardParameterDefinition() } steps { reviewboardPollingBuilder { reviewbotJobName( 'JobName' ) checkBackPeriod( '2' ) reviewbotRepoId( '1' ) restrictByUser( true ) disableAdvanceNotice( true ) } } publishers { reviewboardNotifier { shipItOnSuccess( false ) useMarkdown( true ) } } }

            People

            Assignee:
            daspilker Daniel Spilker
            Reporter:
            misery A. Klitzing
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: