PortMan
PortMan

Reputation: 4533

Version Number Plugin Causes Pipeline Parsing Error

The documentation says that the Version Number Plugin works with pipelines, and it is included in the Pipeline Snippet Generator.

The Snippet Generator gave me this as a simple example:

VersionNumber projectStartDate: '', versionNumberString: 'bob', versionPrefix: ''

I put this line into my Pipeline script, and it chokes when trying to parse it:

WorkflowScript: 92: unexpected token: projectStartDate @ line 92, column 22.
          VersionNumber projectStartDate: '', versionNumberString: 'bob', versionPrefix: ''
                        ^

Am I doing something wrong?

Upvotes: 2

Views: 485

Answers (2)

user2290254
user2290254

Reputation: 21

VersionNumber(versionNumberString: '1.0.1_${BUILDS_ALL_TIME, XXX}', projectStartDate: '2017-04-03', versionPrefix: '', worstResultForIncrement: 'SUCCESS')

it also worked for me.

Upvotes: 1

rgifford
rgifford

Reputation: 21

I came across the same issue. I fixed it with something like

VersionNumber(versionNumberString : '1.0-${BUILDS_ALL_TIME}', projectStartDate : '2017-03-16')

Upvotes: 2

Related Questions