Skip to content

Commit dbf8d1b

Browse files
amikryukovdlatnikov
authored andcommitted
JFG-845 Add stack trace logging for errors (#37)
* + add stackTrace to log on exception + add quotes to script file while chmod command * revert error message back
1 parent dcbbb79 commit dbf8d1b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/com/griddynamics/jagger/jenkins/plugin/JaggerEasyDeployPlugin.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -728,8 +728,9 @@ public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListen
728728
}
729729
} catch (Exception e) {
730730

731-
logger.println("!!!" + getLineSeparator() + "Exception in perform " + e +
732-
"can't create script file or run script");
731+
logger.println("!!!" + getLineSeparator() + "Exception in perform(): " + e +
732+
"\nCan't create script file or run script");
733+
e.printStackTrace(logger);
733734
try {
734735
pathToDeploymentScript.delete();
735736
logger.println(pathToDeploymentScript + " has been deleted");
@@ -763,7 +764,7 @@ private void createScriptFile(FilePath file) throws Exception {
763764
}
764765

765766
//setting permissions for executing
766-
procStarter.cmds(stringToCmds("chmod +x " + file)).start();
767+
procStarter.cmds(stringToCmds("chmod +x '" + file + "'")).start();
767768
}
768769

769770

0 commit comments

Comments
 (0)