Skip to content

Instantly share code, notes, and snippets.

@cvvs
Last active September 2, 2016 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cvvs/2451c9444e536b1c60fe9df7d1ea37b8 to your computer and use it in GitHub Desktop.
Save cvvs/2451c9444e536b1c60fe9df7d1ea37b8 to your computer and use it in GitHub Desktop.
// GitURL
def gitUrl = 'https://github.com/team/myapp'
def slackRoom = null
job('seed-dsl') {
description('This seed is updated from the seed-dsl-updater job')
// Comment this out to re-enable job
disabled ()
properties {
//Set github project URL
githubProjectUrl(gitUrl)
}
// set project label
label('dev')
// enable concurrent builds
concurrentBuild()
// setup to keep x number of builds
logRotator {
numToKeep(100)
}
// define notification endpoint
notifications {
endpoint('http://hubot.example.com/notify/build', 'HTTP', 'JSON') {
event('all')
timeout(30000)
logLines(0)
}
}
// scm git location
scm {
git {
remote {
url (gitUrl)
branch('master')
}
}
}
// triggers to set things in motion
triggers {
githubPush()
}
wrappers {
timestamps()
colorizeOutput('xterm')
}
// steps to build
steps {
dsl {
external('jobs/*/*.groovy')
ignoreExisting(false)
removeAction('DELETE')
removeViewAction('DELETE')
}
}
// publishers is another name for post build steps
publishers {
mailer('', false, true)
slackNotifier {
room(slackRoom)
notifyAborted(true)
notifyFailure(true)
notifyNotBuilt(true)
notifyUnstable(true)
notifyBackToNormal(true)
notifySuccess(false)
notifyRepeatedFailure(false)
startNotification(false)
includeTestSummary(false)
includeCustomMessage(false)
customMessage(null)
buildServerUrl(null)
sendAs(null)
commitInfoChoice('NONE')
teamDomain(null)
authToken(null)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment