Reputation: 62906
I need to add a file for downloading to a plugin, which provides a build step. I want to put link to it into a HTML help file for a build step field, and also be able to paste the link to e-mails etc.
Let's assume this is just a simple, plain plugin project, with pom.xml
having this:
<groupId>my.jenkins.plugins</groupId>
<artifactId>my-special-plugin</artifactId>
<name>My Special Plugin</name>
Name of the downloadable is myspecialtool.exe
Where to put the file under the plugin project source
What is the download URL, assuming Jenkins is at http://ciserver:8080
What to write to a help HTML file to link to it "properly" (if different from above)
Hoping to get a good reference answer: clear, short and to-the-point.
Upvotes: 2
Views: 1420
Reputation: 10665
Store data that you want to be able to address as 'web data' in src/main/webapp
in your plugin project.
That directory should be addressable as /plugin/<name of your plugin>
(from 'Jenkins Continuous Integration Cookbook')
Answers to the enumerated questions:
Put file under src/main/webapp
, perhaps in a sub-folder, so:
src/main/webapp/download/myspecialtool.exe
URL to that is is then:
http://ciserver:8080/plugin/my-special-plugin/download/myspecialtool.exe
Link to put to help HTML files:
/plugin/my-special-plugin/download/myspecialtool.exe
Upvotes: 2