Tuesday, March 15, 2022

[SOLVED] Jenkins HTMLPublisher Plugin not displaying on the dashboard

Issue

After moving my jenkins home directory from /var/lib/jenkins to /home/jenkins for more disk space with the following commands:

sudo service jenkins stop
sudo mv /var/lib/jenkins /home
sudo ln -s /home/jenkins /var/lib/jenkins
sudo service jenkins start

the HTMLPublisher plugin is no longer displaying the link on the left panel of the dashboard.

Following is what the console outputs

enter image description here

Following is what I have in the post build part of the Jenkins pipeline:

        publishHTML([
            allowMissing: true,
            alwaysLinkToLastBuild: false,
            keepAll: true,
            reportDir: 'builder',
            reportFiles: 'lighthouse-report.html',
            reportName: 'Lighthouse Report',
            reportTitles: ''
        ])

Note: this was working prior to changing the home directory for more disk space.


Solution

The permanent solution (which survives a restart) was simply to delete lighthouse-report.html from the src location. Then refresh the page and you're able to see it at the updated path.



Answered By - Ray Kim
Answer Checked By - Terry (WPSolving Volunteer)