Patrick Friedl
Patrick Friedl

Reputation: 17

Jenkins Tag After Maven Build

I have a multi-module-maven project.

The jenkins job pipe is like that in my case:

  1. Injecting environment variables for variable versioning
  2. Check out from cvs
  3. Edit Version.properties file of my project via shell (using the injected variables)
  4. Perform mvn release:update-version to update POM version(s) (using the injected variables)
  5. List item
  6. Perform mvn build
  7. Finally perform a CVS tagging (using the injected variables)

But now the changes of the POMs and the Version.properties are not updated in the tag. So my question is, which workspace is tagged in CVS. What do i have to do to include the version changes in my tag?


Thank you for the fast response!

I have added a cvs commit after step 6 (maven build):

cvs commit -m "blabla"

the result is that the changes are commited but in the tag still the preversion is there. because of that my question was which workspace jenkins is tagging.

Upvotes: 0

Views: 1120

Answers (3)

ben75
ben75

Reputation: 28706

You are missing a CVS commit between step 6 and 7.

Upvotes: 1

Patrick Friedl
Patrick Friedl

Reputation: 17

I fixed the issue the following way:

I was using the Jenkins CVS Tagging Plug-in v1.7

This Plugin uses the command cvs rtag which should perform a tagging of the head of cvs. but in my case, the tagging of the head after a successful commit of the new files tagged the wrong files (like i told in my last comment)

Now I am using a post build shell command cvs tag (which taggs the jenkins workspace instead of the head of cvs) and it's working fine!

Upvotes: 0

Patrick Friedl
Patrick Friedl

Reputation: 17

I have added a cvs commit after step 6 (maven build):

cvs commit -m "blabla"

the result is that the changes are commited but in the tag still the preversion is there. because of that my question was which workspace jenkins is tagging.

  • Does he use the workspace of jenkins (i don't think so because the changes are not there)
  • Does he use the head of cvs (after the cvs commit the head contains the new versions so i don't think jenkins uses the head neither)
  • Does he use some cached workspace?

Upvotes: 0

Related Questions