0
0
Jenkinsdevops~10 mins

Parameters block declaration in Jenkins - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to declare a string parameter named 'ENV'.

Jenkins
parameters {
    string(name: '[1]', defaultValue: 'dev', description: 'Environment')
}
Drag options to blanks, or click blank then click option'
AenvVar
Benvironment
CENV
Denv_name
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase or different parameter names like 'environment' or 'envVar'.
2fill in blank
medium

Complete the code to declare a boolean parameter named 'DEBUG_MODE'.

Jenkins
parameters {
    booleanParam(name: '[1]', defaultValue: false, description: 'Enable debug mode')
}
Drag options to blanks, or click blank then click option'
Adebug
BDEBUG_MODE
CdebugMode
Ddebug_flag
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase or camelCase names instead of uppercase with underscores.
3fill in blank
hard

Fix the error in the parameters block to declare a choice parameter named 'DEPLOY_ENV'.

Jenkins
parameters {
    choice(name: '[1]', choices: ['dev', 'staging', 'prod'], description: 'Deployment environment')
}
Drag options to blanks, or click blank then click option'
Adeploy_env
BdeployEnv
CDeployEnv
DDEPLOY_ENV
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase or camelCase names causes errors.
4fill in blank
hard

Fill both blanks to declare a string parameter named 'VERSION' with default '1.0' and description 'App version'.

Jenkins
parameters {
    string(name: '[1]', defaultValue: '[2]', description: 'App version')
}
Drag options to blanks, or click blank then click option'
AVERSION
B1.0
Cversion
Dlatest
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase 'version' or wrong default values like 'latest'.
5fill in blank
hard

Fill all three blanks to declare a choice parameter named 'REGION' with choices 'us-east', 'us-west', 'eu-central' and description 'Deployment region'.

Jenkins
parameters {
    choice(name: '[1]', choices: [2], description: '[3]')
}
Drag options to blanks, or click blank then click option'
AREGION
B['us-east', 'us-west', 'eu-central']
CDeployment region
Dregion
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase names, wrong choice list format, or incorrect description text.