Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to add Javascript files to Jenkins jelly file?

I couldn't find any where to on how to include my own javascript to jenkins jelly file. So far I have added jquery using the following

  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"/>

Say if I have myPageScripts.js in jenkins project, is there anyway I can include my own javascript files there with script src?

like image 776
Njax3SmmM2x2a0Zf7Hpd Avatar asked Dec 11 '22 15:12

Njax3SmmM2x2a0Zf7Hpd


1 Answers

Found it finally :) You can add it to your project path

Add all your custom js here.

projectName\src\main\webapp\myCustom.js

on Jelly file I can access that by

 <script src="${rootURL}/plugin/projectName/myCustom.js"/>
like image 75
Njax3SmmM2x2a0Zf7Hpd Avatar answered Feb 06 '23 21:02

Njax3SmmM2x2a0Zf7Hpd