Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from Jimilian/classpath
Add posibility to add custom folders to classpath
- Loading branch information
Showing
5 changed files
with
102 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...resources/org/jenkinsci/plugins/globalEventsPlugin/GlobalEventsPlugin/help-classPath.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<div> | ||
If you have some complicated code and you don't want to store it in Jenkins configuration page, | ||
you can easily extract it to groovy file, save in folder and add this folder to class path. | ||
|
||
After that you will be able to import this class from your code. | ||
|
||
Example: | ||
<pre><code> | ||
> cd /var/lib/jenkins | ||
> mkdir groovy_scripts | ||
> echo "class Constants { public static final int TIMEOUT = 10; }" > groovy_scripts/Constants.groovy | ||
</code></pre> | ||
|
||
Now you cad add <code>/var/lib/jenkins/groovy_scripts</code> folder to classpath and do something like this: | ||
<pre><code> | ||
import Constants | ||
log.info Constants.TIMEOUT | ||
</code></pre> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters