当前位置: 首页>>代码示例>>Java>>正文


Java ComputerLauncher类代码示例

本文整理汇总了Java中hudson.slaves.ComputerLauncher的典型用法代码示例。如果您正苦于以下问题:Java ComputerLauncher类的具体用法?Java ComputerLauncher怎么用?Java ComputerLauncher使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ComputerLauncher类属于hudson.slaves包,在下文中一共展示了ComputerLauncher类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: DockerSlave

import hudson.slaves.ComputerLauncher; //导入依赖的package包/类
public DockerSlave(String slaveName, String nodeDescription, ComputerLauncher launcher, String containerId,
                   DockerSlaveTemplate dockerSlaveTemplate, String cloudId, ProvisioningActivity.Id provisioningId)
        throws IOException, Descriptor.FormException {
    super(slaveName,
            nodeDescription, //description
            dockerSlaveTemplate.getRemoteFs(),
            dockerSlaveTemplate.getNumExecutors(),
            dockerSlaveTemplate.getMode(),
            dockerSlaveTemplate.getLabelString(),
            launcher,
            dockerSlaveTemplate.getRetentionStrategyCopy(),
            dockerSlaveTemplate.getNodeProperties()
    );
    this.displayName = slaveName; // initial value
    this.containerId = containerId;
    this.cloudId = cloudId;
    setDockerSlaveTemplate(dockerSlaveTemplate);
    this.provisioningId = provisioningId;
}
 
开发者ID:KostyaSha,项目名称:yet-another-docker-plugin,代码行数:20,代码来源:DockerSlave.java

示例2: EC2AbstractSlave

import hudson.slaves.ComputerLauncher; //导入依赖的package包/类
@DataBoundConstructor
public EC2AbstractSlave(String name, String instanceId, String description, String remoteFS, int numExecutors, Mode mode, String labelString, ComputerLauncher launcher, RetentionStrategy<EC2Computer> retentionStrategy, String initScript, String tmpDir, List<? extends NodeProperty<?>> nodeProperties, String remoteAdmin, String jvmopts, boolean stopOnTerminate, String idleTerminationMinutes, List<EC2Tag> tags, String cloudName, boolean usePrivateDnsName, boolean useDedicatedTenancy, int launchTimeout, AMITypeData amiType) throws FormException, IOException {

    super(name, "", remoteFS, numExecutors, mode, labelString, launcher, retentionStrategy, nodeProperties);

    this.instanceId = instanceId;
    this.initScript = initScript;
    this.tmpDir = tmpDir;
    this.remoteAdmin = remoteAdmin;
    this.jvmopts = jvmopts;
    this.stopOnTerminate = stopOnTerminate;
    this.idleTerminationMinutes = idleTerminationMinutes;
    this.tags = tags;
    this.usePrivateDnsName = usePrivateDnsName;
    this.useDedicatedTenancy = useDedicatedTenancy;
    this.cloudName = cloudName;
    this.launchTimeout = launchTimeout;
    this.amiType = amiType;
    readResolve();
}
 
开发者ID:hudson3-plugins,项目名称:ec2-plugin,代码行数:21,代码来源:EC2AbstractSlave.java

示例3: OVirtVMSlave

import hudson.slaves.ComputerLauncher; //导入依赖的package包/类
/**
 * The constructor for OVIrtVMSlave. Even though it has tons of parameters,
 * it's Jenkins' responsibility to fill those in. This object is used to
 * represent a node creating using the ovirt cloud.
 *
 * @param name name of the node
 * @param nodeDescription node description
 * @param remoteFS the filesystem used
 * @param numExecutors how many executors to run with
 * @param mode mode?
 * @param labelString the labels associated with this node
 * @param delegateLauncher the launcher used to launch that node
 * @param retentionStrategy retention strategy
 * @param hypervisorDescription the hypervisor description
 * @param snapshotName the snapshot used
 * @param waitSec how many seconds to wait before retrying
 * @param retries how many retries to do
 * @param virtualMachineName the name of the ovirt vm
 * @param nodeProperties the node properties
 *
 * @throws Descriptor.FormException FormException
 * @throws IOException IOException
 */
