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

Add support for Confluence Publisher Plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Plugin: https://wiki.jenkins-ci.org/display/JENKINS/Confluence+Publisher+Plugin

      Configuration section
      <publishers>
        <com.myyearbook.hudson.plugins.confluence.ConfluencePublisher plugin="confluence-publisher@1.8">
          <siteName>wiki.jenkins-ci.org</siteName>
          <attachArchivedArtifacts>true</attachArchivedArtifacts>
          <buildIfUnstable>true</buildIfUnstable>
          <fileSet>123.file</fileSet>
          <spaceName>123</spaceName>
          <pageName>123</pageName>
          <editors>
            <com.myyearbook.hudson.plugins.confluence.wiki.editors.AppendEditor>
              <generator class="com.myyearbook.hudson.plugins.confluence.wiki.generators.FileGenerator">
                <filename>file.name</filename>
              </generator>
            </com.myyearbook.hudson.plugins.confluence.wiki.editors.AppendEditor>
            <com.myyearbook.hudson.plugins.confluence.wiki.editors.AfterTokenEditor>
              <generator class="com.myyearbook.hudson.plugins.confluence.wiki.generators.FileGenerator">
                <filename>file.name</filename>
              </generator>
              <markerToken>asa</markerToken>
            </com.myyearbook.hudson.plugins.confluence.wiki.editors.AfterTokenEditor>
            <com.myyearbook.hudson.plugins.confluence.wiki.editors.BeforeTokenEditor>
              <generator class="com.myyearbook.hudson.plugins.confluence.wiki.generators.FileGenerator">
                <filename>file.name</filename>
              </generator>
              <markerToken>marker</markerToken>
            </com.myyearbook.hudson.plugins.confluence.wiki.editors.BeforeTokenEditor>
            <com.myyearbook.hudson.plugins.confluence.wiki.editors.PrependEditor>
              <generator class="com.myyearbook.hudson.plugins.confluence.wiki.generators.PlainTextGenerator">
                <text>sdfs</text>
              </generator>
            </com.myyearbook.hudson.plugins.confluence.wiki.editors.PrependEditor>
            <com.myyearbook.hudson.plugins.confluence.wiki.editors.BetweenTokensEditor>
              <generator class="com.myyearbook.hudson.plugins.confluence.wiki.generators.FileGenerator">
                <filename>file.name</filename>
              </generator>
              <startMarkerToken>start</startMarkerToken>
              <endMarkerToken>end</endMarkerToken>
            </com.myyearbook.hudson.plugins.confluence.wiki.editors.BetweenTokensEditor>
            <com.myyearbook.hudson.plugins.confluence.wiki.editors.EntirePageEditor>
              <generator class="com.myyearbook.hudson.plugins.confluence.wiki.generators.FileGenerator">
                <filename>file.name</filename>
              </generator>
            </com.myyearbook.hudson.plugins.confluence.wiki.editors.EntirePageEditor>
          </editors>
        </com.myyearbook.hudson.plugins.confluence.ConfluencePublisher>
      </publishers>
      

        Attachments

          Activity

          Hide
          marcelbirkner Marcel Birkner added a comment -

          Until this has been implemented I created an example Job DSL configure block that you can use as a template:
          See https://gist.github.com/marcelbirkner/0a4959e74c0c806c00f8

          /**
           * 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'
                    }                
                  }
                }
              }
            }
          }
          
          Show
          marcelbirkner Marcel Birkner added a comment - Until this has been implemented I created an example Job DSL configure block that you can use as a template: See https://gist.github.com/marcelbirkner/0a4959e74c0c806c00f8 /** * 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' } } } } } }
          Hide
          daspilker Daniel Spilker added a comment -

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

          job('example') {
            publishers {
              confluencePublisher {
                siteName('confluence.example.org')
                buildIfUnstable(false)
                spaceName('DEMO')
                pageName('foo')
                attachArchivedArtifacts(false)
                fileSet('**/*.png')
              }
            }
          }
          
          Show
          daspilker Daniel Spilker added a comment - The upcoming generic DSL ( https://github.com/jenkinsci/job-dsl-plugin/pull/816 ) will enable support for the Confluence Publisher plugin: job( 'example' ) { publishers { confluencePublisher { siteName( 'confluence.example.org' ) buildIfUnstable( false ) spaceName( 'DEMO' ) pageName( 'foo' ) attachArchivedArtifacts( false ) fileSet( '**/*.png' ) } } }
          Hide
          knagendrak NagendraKumar Kamalapuri added a comment -

          I have a small doubt, with this confluence publish plugin, what are the project artifacts we will upload and how to achieve it using Jenkins.

          Show
          knagendrak NagendraKumar Kamalapuri added a comment - I have a small doubt, with this confluence publish plugin, what are the project artifacts we will upload and how to achieve it using Jenkins.

            People

            • Assignee:
              v2v Victor Martinez
              Reporter:
              v2v Victor Martinez
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: