fix: approval input ko simple proceed/abort banaya

This commit is contained in:
devops 2026-09-16 13:34:06 +00:00
parent c84e0ee9be
commit c06b48be89

11
Jenkinsfile vendored
View File

@ -199,14 +199,13 @@ assert r['version'] == '${IMAGE_TAG}', 'version galat!'
script { script {
// Enterprise gate: insaan ki manzoori ke bina production par kuch nahi. // Enterprise gate: insaan ki manzoori ke bina production par kuch nahi.
// 15 min me jawab na aaye to build abort - production safe rehta hai. // 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') { timeout(time: 15, unit: 'MINUTES') {
env.APPROVED = input( input(message: "Staging par ${env.IMAGE_TAG} verified hai. PRODUCTION par deploy karein?",
message: "Staging theek hai. Production par ${env.IMAGE_TAG} deploy karein?", ok: 'Deploy to Production')
ok: 'Deploy to Production',
parameters: [choice(name: 'DECISION', choices: ['Deploy', 'Abort'], description: '')]
)
} }
if (env.APPROVED != 'Deploy') { error('Production deploy user ne rok diya') } echo "Production deploy approve ho gaya"
} }
} }
} }