0

I have a spring boot app which is built to PCF with Concourse. I want to be able bump the pom build version number during the build.

I'd like to use a version file and the semver resource, however once I have the version number how can I pass the value to my maven command?

E.g.

package -Dbuild.version=version

How can I pass this version between tasks, to my build task?

marco.m
  • 4,573
  • 2
  • 26
  • 41
cdugga
  • 3,849
  • 17
  • 81
  • 127

1 Answers1

1

The semver resource, as explained in the Concourse tutorial, writes the current version in file RESOURCE_NAME/number.

So assuming that your semver resource is named version, and that the job does a get: version, and that the task has version among its inputs, then your "package" command can be written as follows:

package -Dbuild.version=$(cat version/number)

I suggest to read the Concourse tutorial, it is very good and will get you started :-)

marco.m
  • 4,573
  • 2
  • 26
  • 41