@DataBoundConstructor
public OVirtVMSlave(String name, String nodeDescription, String remoteFS,
                    String numExecutors, Mode mode, String labelString,
                    ComputerLauncher delegateLauncher,
                    RetentionStrategy retentionStrategy,
                    String hypervisorDescription, String snapshotName,
                    int waitSec, int retries,
                    String virtualMachineName,
                    List<? extends NodeProperty<?>> nodeProperties)
            throws Descriptor.FormException, IOException {
    super(name, nodeDescription, remoteFS, numExecutors, mode, labelString,
          new OVirtVMLauncher(delegateLauncher, hypervisorDescription,
                              virtualMachineName, snapshotName,
                              waitSec, retries),
          retentionStrategy,
          nodeProperties);

    this.hypervisorDescription = hypervisorDescription;
    this.snapshotName = snapshotName;
    this.virtualMachineName = virtualMachineName;
    this.waitSec = waitSec;
    this.retries = retries;
    this.delegateLauncher = delegateLauncher;
}
 
开发者ID:thescouser89,项目名称:ovirt-slaves-plugin,代码行数:48,代码来源:OVirtVMSlave.java

示例4: createLauncher

import hudson.slaves.ComputerLauncher; //导入依赖的package包/类
@Override
protected ComputerLauncher createLauncher(DockerAPI api, String workdir, InspectContainerResponse inspect, TaskListener listener) throws IOException, InterruptedException {
    if ("exited".equals(inspect.getState().getStatus())) {
        // Something went wrong
        // FIXME report error "somewhere" visible to end user.
        LOGGER.error("Failed to launch docker SSH agent :" + inspect.getState().getExitCode());
        throw new IOException("Failed to launch docker SSH agent. Container exited with status " + inspect.getState().getExitCode());
    }
    LOGGER.debug("container created {}", inspect);

    final InetSocketAddress address = getBindingForPort(api, inspect, port);

    // Wait until sshd has started
    // TODO we could (also) have a more generic mechanism relying on healthcheck (inspect State.Health.Status)
    final PortUtils.ConnectionCheck connectionCheck =
            PortUtils.connectionCheck( address )
                    .withRetries( 30 )
                    .withEveryRetryWaitFor( 2, TimeUnit.SECONDS );
    if (!connectionCheck.execute() || !connectionCheck.useSSH().execute()) {
        throw new IOException("SSH service didn't started after 60s.");
    }

    return sshKeyStrategy.getSSHLauncher(address, this);
}
 
开发者ID:jenkinsci,项目名称:docker-plugin,代码行数:25,代码来源:DockerComputerSSHConnector.java

示例5: VirtualMachineSlave

import hudson.slaves.ComputerLauncher; //导入依赖的package包/类
@DataBoundConstructor
public VirtualMachineSlave(String name, String nodeDescription, String remoteFS, String numExecutors,
                           Mode mode, String labelString, ComputerLauncher delegateLauncher,
                           RetentionStrategy retentionStrategy, List<? extends NodeProperty<?>> nodeProperties,
                           String datacenterDescription, String datacenterNode, Integer virtualMachineId,
                           String snapshotName, Boolean startVM, int startupWaitingPeriodSeconds)
        throws
        Descriptor.FormException, IOException {
    super(name, nodeDescription, remoteFS, numExecutors, mode, labelString,
            new VirtualMachineLauncher(delegateLauncher, datacenterDescription, datacenterNode, virtualMachineId,
                    snapshotName, startVM, startupWaitingPeriodSeconds),
            retentionStrategy, nodeProperties);
    this.datacenterDescription = datacenterDescription;
    this.datacenterNode = datacenterNode;
    this.virtualMachineId = virtualMachineId;
    this.snapshotName = snapshotName;
    this.startVM = startVM;
    this.startupWaitingPeriodSeconds = startupWaitingPeriodSeconds;
}
 
