fix: approval input ko simple proceed/abort banaya
This commit is contained in:
parent
c84e0ee9be
commit
c06b48be89
11
Jenkinsfile
vendored
11
Jenkinsfile
vendored
@ -199,14 +199,13 @@ assert r['version'] == '${IMAGE_TAG}', 'version galat!'
|
||||
script {
|
||||
// Enterprise gate: insaan ki manzoori ke bina production par kuch nahi.
|
||||
// 15 min me jawab na aaye to build abort - production safe rehta hai.
|
||||
// Simple proceed/abort input. Parameters wale input ko
|
||||
// API se submit karna jhanjhat hai; UI ke liye bhi ye saaf hai.
|
||||
timeout(time: 15, unit: 'MINUTES') {
|
||||
env.APPROVED = input(
|
||||
message: "Staging theek hai. Production par ${env.IMAGE_TAG} deploy karein?",
|
||||
ok: 'Deploy to Production',
|
||||
parameters: [choice(name: 'DECISION', choices: ['Deploy', 'Abort'], description: '')]
|
||||
)
|
||||
input(message: "Staging par ${env.IMAGE_TAG} verified hai. PRODUCTION par deploy karein?",
|
||||
ok: 'Deploy to Production')
|
||||
}
|
||||
if (env.APPROVED != 'Deploy') { error('Production deploy user ne rok diya') }
|
||||
echo "Production deploy approve ho gaya"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user