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

Add support for Confluence Publisher Plugin

    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

          v2v Victor Martinez created issue -
          v2v Victor Martinez made changes -
          Field Original Value New Value
          Description Plugin: https://wiki.jenkins-ci.org/display/JENKINS/Android+Emulator+Plugin

          {code:xml|title=Configuration section}
          <builders>
            <hudson.plugins.android__emulator.InstallBuilder plugin="android-emulator@2.13.1">
              <apkFile>aa</apkFile>
              <uninstallFirst>true</uninstallFirst>
              <failOnInstallFailure>true</failOnInstallFailure>
            </hudson.plugins.android__emulator.InstallBuilder>
            <hudson.plugins.android__emulator.builder.ProjectPrerequisitesInstaller plugin="android-emulator@2.13.1"/>
            <hudson.plugins.android__emulator.builder.UpdateProjectBuilder plugin="android-emulator@2.13.1"/>
            <hudson.plugins.android__emulator.monkey.MonkeyBuilder plugin="android-emulator@2.13.1">
              <filename>11</filename>
              <packageId>aa</packageId>
              <eventCount>1</eventCount>
              <throttleMs>1</throttleMs>
              <seed>0</seed>
              <categories>11</categories>
              <extraParameters>11</extraParameters>
            </hudson.plugins.android__emulator.monkey.MonkeyBuilder>
            <hudson.plugins.android__emulator.UninstallBuilder plugin="android-emulator@2.13.1">
              <packageId>11</packageId>
              <failOnUninstallFailure>true</failOnUninstallFailure>
            </hudson.plugins.android__emulator.UninstallBuilder>
          </builders>
          <publishers>
            <hudson.plugins.android__emulator.monkey.MonkeyRecorder plugin="android-emulator@2.13.1">
              <filename>11</filename>
              <failureOutcome>UNSTABLE</failureOutcome>
            </hudson.plugins.android__emulator.monkey.MonkeyRecorder>
          </publishers>
          {code}

          {code:xml|title=Configuration section}
          <buildWrappers>
            <hudson.plugins.android__emulator.AndroidEmulator plugin="android-emulator@2.13.1">
              <osVersion>os</osVersion>
              <screenDensity>480</screenDensity>
              <screenResolution>WXGA720</screenResolution>
              <deviceLocale>ca_ES</deviceLocale>
              <targetAbi>mips</targetAbi>
              <sdCardSize>12M</sdCardSize>
              <avdNameSuffix>sd</avdNameSuffix>
              <hardwareProperties>
                <hudson.plugins.android__emulator.AndroidEmulator_-HardwareProperty>
                  <key>1</key>
                  <value>1</value>
                </hudson.plugins.android__emulator.AndroidEmulator_-HardwareProperty>
                <hudson.plugins.android__emulator.AndroidEmulator_-HardwareProperty>
                  <key>2</key>
                  <value>2</value>
                </hudson.plugins.android__emulator.AndroidEmulator_-HardwareProperty>
              </hardwareProperties>
              <wipeData>true</wipeData>
              <showWindow>true</showWindow>
              <useSnapshots>true</useSnapshots>
              <deleteAfterBuild>true</deleteAfterBuild>
              <startupDelay>1</startupDelay>
              <commandLineOptions>1</commandLineOptions>
              <executable>1</executable>
            </hudson.plugins.android__emulator.AndroidEmulator>
          </buildWrappers>
          {code}

          {code:xml}
          <buildWrappers>
            <hudson.plugins.android__emulator.AndroidEmulator plugin="android-emulator@2.13.1">
              <avdName>123</avdName>
              <hardwareProperties/>
              <wipeData>true</wipeData>
              <showWindow>true</showWindow>
              <useSnapshots>true</useSnapshots>
              <deleteAfterBuild>true</deleteAfterBuild>
              <startupDelay>1</startupDelay>
              <commandLineOptions>1</commandLineOptions>
              <executable>1</executable>
            </hudson.plugins.android__emulator.AndroidEmulator>
          </buildWrappers>
          {code}
          Plugin: https://wiki.jenkins-ci.org/display/JENKINS/Confluence+Publisher+Plugin

          {code:xml|title=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>
          {code}
          v2v Victor Martinez made changes -
          Issue Type Bug [ 1 ] New Feature [ 2 ]
          v2v Victor Martinez made changes -
          Issue Type New Feature [ 2 ] Task [ 3 ]
          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' ) } } }
          daspilker Daniel Spilker made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          daspilker Daniel Spilker made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          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.
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 167231 ] JNJira + In-Review [ 209483 ]

            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: