drulli: I've attached the screenshots demonstrating what's going wrong (I'm using multi-branch pipeline, folders, nested view and dashboard view plugins)
The hierarchy of the folders is the following
authentication-service » build-multi » DMC-2273-continuous-delivery
... where
- authentication-service - is the manually created folder (Folders plugin)
- build-multi - is the name of the multi-branch pipeline job
- DMC-2273-continuous-delivery - is the name of the automatically created job from the corresponding branch
I've configured a nested view develop-main with the dashboard and this view has the following URL
https://host:port/view/REPORTS/view/develop-main/
Here is the screenshot that shows the original behavior of the analysis-collector-plugin's Dashboard.
The URLs which lead us to the corresponding warnings page look like the following
https://host:port/view/REPORTS/view/develop-main/job/DMC-2273-continuous-delivery/tasks
... where
- REPORTS is the name of the view
- develop-main is the name of the multi-branch pipeline job
- DMC-2273-continuous-delivery is the name of the job that was created automatically
Updated plugin with the applied pull request leads to generation of the following URLs
https://host:port/view/REPORTS/view/develop-main/job/authentication-service/job/build-multi/job/DMC-2273-continuous-delivery/tasks
So as you can see in case of unapplied and applied patch the URLs are different
https://host:port/view/REPORTS/view/develop-main/job/DMC-2273-continuous-delivery/tasks
// vs
https://host:port/view/REPORTS/view/develop-main/job/authentication-service/job/build-multi/job/DMC-2273-continuous-delivery/tasks
... and we can see that in the first case all the intermediate folders (manually created one, and multi-branch pipeline's one) are missed.
The missed folders lead us to 404 errors, and applying a patch makes the dashboard generate correct URLs.
It also seems that according to the verifyPortlet and verifyColumn methods of the ATH only link text is verified, but not its href attribute.
Code changed in jenkins
User: Ulli Hafner
Path:
src/main/java/org/jenkinsci/test/acceptance/plugins/analysis_collector/AnalysisCollectorAction.java
src/main/java/org/jenkinsci/test/acceptance/plugins/analysis_collector/WarningsPerProjectPortlet.java
src/main/java/org/jenkinsci/test/acceptance/plugins/analysis_core/AbstractTablePortlet.java
src/main/java/org/jenkinsci/test/acceptance/plugins/analysis_core/AnalysisAction.java
src/main/java/org/jenkinsci/test/acceptance/plugins/checkstyle/CheckStyleAction.java
src/main/java/org/jenkinsci/test/acceptance/plugins/checkstyle/CheckStylePortlet.java
src/main/java/org/jenkinsci/test/acceptance/plugins/dashboard_view/AbstractDashboardViewPortlet.java
src/main/java/org/jenkinsci/test/acceptance/plugins/findbugs/FindBugsAction.java
src/main/java/org/jenkinsci/test/acceptance/plugins/findbugs/FindBugsPortlet.java
src/main/java/org/jenkinsci/test/acceptance/plugins/pmd/PmdAction.java
src/main/java/org/jenkinsci/test/acceptance/plugins/pmd/PmdWarningsPortlet.java
src/main/java/org/jenkinsci/test/acceptance/plugins/tasks/TaskScannerAction.java
src/main/java/org/jenkinsci/test/acceptance/plugins/tasks/TasksColumn.java
src/main/java/org/jenkinsci/test/acceptance/plugins/tasks/TasksPortlet.java
src/main/java/org/jenkinsci/test/acceptance/plugins/warnings/WarningsAction.java
src/main/java/org/jenkinsci/test/acceptance/plugins/warnings/WarningsPortlet.java
src/main/java/org/jenkinsci/test/acceptance/po/AbstractListViewColumn.java
src/main/java/org/jenkinsci/test/acceptance/po/Build.java
src/test/java/plugins/AbstractAnalysisTest.java
src/test/java/plugins/AnalysisCollectorPluginTest.java
src/test/java/plugins/CheckStylePluginTest.java
src/test/java/plugins/FindBugsPluginTest.java
src/test/java/plugins/PmdPluginTest.java
src/test/java/plugins/WarningsPluginTest.java
http://jenkins-ci.org/commit/acceptance-test-harness/a94aef1e8d8d340bd7bd01ba67ba7716fbea8b36
Log:
Pulled column and portlet tests up to AbstractAnalysisTest.
Now all static analysis plug-ins have a common test that checks that the number of warnings is shown as a link in the warnings column and warnings table portlet.
Currently a test does not check the URL itself it rather clicks the link to see if the navigation works. This could be used as a basis for
JENKINS-39947.