概要
pipeline { agent any parameters { gitParameter( branchFilter: 'origin/(.*)', defaultValue: 'main', name: 'BRANCH', type: 'PT_BRANCH' ) } stages { stage('Git') { steps { script { git( branch: params.BRANCH, url: '【リポジトリの URL】' ) } } } } }
上記のように gitParameter
を使用したら
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 5: Invalid parameter type "gitParameter". Valid parameter types: [text, password, run, file, string, booleanParam, credentials, choice]
上記のエラーが発生する現象に遭遇した
「Git Parameter」プラグインを Jenkins に追加したら発生しなくなった