Gate the Staging Deploy
Add a build parameter and a conditional deployment gate.
A beginner Jenkins challenge worth 3 points. Solve it hands-on in a real Jenkins environment in your browser - no local setup, no fake shells.
The Challenge
Scenario: The same job serves several environments, but deployment must only run when an operator selects staging.
Requirements:
- Add a
DEPLOY_ENVchoice parameter:dev,staging,production - Add a Declarative
whenexpression usingparams.DEPLOY_ENV - Make the Deploy stage run only for
staging - Use Build with Parameters and select staging