Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save marcelbirkner/0a4959e74c0c806c00f8 to your computer and use it in GitHub Desktop.
Save marcelbirkner/0a4959e74c0c806c00f8 to your computer and use it in GitHub Desktop.
jenkins-job-dsl-confluence-publisher-configure-block
/**
* Jenkins Job DSL configure block for Confluence Publisher
* Open Feature Request, see https://issues.jenkins-ci.org/browse/JENKINS-31786
*
* siteName = Link to your Confluence Installation
* spaceName = Confluence Space
* pageName = Confluence Page Name
*
*/
job('confluence-publisher-job') {
configure { project ->
project / publishers << 'com.myyearbook.hudson.plugins.confluence.ConfluencePublisher' {
siteName 'confluence.company.com'
attachArchivedArtifacts 'false'
buildIfUnstable 'false'
spaceName 'TEST'
pageName 'Jenkins Confluence Publisher Integration Test'
editors {
'com.myyearbook.hudson.plugins.confluence.wiki.editors.PrependEditor' {
generator(class: "com.myyearbook.hudson.plugins.confluence.wiki.generators.PlainTextGenerator") {
text 'Jenkins Publisher Job Build Number: $BUILD_NUMBER'
}
}
'com.myyearbook.hudson.plugins.confluence.wiki.editors.AppendEditor' {
generator(class: "com.myyearbook.hudson.plugins.confluence.wiki.generators.PlainTextGenerator") {
text 'Jenkins Publisher Job Build Number: $BUILD_NUMBER'
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment