Last active
March 29, 2019 03:35
-
-
Save KondaReddyR/7a879f1a250a61fb2567f642e864481a to your computer and use it in GitHub Desktop.
Trigger Freestyles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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