hudson.plugins.sauce_ondemand
Class SauceOnDemandBuildWrapper

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<hudson.tasks.BuildWrapper>
      extended by hudson.tasks.BuildWrapper
          extended by hudson.plugins.sauce_ondemand.SauceOnDemandBuildWrapper
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.BuildWrapper>, Serializable

public class SauceOnDemandBuildWrapper
extends hudson.tasks.BuildWrapper
implements Serializable

BuildWrapper that sets up the Sauce OnDemand SSH tunnel.

Author:
Kohsuke Kawaguchi
See Also:
Serialized Form

Nested Class Summary
static class SauceOnDemandBuildWrapper.DescriptorImpl
           
 class SauceOnDemandBuildWrapper.SauceOnDemandLogParser
           
 
Nested classes/interfaces inherited from class hudson.tasks.BuildWrapper
hudson.tasks.BuildWrapper.Environment
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static Pattern ENVIRONMENT_VARIABLE_PATTERN
           
static String SAUCE_ONDEMAND_BROWSERS
           
static String SELENIUM_BROWSER
           
static String SELENIUM_DRIVER
           
static String SELENIUM_HOST
           
static String SELENIUM_PLATFORM
           
static String SELENIUM_PORT
           
static String SELENIUM_STARTING_URL
           
static String SELENIUM_VERSION
           
 
Constructor Summary
SauceOnDemandBuildWrapper(Credentials credentials, SeleniumInformation seleniumInformation, String seleniumHost, String seleniumPort, String httpsProtocol, String options, String startingURL, boolean enableSauceConnect, boolean launchSauceConnectOnSlave)
           
 
Method Summary
 OutputStream decorateLogger(hudson.model.AbstractBuild build, OutputStream logger)
           
 String getApiKey()
           
 Credentials getCredentials()
           
 String getHttpsProtocol()
           
 String getOptions()
           
 List<String> getSeleniumBrowsers()
           
 String getSeleniumHost()
           
 SeleniumInformation getSeleniumInformation()
           
 String getSeleniumPort()
           
 String getStartingURL()
           
 String getUserName()
           
 List<String> getWebDriverBrowsers()
           
 boolean isEnableSauceConnect()
           
 boolean isLaunchSauceConnectOnSlave()
           
static String sanitiseBuildNumber(String buildNumber)
          Replace all spaces and hashes with underscores.
 void setCredentials(Credentials credentials)
           
 void setEnableSauceConnect(boolean enableSauceConnect)
           
 void setHttpsProtocol(String httpsProtocol)
           
 void setLaunchSauceConnectOnSlave(boolean launchSauceConnectOnSlave)
           
 void setOptions(String options)
           
 void setSeleniumBrowsers(List<String> seleniumBrowsers)
           
 void setSeleniumHost(String seleniumHost)
           
 void setSeleniumInformation(SeleniumInformation seleniumInformation)
           
 void setSeleniumPort(String seleniumPort)
           
 hudson.tasks.BuildWrapper.Environment setUp(hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.model.BuildListener listener)
           
 void setWebDriverBrowsers(List<String> webDriverBrowsers)
           
 
Methods inherited from class hudson.tasks.BuildWrapper
all, decorateLauncher, getProjectAction, getProjectActions, makeBuildVariables, makeSensitiveBuildVariables, preCheckout, setUp
 
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELENIUM_DRIVER

public static final String SELENIUM_DRIVER
See Also:
Constant Field Values

SAUCE_ONDEMAND_BROWSERS

public static final String SAUCE_ONDEMAND_BROWSERS
See Also:
Constant Field Values

SELENIUM_HOST

public static final String SELENIUM_HOST
See Also:
Constant Field Values

SELENIUM_PORT

public static final String SELENIUM_PORT
See Also:
Constant Field Values

SELENIUM_STARTING_URL

public static final String SELENIUM_STARTING_URL
See Also:
Constant Field Values

ENVIRONMENT_VARIABLE_PATTERN

public static final Pattern ENVIRONMENT_VARIABLE_PATTERN

SELENIUM_BROWSER

public static final String SELENIUM_BROWSER
See Also:
Constant Field Values

SELENIUM_PLATFORM

public static final String SELENIUM_PLATFORM
See Also:
Constant Field Values

SELENIUM_VERSION

public static final String SELENIUM_VERSION
See Also:
Constant Field Values
Constructor Detail

SauceOnDemandBuildWrapper

@DataBoundConstructor
public SauceOnDemandBuildWrapper(Credentials credentials,
                                                      SeleniumInformation seleniumInformation,
                                                      String seleniumHost,
                                                      String seleniumPort,
                                                      String httpsProtocol,
                                                      String options,
                                                      String startingURL,
                                                      boolean enableSauceConnect,
                                                      boolean launchSauceConnectOnSlave)
Method Detail

setUp

public hudson.tasks.BuildWrapper.Environment setUp(hudson.model.AbstractBuild build,
                                                   hudson.Launcher launcher,
                                                   hudson.model.BuildListener listener)
                                            throws IOException,
                                                   InterruptedException
Overrides:
setUp in class hudson.tasks.BuildWrapper
Throws:
IOException
InterruptedException

sanitiseBuildNumber

public static String sanitiseBuildNumber(String buildNumber)
Replace all spaces and hashes with underscores.

Parameters:
buildNumber -
Returns:

getUserName

public String getUserName()

getApiKey

public String getApiKey()

getSeleniumHost

public String getSeleniumHost()

setSeleniumHost

public void setSeleniumHost(String seleniumHost)

getSeleniumPort

public String getSeleniumPort()

setSeleniumPort

public void setSeleniumPort(String seleniumPort)

getCredentials

public Credentials getCredentials()

setCredentials

public void setCredentials(Credentials credentials)

getSeleniumInformation

public SeleniumInformation getSeleniumInformation()

setSeleniumInformation

public void setSeleniumInformation(SeleniumInformation seleniumInformation)

isEnableSauceConnect

public boolean isEnableSauceConnect()

setEnableSauceConnect

public void setEnableSauceConnect(boolean enableSauceConnect)

getSeleniumBrowsers

public List<String> getSeleniumBrowsers()

setSeleniumBrowsers

public void setSeleniumBrowsers(List<String> seleniumBrowsers)

getWebDriverBrowsers

public List<String> getWebDriverBrowsers()

setWebDriverBrowsers

public void setWebDriverBrowsers(List<String> webDriverBrowsers)

isLaunchSauceConnectOnSlave

public boolean isLaunchSauceConnectOnSlave()

setLaunchSauceConnectOnSlave

public void setLaunchSauceConnectOnSlave(boolean launchSauceConnectOnSlave)

getHttpsProtocol

public String getHttpsProtocol()

setHttpsProtocol

public void setHttpsProtocol(String httpsProtocol)

getOptions

public String getOptions()

setOptions

public void setOptions(String options)

getStartingURL

public String getStartingURL()

decorateLogger

public OutputStream decorateLogger(hudson.model.AbstractBuild build,
                                   OutputStream logger)
                            throws IOException,
                                   InterruptedException,
                                   hudson.model.Run.RunnerAbortedException
Overrides:
decorateLogger in class hudson.tasks.BuildWrapper
Throws:
IOException
InterruptedException
hudson.model.Run.RunnerAbortedException


Copyright © 2004-2013. All Rights Reserved.