When we try to create a new pipeline, the ‘this project is parameterized’ checkbox is not available along with many other checkboxes under the general section.
I may be wrong, but I think in a Pipeline project, parameters are defined in the Jenkinsfile or through a Pipeline script.
If you’re not seeing the ‘This project is parameterized’ checkbox, it’s likely because you’re trying to create a Pipeline project.
If you want to use parameters in a Pipeline project, you could maybe define them in your Jenkinsfile or Pipeline script like this:
pipeline {
agent any
parameters {
string(name: 'MY_STRING', defaultValue: 'default', description: 'A string parameter')
booleanParam(name: 'MY_BOOLEAN', defaultValue: true, description: 'A boolean parameter')
}
stages {
stage('Example') {
steps {
echo "The string is: ${params.MY_STRING}"
echo "The boolean is: ${params.MY_BOOLEAN}"
}
}
}
}
If you want to create a Freestyle project or a Multi-configuration project instead, you should be able to see the ‘This project is parameterized’ checkbox in the project configuration.
If you’re not seeing it, there may be an issue with your Jenkins installation or a plugin.
You might want to check your installed plugins and ensure they’re all up to date.
Thanks Bruno for the welcome and the quick response.
I am definitely trying to create a pipeline. Also, I did some further research and found that the pipelines we copied over from the old environment do NOT show the parameterized button, however when I view them in the old environment the parameterized button is visible.
It’s very odd. I am wondering if I am missing a plugin - just not sure which one might be missing or need to be updated? However, this seems to be core functionality of Jenkins pipelines.