Package com.nirima.jenkins.plugins.docker.builder

Source Code of com.nirima.jenkins.plugins.docker.builder.DockerBuilderControlOptionStart

package com.nirima.jenkins.plugins.docker.builder;

import com.nirima.docker.client.DockerClient;
import com.nirima.docker.client.DockerException;
import hudson.Extension;
import hudson.model.AbstractBuild;
import org.kohsuke.stapler.DataBoundConstructor;

/**
* Created by magnayn on 30/01/2014.
*/
public class DockerBuilderControlOptionStart extends DockerBuilderControlOptionStopStart {

    @DataBoundConstructor
    public DockerBuilderControlOptionStart(String cloudId, String containerId) {
        super(cloudId, containerId);
    }

    @Override
    public void execute(AbstractBuild<?, ?> build) throws DockerException {

        LOGGER.info("Starting container " + containerId);
        DockerClient client = getClient(build);
        client.container(containerId).start();
        getLaunchAction(build).started(client, containerId);

    }

    @Extension
    public static final class DescriptorImpl extends DockerBuilderControlOptionDescriptor {
        @Override
        public String getDisplayName() {
            return "Start Container";
        }

    }
}
TOP

Related Classes of com.nirima.jenkins.plugins.docker.builder.DockerBuilderControlOptionStart

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.
ndardCredentials.html" title="Examples of com.cloudbees.plugins.credentials.common.StandardCredentials">com.cloudbees.plugins.credentials.common.StandardCredentials
  • com.cloudbees.plugins.credentials.common.StandardListBoxModel
  • com.cloudbees.plugins.credentials.domains.SchemeRequirement
  • com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl
  • com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl
  • com.nirima.docker.client.DockerClient
  • com.sonyericsson.hudson.plugins.gerrit.trigger.config.ReplicationConfig
  • TOP
    Copyright © 2018 www.massapi.com. All rights reserved.
    All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.