Part 9: Parameterized Pipelines
Scaling pipeline to accept Dynamic inputs

Search for a command to run...
Scaling pipeline to accept Dynamic inputs

No comments yet. Be the first to comment.
Azure Solution for SmartBuildings

RAG

Make it variables and reusable

Scaling with branches

Create a Jenkins pipeline named parameter-pipeline that accepts user inputs through parameters to control a deployment configuration. The pipeline should allow the user to specify a custom deployment name, choose the target AWS Availability Zone, and confirm the deployment before execution.
The purpose of this part is to make your Jenkins pipelines interactive, flexible, and production-ready.
So far, your pipelines were:
Static
Hardcoded
Same behavior for every run
In real-world DevOps:
Deployments vary by environment (Dev, UAT, Prod)
Infrastructure changes by region/AZ
Releases need manual confirmation or approvals
Parameterized pipelines solve this by:
Allowing user input during execution
Enabling controlled deployments
Reducing the need to modify pipeline code
This is a critical DevOps practice used in:
Multi-environment deployments
Release approvals
Dynamic infrastructure provisioning
Before starting this part, ensure:
Host and the directory structure to run Dockerfiles and docker-compose.yml (Refer to Part 1)Here is the code that will be used
pipeline {
agent any
parameters {
string(
name: "deploymentName",
defaultValue: "",
description: "Deployment Name?"
)
choice(
name: "azDeploy",
choices: ["ap-southeast-1a", "ap-southeast-1b", "ap-southeast-1c"],
description: "What AZ?"
)
booleanParam(
name: "confirmDeploy",
defaultValue: false,
description: "CONFIRM DEPLOYMENT?"
)
}
stages {
stage("Deploy") {
steps {
echo "Deployment Name: ${params.deploymentName}"
echo "AZ Selected: ${params.azDeploy}"
echo "Deployment Confirmation: ${params.confirmDeploy}"
}
}
}
}
parameter-pipeline"
pipeline script
build with parameters
console output
Done!!!
In this part, you transformed your pipeline into a dynamic, user-driven CI/CD system
We learned how to:
Accept user inputs directly from Jenkins UI
Control pipeline execution using parameters
Make deployments flexible and environment-aware
Reduce hardcoding in pipeline scripts
This is how real-world pipelines operate in production:
Same pipeline, multiple use cases
Controlled deployments with user validation
Better flexibility without changing code
⬅️ Previous Article: Part 8 Multibranch Pipelines
➡️ Next Article: Part 10 Environment Variables in Pipelines
⭐ If you found this article useful, follow https://ask-abhi.com for more DevOps tutorials.