Skip to content

Instantly share code, notes, and snippets.

@tuanpembual
Created March 26, 2017 22:28
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 tuanpembual/f0437d3fbd374e7d1ad812788bf1c7b6 to your computer and use it in GitHub Desktop.
Save tuanpembual/f0437d3fbd374e7d1ad812788bf1c7b6 to your computer and use it in GitHub Desktop.
Jenkins Job
String app = "JobGitHUb"
folder("${app}") {
description "Semua jobs dari github"
}
job("${app}/Package") {
description "Ini adalah\nDeskripsi"
logRotator {
daysToKeep(7)
numToKeep(10)
}
label('slave')
scm {
git {
remote {
url('https://github.com/tuanpembual/jenkins-jobs.git')
credentials('jenkins')
}
branch('master')
}
}
steps {
gradle {
tasks('clean')
}
shell('''#!/bin/bash -e
echo "hello world"''')
}
publishers {
archiveArtifacts {
pattern("Release/*.apk")
onlyIfSuccessful()
}
downstream("${app}/StagingDeploy", 'SUCCESS')
mailer('admin@email.com', false, true)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment