1

I have a project built as gradle component , in Jenkins, and published to artifactory server.

I have a version text file that contains my version , and each time I want to increase the version I need to change the file , commit the change and run in jenkins the gradle task that publishing the artifacts.

I'm looking for a better way doing it- avoiding commit the version manually, might be depends on the jenkins build number .

my question is: what should be written in my text version file so it will take the build number from Jenkins ($BUILD_NUMBER)?

Bazuka
  • 417
  • 5
  • 16
  • Possible duplicate of [Read versionName of build.gradle from Jenkins](https://stackoverflow.com/questions/40442615/read-versionname-of-build-gradle-from-jenkins) – Joe Jun 12 '17 at 11:54
  • 1
    I need the opposite - change the build.gradle to be the $BUILD_NUMBER – Bazuka Jun 12 '17 at 11:58

0 Answers0