开发者ID:justnom,项目名称:proxmox-plugin,代码行数:20,代码来源:VirtualMachineSlave.java

示例6: terminate

import hudson.slaves.ComputerLauncher; //导入依赖的package包/类
public void terminate() {
  LOGGER.info("Terminating slave " + getNodeName());
  try {
    // Remove the node from hudson.
    Hudson.getInstance().removeNode(this);

    ComputerLauncher launcher = getLauncher();

    // If this is a mesos computer launcher, terminate the launcher.
    if (launcher instanceof MesosComputerLauncher) {
      ((MesosComputerLauncher) launcher).terminate();
    }
  } catch (IOException e) {
    LOGGER.log(Level.WARNING, "Failed to terminate Mesos instance: "
        + getInstanceId(), e);
  }
}
 
开发者ID:jenkinsci,项目名称:mesos-plugin,代码行数:18,代码来源:MesosSlave.java

示例7: ParallelsDesktopVM

import hudson.slaves.ComputerLauncher; //导入依赖的package包/类
@DataBoundConstructor
public ParallelsDesktopVM(String vmid, String labels, String remoteFS, ComputerLauncher launcher)
{
	this.vmid = vmid;
	this.labels = labels;
	this.remoteFS = remoteFS;
	this.launcher = launcher;
}
 
开发者ID:Parallels,项目名称:jenkins-parallels,代码行数:9,代码来源:ParallelsDesktopVM.java

示例8: ParallelsDesktopConnectorSlave

import hudson.slaves.ComputerLauncher; //导入依赖的package包/类
@DataBoundConstructor
public ParallelsDesktopConnectorSlave(ParallelsDesktopCloud owner, String name, String remoteFS, 
		ComputerLauncher launcher, boolean useAsBuilder)
		throws IOException, Descriptor.FormException
{
	super(name, "", remoteFS, 1, Mode.NORMAL, "", launcher,
			useAsBuilder ? new RetentionStrategy.Always() : new RetentionStrategy.Demand(1, 1),
			new ArrayList<NodeProperty<?>>());
	this.owner = owner;
	this.useAsBuilder = useAsBuilder;
}
 
开发者ID:Parallels,项目名称:jenkins-parallels,代码行数:12,代码来源:ParallelsDesktopConnectorSlave.java

示例9: ParallelsDesktopCloud

import hudson.slaves.ComputerLauncher; //导入依赖的package包/类
@DataBoundConstructor
public ParallelsDesktopCloud(String name, String remoteFS, ComputerLauncher pdLauncher,
		boolean useConnectorAsBuilder, List<ParallelsDesktopVM> vms)
{
	super(name);
	this.remoteFS = remoteFS;
	if (vms == null)
		this.vms = Collections.emptyList();
	else
		this.vms = vms;
	this.pdLauncher = pdLauncher;
	this.useConnectorAsBuilder = useConnectorAsBuilder;
}
 
开发者ID:Parallels,项目名称:jenkins-parallels,代码行数:14,代码来源:ParallelsDesktopCloud.java

示例10: getDockerComputerLauncherDescriptors

import hudson.slaves.ComputerLauncher; //导入依赖的package包/类
/**
 * Only this plugin specific launchers.
 */
public static List<Descriptor<ComputerLauncher>> getDockerComputerLauncherDescriptors() {
    List<Descriptor<ComputerLauncher>> launchers = new ArrayList<>();

    launchers.add(getInstance().getDescriptor(DockerComputerSSHLauncher.class));
    launchers.add(getInstance().getDescriptor(DockerComputerJNLPLauncher.class));
    launchers.add(getInstance().getDescriptor(DockerComputerIOLauncher.class));

    return launchers;
}
 
开发者ID:KostyaSha,项目名称:yet-another-docker-plugin,代码行数:13,代码来源:DockerFunctions.java

