Skip to content

Instantly share code, notes, and snippets.

@KondaReddyR
Last active March 29, 2019 03:35
Show Gist options
  • Save KondaReddyR/7a879f1a250a61fb2567f642e864481a to your computer and use it in GitHub Desktop.
Save KondaReddyR/7a879f1a250a61fb2567f642e864481a to your computer and use it in GitHub Desktop.
Trigger Freestyles
pipeline{
agent none
parameters {
booleanParam(name: 'EXTRACT_DATA', defaultValue: true, description: '')
string(name: 'RECORDS', defaultValue: '100', description: '')
choice(name: 'DB', choices: ['one', 'two', 'three'], description: '')
}
options {
disableConcurrentBuilds()
timeout(time: 1, unit: 'HOURS')
}
stages{
stage('data'){
agent { label 'agent1'}
when {
expression {
return params.EXTRACT_DATA
}
}
steps{
script{
build job: 'data', parameters: [
string(name: 'DB', value: String.valueOf(DB)),
string(name: 'RECORDS', value: String.valueOf(RECORDS))]
}
}
}
stage('db-performance'){
agent { label 'agent2'}
steps {
script {
build(job: 'db-performance')
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment