public class ACSDeploymentContext extends com.microsoft.jenkins.azurecommons.command.BaseCommandContext implements GetContainerServiceInfoCommand.IGetContainerServiceInfoCommandData, EnablePortCommand.IEnablePortCommandData, MarathonDeploymentCommand.IMarathonDeploymentCommandData, KubernetesDeploymentCommandBase.IKubernetesDeploymentCommandData, SwarmDeploymentCommand.ISwarmDeploymentCommandData, DeploymentChoiceCommand.IDeploymentChoiceCommandData, AKSDeploymentCommand.IAKSDeploymentCommandData
Modifier and Type | Class and Description |
---|---|
static class |
ACSDeploymentContext.DescriptorImpl |
Constructor and Description |
---|
ACSDeploymentContext(String azureCredentialsId,
String resourceGroupName,
String containerService,
String sshCredentialsId,
String configFilePaths) |
Modifier and Type | Method and Description |
---|---|
void |
configure(hudson.model.Run<?,?> run,
hudson.FilePath workspace,
hudson.Launcher launcher,
hudson.model.TaskListener listener) |
String |
getAzureCredentialsId() |
String |
getConfigFilePaths() |
List<org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint> |
getContainerRegistryCredentials() |
String |
getContainerService() |
String |
getContainerServiceName()
In order to pass the container service orchestrator type to the front-end, the
containerService field
will be in the following format. |
static String |
getContainerServiceName(String containerService) |
String |
getContainerServiceType() |
com.microsoft.jenkins.azurecommons.command.IBaseCommandData |
getDataForCommand(com.microsoft.jenkins.azurecommons.command.ICommand command) |
String |
getDcosDockerCredentialsPath() |
ACSDeploymentContext.DescriptorImpl |
getDescriptor() |
String |
getMgmtFQDN() |
com.microsoft.azure.management.containerservice.ContainerServiceOrchestratorTypes |
getOrchestratorType()
We use the orchestratorType bound at configuration time.
|
static String |
getOrchestratorType(String containerService) |
String |
getResourceGroupName() |
String |
getSecretName() |
String |
getSecretNamespace() |
com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey |
getSshCredentials() |
String |
getSshCredentialsId() |
boolean |
isDcosDockerCredenditalsPathShared() |
boolean |
isEnableConfigSubstitution() |
boolean |
isSwarmRemoveContainersFirst() |
List<com.microsoft.jenkins.kubernetes.credentials.ResolvedDockerRegistryEndpoint> |
resolvedDockerRegistryEndpoints(hudson.model.Item context) |
void |
setContainerRegistryCredentials(List<org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint> containerRegistryCredentials) |
void |
setDcosDockerCredenditalsPathShared(boolean dcosDockerCredenditalsPathShared) |
void |
setDcosDockerCredentialsPath(String dcosDockerCredentialsPath) |
void |
setEnableConfigSubstitution(boolean enableConfigSubstitution) |
void |
setMgmtFQDN(String fqdn) |
void |
setSecretName(String secretName) |
void |
setSecretNamespace(String secretNamespace) |
void |
setSwarmRemoveContainersFirst(boolean swarmRemoveContainersFirst) |
org.jenkinsci.plugins.workflow.steps.StepExecution |
startImpl(org.jenkinsci.plugins.workflow.steps.StepContext context) |
static String |
validate(String azureCredentialsId,
String resourceGroup,
String containerService,
String sshCredentialsId) |
configure, configure, executeCommands, getCommandService, getCommandState, getEnvVars, getJobContext, getLastCommandState, logError, logError, logError, logStatus, setCommandState, setLastCommandState, start
public org.jenkinsci.plugins.workflow.steps.StepExecution startImpl(org.jenkinsci.plugins.workflow.steps.StepContext context) throws Exception
startImpl
in class com.microsoft.jenkins.azurecommons.command.BaseCommandContext
Exception
public ACSDeploymentContext.DescriptorImpl getDescriptor()
getDescriptor
in interface hudson.model.Describable<org.jenkinsci.plugins.workflow.steps.Step>
getDescriptor
in class org.jenkinsci.plugins.workflow.steps.Step
public String getAzureCredentialsId()
getAzureCredentialsId
in interface AKSDeploymentCommand.IAKSDeploymentCommandData
getAzureCredentialsId
in interface EnablePortCommand.IEnablePortCommandData
getAzureCredentialsId
in interface GetContainerServiceInfoCommand.IGetContainerServiceInfoCommandData
public String getConfigFilePaths()
getConfigFilePaths
in interface EnablePortCommand.IEnablePortCommandData
getConfigFilePaths
in interface KubernetesDeploymentCommandBase.IKubernetesDeploymentCommandData
getConfigFilePaths
in interface MarathonDeploymentCommand.IMarathonDeploymentCommandData
getConfigFilePaths
in interface SwarmDeploymentCommand.ISwarmDeploymentCommandData
public String getSshCredentialsId()
public com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey getSshCredentials()
getSshCredentials
in interface KubernetesDeploymentCommandBase.IKubernetesDeploymentCommandData
getSshCredentials
in interface MarathonDeploymentCommand.IMarathonDeploymentCommandData
getSshCredentials
in interface SwarmDeploymentCommand.ISwarmDeploymentCommandData
public void setMgmtFQDN(String fqdn)
setMgmtFQDN
in interface GetContainerServiceInfoCommand.IGetContainerServiceInfoCommandData
public String getResourceGroupName()
getResourceGroupName
in interface AKSDeploymentCommand.IAKSDeploymentCommandData
getResourceGroupName
in interface EnablePortCommand.IEnablePortCommandData
getResourceGroupName
in interface GetContainerServiceInfoCommand.IGetContainerServiceInfoCommandData
public String getMgmtFQDN()
getMgmtFQDN
in interface KubernetesDeploymentCommandBase.IKubernetesDeploymentCommandData
getMgmtFQDN
in interface MarathonDeploymentCommand.IMarathonDeploymentCommandData
getMgmtFQDN
in interface SwarmDeploymentCommand.ISwarmDeploymentCommandData
public com.microsoft.jenkins.azurecommons.command.IBaseCommandData getDataForCommand(com.microsoft.jenkins.azurecommons.command.ICommand command)
getDataForCommand
in interface com.microsoft.jenkins.azurecommons.command.ICommandServiceData
getDataForCommand
in class com.microsoft.jenkins.azurecommons.command.BaseCommandContext
public com.microsoft.azure.management.containerservice.ContainerServiceOrchestratorTypes getOrchestratorType()
getOrchestratorType
in interface EnablePortCommand.IEnablePortCommandData
getOrchestratorType
in interface GetContainerServiceInfoCommand.IGetContainerServiceInfoCommandData
getOrchestratorType
in interface KubernetesDeploymentCommandBase.IKubernetesDeploymentCommandData
getOrchestratorType
in interface MarathonDeploymentCommand.IMarathonDeploymentCommandData
getOrchestratorType
in interface SwarmDeploymentCommand.ISwarmDeploymentCommandData
public String getContainerServiceType()
getContainerServiceType
in interface DeploymentChoiceCommand.IDeploymentChoiceCommandData
getContainerServiceType
in interface GetContainerServiceInfoCommand.IGetContainerServiceInfoCommandData
getContainerServiceType
in interface KubernetesDeploymentCommandBase.IKubernetesDeploymentCommandData
public String getContainerService()
public String getContainerServiceName()
containerService
field
will be in the following format. This will be stored into the configuration. At runtime, we need to extract
the container service name in order to pass it to the Azure service.
container_service_name|orchestrator_type
getContainerServiceName
in interface GetContainerServiceInfoCommand.IGetContainerServiceInfoCommandData
getContainerServiceName
in interface KubernetesDeploymentCommandBase.IKubernetesDeploymentCommandData
getContainerService()
public String getSecretNamespace()
getSecretNamespace
in interface KubernetesDeploymentCommandBase.IKubernetesDeploymentCommandData
@DataBoundSetter public void setSecretNamespace(String secretNamespace)
public boolean isSwarmRemoveContainersFirst()
isSwarmRemoveContainersFirst
in interface SwarmDeploymentCommand.ISwarmDeploymentCommandData
@DataBoundSetter public void setSwarmRemoveContainersFirst(boolean swarmRemoveContainersFirst)
public boolean isEnableConfigSubstitution()
isEnableConfigSubstitution
in interface KubernetesDeploymentCommandBase.IKubernetesDeploymentCommandData
isEnableConfigSubstitution
in interface MarathonDeploymentCommand.IMarathonDeploymentCommandData
isEnableConfigSubstitution
in interface SwarmDeploymentCommand.ISwarmDeploymentCommandData
@DataBoundSetter public void setEnableConfigSubstitution(boolean enableConfigSubstitution)
public String getSecretName()
getSecretName
in interface KubernetesDeploymentCommandBase.IKubernetesDeploymentCommandData
@DataBoundSetter public void setSecretName(String secretName)
public String getDcosDockerCredentialsPath()
getDcosDockerCredentialsPath
in interface MarathonDeploymentCommand.IMarathonDeploymentCommandData
@DataBoundSetter public void setDcosDockerCredentialsPath(String dcosDockerCredentialsPath)
public boolean isDcosDockerCredenditalsPathShared()
isDcosDockerCredenditalsPathShared
in interface MarathonDeploymentCommand.IMarathonDeploymentCommandData
@DataBoundSetter public void setDcosDockerCredenditalsPathShared(boolean dcosDockerCredenditalsPathShared)
public List<org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint> getContainerRegistryCredentials()
@DataBoundSetter public void setContainerRegistryCredentials(List<org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint> containerRegistryCredentials)
public List<com.microsoft.jenkins.kubernetes.credentials.ResolvedDockerRegistryEndpoint> resolvedDockerRegistryEndpoints(hudson.model.Item context) throws IOException
resolvedDockerRegistryEndpoints
in interface KubernetesDeploymentCommandBase.IKubernetesDeploymentCommandData
resolvedDockerRegistryEndpoints
in interface MarathonDeploymentCommand.IMarathonDeploymentCommandData
resolvedDockerRegistryEndpoints
in interface SwarmDeploymentCommand.ISwarmDeploymentCommandData
IOException
public void configure(@Nonnull hudson.model.Run<?,?> run, @Nonnull hudson.FilePath workspace, @Nonnull hudson.Launcher launcher, @Nonnull hudson.model.TaskListener listener) throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2016–2021. All rights reserved.