Skip to content

Instantly share code, notes, and snippets.

View ranjitkumar518's full-sized avatar

Ranjit G ranjitkumar518

  • INTUIT
  • Mountain View,CA
View GitHub Profile
@ranjitkumar518
ranjitkumar518 / ci-workflow-defaults.yml
Created April 23, 2017 05:34 — forked from arilivigni/ci-workflow-defaults.yml
Jenkins Job Builder Example
- defaults:
name: ci-workflow-provision
description: |
Managed by Jenkins Job Builder. Do not edit via web.
concurrent: true
scm:
- git:
url: 'https://code.engineering.redhat.com/gerrit/ci-ops-central'
branches:
- origin/master
new BaseJobBuilder(
name: "operations-jira-restart",
description: "Restarts dev jira. To be used when Jira is not responding",
emails: ["foo@example.com", "bar@example.com"]
).build(this).with {
scm {
git("https://[redacted]/SoftwareDevelopment/operations-jenkins-automation.git", "master")
}
steps {
shell("fab restart_jira")
//IMPORTANT NOTE!!!: Name this file "job-generation.dsl". Github's gist tool uses the file extension to establish syntax highlighting rules
@GrabResolver(name="repo.jenkins-ci.org",root='http://repo.jenkins-ci.org/public/')
@Grapes([
@Grab(group='org.kohsuke', module='github-api', version='1.59')
])
import static hudson.security.ACL.SYSTEM
import com.cloudbees.plugins.credentials.CredentialsProvider
//IMPORTANT NOTE!!!: Name this file "job-generation.dsl". Github's gist tool uses the file extension to establish syntax highlighting rules
@GrabResolver(name="repo.jenkins-ci.org",root='http://repo.jenkins-ci.org/public/')
@Grapes([
@Grab(group='org.kohsuke', module='github-api', version='1.59')
])
import static hudson.security.ACL.SYSTEM
import com.cloudbees.plugins.credentials.CredentialsProvider