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, startpublic org.jenkinsci.plugins.workflow.steps.StepExecution startImpl(org.jenkinsci.plugins.workflow.steps.StepContext context)
throws Exception
startImpl in class com.microsoft.jenkins.azurecommons.command.BaseCommandContextExceptionpublic ACSDeploymentContext.DescriptorImpl getDescriptor()
getDescriptor in interface hudson.model.Describable<org.jenkinsci.plugins.workflow.steps.Step>getDescriptor in class org.jenkinsci.plugins.workflow.steps.Steppublic String getAzureCredentialsId()
getAzureCredentialsId in interface AKSDeploymentCommand.IAKSDeploymentCommandDatagetAzureCredentialsId in interface EnablePortCommand.IEnablePortCommandDatagetAzureCredentialsId in interface GetContainerServiceInfoCommand.IGetContainerServiceInfoCommandDatapublic String getConfigFilePaths()
getConfigFilePaths in interface EnablePortCommand.IEnablePortCommandDatagetConfigFilePaths in interface KubernetesDeploymentCommandBase.IKubernetesDeploymentCommandDatagetConfigFilePaths in interface MarathonDeploymentCommand.IMarathonDeploymentCommandDatagetConfigFilePaths in interface SwarmDeploymentCommand.ISwarmDeploymentCommandDatapublic String getSshCredentialsId()
public com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey getSshCredentials()
getSshCredentials in interface KubernetesDeploymentCommandBase.IKubernetesDeploymentCommandDatagetSshCredentials in interface MarathonDeploymentCommand.IMarathonDeploymentCommandDatagetSshCredentials in interface SwarmDeploymentCommand.ISwarmDeploymentCommandDatapublic void setMgmtFQDN(String fqdn)
setMgmtFQDN in interface GetContainerServiceInfoCommand.IGetContainerServiceInfoCommandDatapublic String getResourceGroupName()
getResourceGroupName in interface AKSDeploymentCommand.IAKSDeploymentCommandDatagetResourceGroupName in interface EnablePortCommand.IEnablePortCommandDatagetResourceGroupName in interface GetContainerServiceInfoCommand.IGetContainerServiceInfoCommandDatapublic String getMgmtFQDN()
getMgmtFQDN in interface KubernetesDeploymentCommandBase.IKubernetesDeploymentCommandDatagetMgmtFQDN in interface MarathonDeploymentCommand.IMarathonDeploymentCommandDatagetMgmtFQDN in interface SwarmDeploymentCommand.ISwarmDeploymentCommandDatapublic com.microsoft.jenkins.azurecommons.command.IBaseCommandData getDataForCommand(com.microsoft.jenkins.azurecommons.command.ICommand command)
getDataForCommand in interface com.microsoft.jenkins.azurecommons.command.ICommandServiceDatagetDataForCommand in class com.microsoft.jenkins.azurecommons.command.BaseCommandContextpublic com.microsoft.azure.management.containerservice.ContainerServiceOrchestratorTypes getOrchestratorType()
getOrchestratorType in interface EnablePortCommand.IEnablePortCommandDatagetOrchestratorType in interface GetContainerServiceInfoCommand.IGetContainerServiceInfoCommandDatagetOrchestratorType in interface KubernetesDeploymentCommandBase.IKubernetesDeploymentCommandDatagetOrchestratorType in interface MarathonDeploymentCommand.IMarathonDeploymentCommandDatagetOrchestratorType in interface SwarmDeploymentCommand.ISwarmDeploymentCommandDatapublic String getContainerServiceType()
getContainerServiceType in interface DeploymentChoiceCommand.IDeploymentChoiceCommandDatagetContainerServiceType in interface GetContainerServiceInfoCommand.IGetContainerServiceInfoCommandDatagetContainerServiceType in interface KubernetesDeploymentCommandBase.IKubernetesDeploymentCommandDatapublic 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.IGetContainerServiceInfoCommandDatagetContainerServiceName in interface KubernetesDeploymentCommandBase.IKubernetesDeploymentCommandDatagetContainerService()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.IKubernetesDeploymentCommandDataisEnableConfigSubstitution in interface MarathonDeploymentCommand.IMarathonDeploymentCommandDataisEnableConfigSubstitution 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.IKubernetesDeploymentCommandDataresolvedDockerRegistryEndpoints in interface MarathonDeploymentCommand.IMarathonDeploymentCommandDataresolvedDockerRegistryEndpoints in interface SwarmDeploymentCommand.ISwarmDeploymentCommandDataIOExceptionpublic void configure(@Nonnull hudson.model.Run<?,?> run, @Nonnull hudson.FilePath workspace, @Nonnull hudson.Launcher launcher, @Nonnull hudson.model.TaskListener listener) throws IOException, InterruptedException
IOExceptionInterruptedExceptionCopyright © 2016–2021. All rights reserved.