Skip to content

Instantly share code, notes, and snippets.

@slide
Created September 28, 2018 19:26
Show Gist options
  • Save slide/a1a3fad2f36ab6361d9b636bcc57b5f6 to your computer and use it in GitHub Desktop.
Save slide/a1a3fad2f36ab6361d9b636bcc57b5f6 to your computer and use it in GitHub Desktop.
This
import hudson.plugins.git.*
import hudson.model.*
import jenkins.model.*
import jenkins.util.SystemProperties
import com.cloudbees.plugins.credentials.impl.*
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.domains.*
import org.csanchez.jenkins.plugins.kubernetes.*
import org.csanchez.jenkins.plugins.*
def scm = new GitSCM("https://github.com/kurktchiev/jenkins-pipeline-examples.git")
scm.branches = [new BranchSpec("*/master")];
def parent = Jenkins.instance
def hazelDeployDefinition = new org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition(scm, "hazel/Jenkinsfile")
def hazelDeployJob = new org.jenkinsci.plugins.workflow.job.WorkflowJob(parent, "WIP: Deploy Hazelcast")
hazelDeployJob.definition = hazelDeployDefinition
hazelDeployJob.addProperty(new ParametersDefinitionProperty([
new StringParameterDefinition("HAZEL_LICENSE", "changeme"), new StringParameterDefinition("MAN_CENTER_HAZEL_LICENSE", "changeme")
]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment