Trying this step in Jenkinsfile with "version number plugin" installed:
stage("Build") {
echo "Building..."
TAG = ${BUILD_DATE_FORMATTED, "yyyyMMdd"}-develop-${BUILDS_TODAY}
sh "docker build -t $IMAGE:$TAG ."
}
And getting this error:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 15: unexpected token: BUILD_DATE_FORMATTED @ line 15, column 15.
TAG=${BUILD_DATE_FORMATTED, "yyyy-MM-dd"}-develop-${BUILDS_TODAY}
^
1 error
What is correct way to use this plugin in Jenkinsfile?