-
Bug
-
Resolution: Unresolved
-
Trivial
-
None
I have a pipeline job as follows:
// Using git without checkout pipeline { agent any parameters { gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'JOB_TAG', type: 'PT_TAG' gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'JOB_BRANCH', type: 'PT_BRANCH' gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'JOB_BRANCH_TAG', type: 'PT_BRANCH_TAG' gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'JOB_REVISION', type: 'PT_REVISION' gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'JOB_PULL_REQUEST', type: 'PT_PULL_REQUEST' } stages { stage('Example') { steps { echo "PT_TAG: ${params.JOB_TAG}" echo "PT_BRANCH: ${params.JOB_BRANCH}" echo "PT_BRANCH_TAG: ${params.JOB_BRANCH_TAG}" echo "PT_REVISION: ${params.JOB_REVISION}" echo "PT_PULL_REQUEST: ${params.JOB_PULL_REQUEST}" } } } }
The API Results in following:
{"_class":"org.jenkinsci.plugins.workflow.job.WorkflowJob","property":[{"_class":"hudson.model.ParametersDefinitionProperty","parameterDefinitions":[{"_class":"net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition","name":"JOB_TAG","type":"GitParameterDefinition"},{"_class":"net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition","name":"JOB_BRANCH","type":"GitParameterDefinition"},{"_class":"net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition","name":"JOB_BRANCH_TAG","type":"GitParameterDefinition"},{"_class":"net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition","name":"JOB_REVISION","type":"GitParameterDefinition"},{"_class":"net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition","name":"JOB_PULL_REQUEST","type":"GitParameterDefinition"}]}]}
The type is always 'GitParameterDefinition'. Before it was set to the selected Type (PT_TAG, PT_BRANCH, PT_BRANCH_TAG, PT_REVISION, PT_PULL_REQUEST)
I check the type for my plugin and there you see old and current API value: https://github.com/MCMicS/jenkins-control-plugin/issues/366#issuecomment-1084101319
- relates to
-
JENKINS-42435 Add support for Blue Ocean to Git Parameter plugin
- In Progress