I have the following dsl
pipeline { agent { label 'test' } parameters { booleanParam(defaultValue: false, description: 'This is a Release build', name: 'isRelease') } stages { stage('Build') { steps { script { if (${params.isRelease}) { echo("This is a release") } } } } } } This fails with the following error
java.lang.NoSuchMethodError: No such DSL method '$' found among steps What I am doing wrong? I am using
- Jenkins 2.89.4
- Job DSL 1.68
- Pipeline Job 2.20
- Pipeline: API 2.27
- Pipeline: Basic Steps 2.7
- Pipeline: Build Steps 2.7
- Pipeline: Declarative 1.2.9