Permalink
Browse files

Fixed wrong command building

  • Loading branch information...
1 parent 32624f8 commit b854e7f99e43147bb260daf6ac6a486ce56ee432 @vjuranek committed Mar 21, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 src/main/java/builder/smartfrog/SmartFrogBuilder.java
@@ -243,6 +243,7 @@ private boolean prepareScript(AbstractBuild<?, ?> build) throws InterruptedExcep
}
private String exportMatrixAxes(AbstractBuild<?, ?> build) {
+ //TODO String builder
String exportedMatrixAxes = " ";
MatrixConfiguration matrix = (MatrixConfiguration) build.getProject();
Combination combinations = matrix.getCombination();
@@ -307,7 +308,7 @@ private synchronized boolean daemonsReady(SmartFrogAction[] sfActions) {
}
private boolean deployTerminateHook(AbstractBuild<?, ?> build, Launcher launcher) {
- String[] deploySLCl = buildDeployCommandLine(deployHost, sfInstance.getSupportScriptPath(), "terminate-hook");
+ String[] deploySLCl = buildDeployCommandLine(deployHost, sfInstance.getSupportScriptPath(), "terminate-hook", Functions.convertWsToCanonicalPath(build.getWorkspace()));
try {
int status = launcher.launch().cmds(deploySLCl).envs(build.getEnvironment(console.getListener())).stdout(console.getListener()).pwd(build.getWorkspace()).join();
if (status != 0) {
@@ -324,7 +325,8 @@ private boolean deployTerminateHook(AbstractBuild<?, ?> build, Launcher launcher
}
private boolean deployScript(AbstractBuild<?, ?> build, Launcher launcher) {
- String[] deployCl = buildDeployCommandLine(deployHost, sfScriptSource.getScriptName(),
+ String defaultScriptPath = sfScriptSource != null ? sfScriptSource.getDefaultScriptPath() : "";
+ String[] deployCl = buildDeployCommandLine(deployHost, defaultScriptPath, sfScriptSource.getScriptName(),
Functions.convertWsToCanonicalPath(build.getWorkspace()));
try {
int status = launcher.launch().cmds(deployCl).envs(build.getEnvironment(console.getListener())).stdout(console.getListener()).pwd(build.getWorkspace()).join();
@@ -376,10 +378,9 @@ private void failBuild(AbstractBuild<?, ?> build, SmartFrogAction[] sfActions) {
sfUserHome };
}
- protected String[] buildDeployCommandLine(String host, String componentName, String workspace) {
- String defaultScriptPath = sfScriptSource != null ? sfScriptSource.getDefaultScriptPath() : "";
+ protected String[] buildDeployCommandLine(String host, String scriptPath, String componentName, String workspace) {
return new String[] { "bash", "-xe", sfInstance.getSupport() + "/deploySF.sh", host, sfInstance.getPath(),
- sfUserHome, sfInstance.getSupport(), sfUserHome2, sfUserHome3, sfUserHome4, defaultScriptPath,
+ sfUserHome, sfInstance.getSupport(), sfUserHome2, sfUserHome3, sfUserHome4, scriptPath, //sfInstance.getSupportScriptPath(),
componentName, workspace, exportMatrixAxes };
}

0 comments on commit b854e7f

Please sign in to comment.