Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix JENKINS-13841
- Loading branch information
1 parent
fd180c0
commit ad3f87b
Showing
12 changed files
with
96 additions
and
29 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
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
30 changes: 30 additions & 0 deletions
30
src/main/java/org/jenkinsci/plugins/artifactdeployer/service/ArtifactDeployerManager.java
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,30 @@ | ||
package org.jenkinsci.plugins.artifactdeployer.service; | ||
|
||
import hudson.FilePath; | ||
import org.jenkinsci.plugins.artifactdeployer.exception.ArtifactDeployerException; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* @author Gregory Boissinot | ||
*/ | ||
public class ArtifactDeployerManager { | ||
|
||
public FilePath getBasedirFilePath(FilePath ws, String basedirField) { | ||
if (basedirField == null) { | ||
return ws; | ||
} | ||
FilePath basedirFilePath = ws.child(basedirField); | ||
try { | ||
if (!basedirFilePath.exists()) { | ||
throw new ArtifactDeployerException(String.format("The basedir path '%s' from the workspace doesn't exist.", basedirField)); | ||
} | ||
} catch (IOException ioe) { | ||
throw new ArtifactDeployerException(ioe); | ||
} catch (InterruptedException ae) { | ||
throw new ArtifactDeployerException(ae); | ||
} | ||
return basedirFilePath; | ||
} | ||
|
||
} |
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
...esources/org/jenkinsci/plugins/artifactdeployer/ArtifactDeployerBuilder/help-basedir.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,6 @@ | ||
<div> | ||
<p> | ||
By default, the basedir is the job workspace.<br/> | ||
Give a value to override the default value. | ||
</p> | ||
</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
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
...ources/org/jenkinsci/plugins/artifactdeployer/ArtifactDeployerPublisher/help-basedir.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,6 @@ | ||
<div> | ||
<p> | ||
By default, the basedir is the job workspace.<br/> | ||
Give a value to override the default value. | ||
</p> | ||
</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