67 Pipeline - Jenkins - Creating parameterized project

Опубликовано: 06 Февраль 2026
на канале: Omar Elbably
85
1

🎛️ Playwright Essentials #67 Jenkins Parameterized Projects: Build Smarter, Not Harder

In this episode, we explore how to create a parameterized Jenkins project, allowing you to pass dynamic inputs like environment names, test types, or feature flags into your builds. This setup is perfect for QA engineers and DevOps teams who want flexible, scalable CI pipelines without duplicating jobs.

🎯 What You’ll Learn:

🧩 What Are Parameterized Builds?
Jenkins jobs that accept runtime inputs
Customize builds without editing job config
Ideal for multi-environment testing, selective execution, and reusable pipelines

🛠️ Step-by-Step: Creating a Parameterized Jenkins Project
Create a New Jenkins Job
→ From the dashboard, click New Item
→ Choose Freestyle Project or Pipeline
Enable Parameters
→ In the job config, check This project is parameterized
Add Build Parameters
→ Click Add Parameter and choose from:
String Parameter (e.g., ENVIRONMENT = staging)
Choice Parameter (e.g., TEST_TYPE = [smoke, regression, e2e])
Boolean Parameter (e.g., DEBUG_MODE = true/false)
Password, File, or Credentials for secure inputs
Use Parameters in Build Steps
→ In shell scripts or pipeline stages:
echo "Running tests in $ENVIRONMENT with $TEST_TYPE"
Trigger with Custom Inputs
→ Use Build with Parameters to run the job with your selected values

🧠 Best Practices
Use descriptive parameter names and defaults
Validate inputs inside your scripts
Combine with GitHub triggers for dynamic CI workflows
Document parameter usage for team clarity

🧪 Real-World Use Cases:
Run Playwright tests in different environments (dev, staging, prod)
Toggle between smoke and full regression suites
Enable debug mode for flaky test investigation
Deploy to different cloud regions using a single job

#jenkins #ParameterizedBuilds #CISetup #TypeScriptEssentials #QAEngineer #WebAutomation #SDET #AutomationFramework #PlaywrightCI #DevWorkflow