Hi,
Need some help, I have spent quite a bit of time on this apparently simple part of plugin development.
My Atlassian plugin xml has the below. Also, I have the action class RobotReportDetails extended from ViewBuildResults.
public class RobotReportDetails extends ViewBuildResults {
public String doExecute() throws Exception {
String strBuildList = super.doExecute();
return strBuildList;
}
public String getArtifactReport(){
return getSharedArtifactPath();
//return "Path to Artifact Report";
}
public String getArtifactLog(){
return "Path to Artifact Log";
}
}atlassian-plugin.xml
<xwork key="viewRobotReport" name="View Robot Report">
<package name="RobotPlugin" extends="buildResultView">
<action name="viewRobotReport" class="isode.bamboo.RobotTestTask.RobotReportDetails">
<result name="success" type="freemarker">viewRobotReport.ftl</result>
</action>
</package>
</xwork>
<web-item key="RobotJob-${planKey}-${buildNumber}" name="RobotReport" section="results.subMenu/results" weight="80">
<label key="Robot Report"/>
<link linkId="RobotBuild-${planKey}-${buildNumber}">/build/result/viewRobotReport.action?buildKey=${planKey}&buildNumber=${buildNumber}</link>
<condition class="isode.bamboo.RobotTestTask.RobotReportDetailsViewCondition"/>
</web-item>
Console Logs..
[INFO] [talledLocalContainer] 2018-05-02 10:21:03,137 INFO [http-nio-6990-exec-2] [AccessLogFilter] admin GET http://172.20.1.30:6990/bamboo/build/result/viewRobotReport.action?buildKey=TPROJ1-TPLAN1-JOB1&buildNumber=61&_=1525252860943 148384kb
[INFO] [talledLocalContainer] 2018-05-02 10:21:03,138 ERROR [http-nio-6990-exec-2] [BambooStrutsUnknownHandler] There is no Action mapped for namespace [/build/result] and action name [viewRobotReport] associated with context path [/bamboo].
[INFO] [talledLocalContainer] 2018-05-02 10:21:03,244 INFO [http-nio-6990-exec-8] [AccessLogFilter] admin GET http://172.20.1.30:6990/bamboo/build/result/viewRobotReport.action?buildKey=TPROJ1-TPLAN1-JOB1&buildNumber=61 200988kb
[INFO] [talledLocalContainer] 2018-05-02 10:21:03,245 ERROR [http-nio-6990-exec-8] [BambooStrutsUnknownHandler] There is no Action mapped for namespace [/build/result] and action name [viewRobotReport] associated with context path [/bamboo].
[INFO] [talledLocalContainer] 2018-05-02 10:21:03,294 ERROR [http-nio-6990-exec-8] [runtime] Error executing FreeMarker template
[INFO] [talledLocalContainer] FreeMarker template error:
[INFO] [talledLocalContainer] The following has evaluated to null or missing:
[INFO] [talledLocalContainer] ==> navigationContext [in template "decorators/resultDecorator.ftl" at line 17, column 18]
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] ----
My template file has nothing but the below
<html>
<head>
<meta name="decorator" content="result"/>
</head>
<body>
</body>
</html>
Similar question on stackoverflow
I copied the struts.xml in src/main/resources directory as suggested
https://stackoverflow.com/questions/8991597/struts-hello-world-example-there-is-no-action-mapped-for-namespace-and-act
When I click on the tab on the job page I get an error
Apologies, this page could not be properly decorated (data is missing)
Page Not found.
I can see that the struts.xml does not contain the below package definition
<package name="RobotPlugin" extends="buildResultView"><br><action name="viewRobotReport" class="robot.RobotReport"><br><result name="success"type="freemarker">viewRobotReport.ftl<br></result><br></action><br></package>
Shouldn't the struts.xml be updated automatically by bamboo with the content present in atlassian-plugin.xml ?
Could anyone please help ?
Regards,
kshitij