Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features/fitnesse plugin fix fitnesse server start #12

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions src/main/java/hudson/plugins/fitnesse/FitnesseBuilder.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package hudson.plugins.fitnesse;

import hudson.EnvVars;
import hudson.Extension;
import hudson.Launcher;
import hudson.Util;
import hudson.model.BuildListener;
import hudson.model.ModelObject;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.model.BuildListener;
import hudson.model.Descriptor;
import hudson.model.ModelObject;
import hudson.slaves.EnvironmentVariablesNodeProperty;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.Builder;
import hudson.util.FormValidation;
import hudson.EnvVars;

import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -110,16 +110,16 @@ public String getFitnesseHost(EnvVars environment) {
}
}

public String getFitnesseHost(AbstractBuild<?,?> build, EnvVars environment) throws InterruptedException, IOException {
public String getFitnesseHost(AbstractBuild<?, ?> build, EnvVars environment) {
if (getFitnesseStart()){
EnvironmentVariablesNodeProperty prop = build.getBuiltOn().getNodeProperties().get(EnvironmentVariablesNodeProperty.class);
if (prop!=null && prop.getEnvVars()!=null && prop.getEnvVars().get(_HOSTNAME_SLAVE_PROPERTY)!=null){
return prop.getEnvVars().get(_HOSTNAME_SLAVE_PROPERTY);
} else {
return _LOCALHOST;
}
if (prop != null && prop.getEnvVars() != null && prop.getEnvVars().get(_HOSTNAME_SLAVE_PROPERTY) != null) {
return prop.getEnvVars().get(_HOSTNAME_SLAVE_PROPERTY);
} else {
return _LOCALHOST;
}
} else return getOption(FITNESSE_HOST, "unknown_host", environment);
}
}

/**
* referenced in config.jelly
Expand Down Expand Up @@ -264,10 +264,10 @@ public int getFitnesseTestTimeout(EnvVars environment) {
@Override
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener)
throws IOException, InterruptedException {
PrintStream logger = listener.getLogger();
PrintStream logger = listener.getLogger();
logger.println(getClass().getName() + ": " + options);
FitnesseExecutor fitnesseExecutor = new FitnesseExecutor(this);
return fitnesseExecutor.execute(build, launcher, logger, build.getEnvironment(listener));
FitnesseExecutor fitnesseExecutor = new FitnesseExecutor(this, logger);
return fitnesseExecutor.execute(build, launcher, build.getEnvironment(listener));
}

/**
Expand Down
Loading