• Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • pipeline-maven-plugin
    • None

      Maven projects automatically archive Maven-generated sites. The site is served under job/<job-name>/site/. It would be great if it would be possible to do the same by withMaven, example:

      stage('Build Docs') {
        steps {
          withMaven(publisherStrategy: 'EXPLICIT' options: [
            sitePublisher(disabled: false)
          ]) {
            sh "mvn site"
          }
        }
      }
      

      Now I use the following workaround:

      stage('Build Docs') {
        steps {
          withMaven(publisherStrategy: 'EXPLICIT' options: [
            sitePublisher(disabled: false)
          ]) {
            sh "mvn site"
          }
          dir('target') {
            archiveArtifacts artifacts: 'site/**'
          }
        }
      }
      

      Documentation is available under:
      job/<job-name>/job/<branch-name>/lastSuccessfulBuild/artifact/site/ (user is forced to click index.html).

          [JENKINS-54779] Publish site reports

          Adam Gabryś created issue -
          Adam Gabryś made changes -
          Description Original: Maven projects automatically archive Maven-generated sites. The site is served under {{job/<job-name>/site/}}. It would be great if it would be possible to do the same by {{withMaven}}, example:
          {noformat}
          stage('Build Docs') {
            steps {
              withMaven(publisherStrategy: 'EXPLICIT' options: [
                sitePublisher(disabled: false)
              ]) {
                sh "mvn site"
              }
            }
          }
          {noformat}
          Now I use the following workaround:
          {noformat}
          stage('Build Docs') {
            steps {
              withMaven(publisherStrategy: 'EXPLICIT' options: [
                sitePublisher(disabled: false)
              ]) {
                sh "mvn site"
              }
              dir('target') {
                archiveArtifacts artifacts: 'site/**'
              }
            }
          }
          {noformat}
          Documentation is available under:
           {{job/<job-name>/job/<branch-name>/lastSuccessfulBuild/artifact/site/}} (user is forced to click {{index.html}}).
          New: Maven projects automatically archive Maven-generated sites. The site is served under {{job/<job-name>/site/}}. It would be great if it would be possible to do the same by {{withMaven}}, example:
          {noformat}
          stage('Build Docs') {
            steps {
              withMaven(publisherStrategy: 'EXPLICIT' options: [
                sitePublisher(disabled: false)
              ]) {
                sh "mvn site"
              }
            }
          }
          {noformat}
          Now I use the following workaround:
          {noformat}
          stage('Build Docs') {
            steps {
              withMaven(publisherStrategy: 'EXPLICIT' options: [
                sitePublisher(disabled: false)
              ]) {
                sh "mvn site"
              }
              dir('target') {
                archiveArtifacts artifacts: 'site/**'
              }
            }
          }
          {noformat}
          Documentation is available under:
           {{view/maven/job/<job-name>/job/<branch-name>/lastSuccessfulBuild/artifact/site/}} (user is forced to click {{index.html}}).
          Adam Gabryś made changes -
          Description Original: Maven projects automatically archive Maven-generated sites. The site is served under {{job/<job-name>/site/}}. It would be great if it would be possible to do the same by {{withMaven}}, example:
          {noformat}
          stage('Build Docs') {
            steps {
              withMaven(publisherStrategy: 'EXPLICIT' options: [
                sitePublisher(disabled: false)
              ]) {
                sh "mvn site"
              }
            }
          }
          {noformat}
          Now I use the following workaround:
          {noformat}
          stage('Build Docs') {
            steps {
              withMaven(publisherStrategy: 'EXPLICIT' options: [
                sitePublisher(disabled: false)
              ]) {
                sh "mvn site"
              }
              dir('target') {
                archiveArtifacts artifacts: 'site/**'
              }
            }
          }
          {noformat}
          Documentation is available under:
           {{view/maven/job/<job-name>/job/<branch-name>/lastSuccessfulBuild/artifact/site/}} (user is forced to click {{index.html}}).
          New: Maven projects automatically archive Maven-generated sites. The site is served under {{job/<job-name>/site/}}. It would be great if it would be possible to do the same by {{withMaven}}, example:
          {noformat}
          stage('Build Docs') {
            steps {
              withMaven(publisherStrategy: 'EXPLICIT' options: [
                sitePublisher(disabled: false)
              ]) {
                sh "mvn site"
              }
            }
          }
          {noformat}
          Now I use the following workaround:
          {noformat}
          stage('Build Docs') {
            steps {
              withMaven(publisherStrategy: 'EXPLICIT' options: [
                sitePublisher(disabled: false)
              ]) {
                sh "mvn site"
              }
              dir('target') {
                archiveArtifacts artifacts: 'site/**'
              }
            }
          }
          {noformat}
          Documentation is available under:
          {{job/<job-name>/job/<branch-name>/lastSuccessfulBuild/artifact/site/}} (user is forced to click {{index.html}}).
          Arnaud Héritier made changes -
          Assignee Original: Alvaro Lobato [ alobato ]

            Unassigned Unassigned
            agabrys Adam Gabryś
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: