public class ApplyStepExecution extends org.jenkinsci.plugins.workflow.steps.AbstractSynchronousStepExecution<String>
| Constructor and Description |
|---|
ApplyStepExecution() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addEnvironmentAnnotations(io.fabric8.kubernetes.api.model.HasMetadata resource) |
protected static void |
addPropertiesFileToMap(File file,
Map<String,String> answer) |
protected static void |
addPropertiesFileToMap(URL url,
Map<String,String> answer) |
void |
addRegistryToImageNameIfNotPresent(Iterable<io.fabric8.kubernetes.api.model.HasMetadata> items,
String registry) |
static io.fabric8.openshift.api.model.Route |
createRouteForService(String routeDomainPostfix,
String namespace,
io.fabric8.kubernetes.api.model.Service service,
hudson.model.TaskListener listener) |
protected void |
createRoutes(io.fabric8.kubernetes.client.KubernetesClient kubernetes,
Collection<io.fabric8.kubernetes.api.model.HasMetadata> collection,
String namespace) |
String |
getDeploymentEventJson(String resource,
String environment,
String environmentName) |
GitConfig |
getGitConfig() |
io.fabric8.kubernetes.client.KubernetesClient |
getKubernetes() |
io.fabric8.devops.ProjectConfig |
getProjectConfig() |
static boolean |
hasRegistry(String imageName)
Checks to see if there's a registry name already provided in the image name
Code influenced from docker-maven-plugin
|
String |
run() |
protected static boolean |
shouldCreateRouteForService(io.fabric8.kubernetes.api.model.Service service,
String id,
hudson.model.TaskListener listener)
Should we try to create a route for the given service?
|
protected String |
tryDefaultAnnotationEnvVar(String envVarName)
Tries to default some environment variables if they are not already defined.
|
start, stopinject, onResumeprotected void createRoutes(io.fabric8.kubernetes.client.KubernetesClient kubernetes,
Collection<io.fabric8.kubernetes.api.model.HasMetadata> collection,
String namespace)
throws hudson.AbortException
hudson.AbortExceptionpublic static io.fabric8.openshift.api.model.Route createRouteForService(String routeDomainPostfix, String namespace, io.fabric8.kubernetes.api.model.Service service, hudson.model.TaskListener listener)
protected static boolean shouldCreateRouteForService(io.fabric8.kubernetes.api.model.Service service,
String id,
hudson.model.TaskListener listener)
By default lets ignore the kubernetes services and any service which does not expose ports 80 and 443
public void addRegistryToImageNameIfNotPresent(Iterable<io.fabric8.kubernetes.api.model.HasMetadata> items, String registry) throws Exception
Exceptionpublic static boolean hasRegistry(String imageName)
imageName - protected void addEnvironmentAnnotations(io.fabric8.kubernetes.api.model.HasMetadata resource)
throws hudson.AbortException
hudson.AbortExceptionprotected String tryDefaultAnnotationEnvVar(String envVarName) throws hudson.AbortException
This can happen if using Jenkins Workflow which doens't seem to define BUILD_URL or GIT_URL for example
hudson.AbortExceptionprotected static void addPropertiesFileToMap(File file, Map<String,String> answer) throws hudson.AbortException
hudson.AbortExceptionprotected static void addPropertiesFileToMap(URL url, Map<String,String> answer) throws hudson.AbortException
hudson.AbortExceptionpublic GitConfig getGitConfig() throws hudson.AbortException
hudson.AbortExceptionpublic io.fabric8.devops.ProjectConfig getProjectConfig()
throws hudson.AbortException
hudson.AbortExceptionpublic String getDeploymentEventJson(String resource, String environment, String environmentName) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic io.fabric8.kubernetes.client.KubernetesClient getKubernetes()
Copyright © 2015-2016 Red Hat. All Rights Reserved.