Skip to content
This repository was archived by the owner on Sep 30, 2025. It is now read-only.

Commit 17b82ce

Browse files
author
Radislav Berkovich
committed
tech : fix getAllowedStorageFile for slaves
1 parent 04501a6 commit 17b82ce

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/com/microfocus/application/automation/tools/octane/CIJenkinsServicesImpl.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -775,9 +775,10 @@ private TopLevelItem getTopLevelItem(String jobRefId) {
775775
return item;
776776
}
777777

778-
public static File getAllowedStorageFile(){
779-
return new File(Jenkins.get().getRootDir(), "userContent");
780-
}
778+
public static File getAllowedStorageFile() {
779+
Jenkins jenkins = Jenkins.getInstanceOrNull();
780+
return (jenkins == null /*is slave*/) ? new File("octanePluginContent") : new File(jenkins.getRootDir(), "userContent") ;
781+
}
781782

782783
public static CIServerInfo getJenkinsServerInfo() {
783784
CIServerInfo result = dtoFactory.newDTO(CIServerInfo.class);

0 commit comments

Comments
 (0)