forked from jenkinsci/JenkinsPipelineUnit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue jenkinsci#224 - Load lib classes before lib vars
FILL IN THE BLANKS. This is a preliminary commit just to ship WIP from the abandoned `support-lazy-lib-class-load` branch.
- Loading branch information
Showing
5 changed files
with
60 additions
and
9 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
6 changes: 6 additions & 0 deletions
6
...b/library/cross_class_pre_loaded/test_var_with_lib_class_arg_annotation_lazy_load.jenkins
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,6 @@ | ||
//Commenting the annotation appears to make no difference when load is implicit | ||
@Library("test_cross_class_usage") | ||
import org.test.Monster1 | ||
|
||
vampire = new Monster1("Dracula") | ||
monster1(vampire) |
9 changes: 9 additions & 0 deletions
9
src/test/resources/libs/test_cross_class_usage/src/org/test/Monster1.groovy
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,9 @@ | ||
package org.test | ||
|
||
class Monster1 { | ||
String moniker | ||
|
||
Monster1(String m) { | ||
moniker = m | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/test/resources/libs/test_cross_class_usage/vars/monster1.groovy
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,5 @@ | ||
import org.test.Monster1 | ||
|
||
void call(Monster1 m1) { | ||
echo "$m1.moniker makes quite a scary monster" | ||
} |