示例11: OVirtVMLauncher

import hudson.slaves.ComputerLauncher; //导入依赖的package包/类
@DataBoundConstructor
public OVirtVMLauncher(ComputerLauncher delegateLauncher,
                       String hypervisorDescription, String virtualMachineName,
                       String snapshotName, int waitingTimeSecs, int retries) {
    super();
    this.delegateLauncher = delegateLauncher;
    this.hypervisorDescription = hypervisorDescription;
    this.virtualMachineName = virtualMachineName;
    this.snapshotName = snapshotName;
    this.WAITING_TIME_MILLISECS = secToMilliseconds(waitingTimeSecs);
    this.retries = retries;
}
 
开发者ID:thescouser89,项目名称:ovirt-slaves-plugin,代码行数:13,代码来源:OVirtVMLauncher.java

示例12: RavelloSlave

import hudson.slaves.ComputerLauncher; //导入依赖的package包/类
@DataBoundConstructor
public RavelloSlave(ComputerLauncher delegate, String name, String nodeDescription, String remoteFS,
		int numExecutors, String labelString, RetentionStrategy retentionStrategy)
		throws FormException, IOException {
	super(name, nodeDescription, remoteFS, numExecutors, Mode.EXCLUSIVE, labelString,
			new RavelloLauncher(delegate), retentionStrategy);
}
 
开发者ID:ravello,项目名称:ravello-jenkins-plugin,代码行数:8,代码来源:RavelloSlave.java

示例13: getSSHLauncher

import hudson.slaves.ComputerLauncher; //导入依赖的package包/类
@Override
public ComputerLauncher getSSHLauncher(InetSocketAddress address, DockerComputerSSHConnector connector) throws IOException {
    InstanceIdentity id = InstanceIdentity.get();
    String pem = PEMEncodable.create(id.getPrivate()).encode();

    return new DockerSSHLauncher(address.getHostString(), address.getPort(), user, pem,
            connector.jvmOptions, connector.javaPath, connector.prefixStartSlaveCmd, connector.suffixStartSlaveCmd,
            connector.launchTimeoutSeconds, connector.maxNumRetries, connector.retryWaitTime,
            new NonVerifyingKeyVerificationStrategy()
    );
}
 
开发者ID:jenkinsci,项目名称:docker-plugin,代码行数:12,代码来源:DockerComputerSSHConnector.java

示例14: DockerTransientNode

import hudson.slaves.ComputerLauncher; //导入依赖的package包/类
public DockerTransientNode(@Nonnull String uid, String containerId, String workdir, ComputerLauncher launcher) throws Descriptor.FormException, IOException {
    super(nodeName(uid), workdir, launcher);
    this.containerName = uid;
    this.containerId = containerId;
    setNumExecutors(1);
    setMode(Mode.EXCLUSIVE);
    setRetentionStrategy(new DockerOnceRetentionStrategy(10));
}
 
开发者ID:jenkinsci,项目名称:docker-plugin,代码行数:9,代码来源:DockerTransientNode.java

示例15: VirtualMachineLauncher

import hudson.slaves.ComputerLauncher; //导入依赖的package包/类
@DataBoundConstructor
public VirtualMachineLauncher(ComputerLauncher delegate, String datacenterDescription, String datacenterNode,
                              Integer virtualMachineId, String snapshotName, Boolean startVM, int waitingTimeSecs) {
    super();
    this.delegate = delegate;
    this.datacenterDescription = datacenterDescription;
    this.datacenterNode = datacenterNode;
    this.virtualMachineId = virtualMachineId;
    this.snapshotName = snapshotName;
    this.startVM = startVM;
    this.WAIT_TIME_MS = waitingTimeSecs*1000;
}
 
开发者ID:justnom,项目名称:proxmox-plugin,代码行数:13,代码来源:VirtualMachineLauncher.java


注:本文中的hudson.slaves.ComputerLauncher类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。