tags:

views:

165

answers:

1

Recently, we tagged a build through Hudson, but shortly afterward a bug was found that necessitated a rebuild. We ended up deleting the tag in subversion, but Hudson still showed the tag on that build. I found the following in \jobs\\builds\\build.xml

<hudson.scm.SubversionTagAction>
  <build class="build" reference="../../.."/>
  <tags class="hudson.util.CopyOnWriteMap$Tree">
    <no-comparator/>
    <entry>
      <hudson.scm.SubversionSCM_-SvnInfo>
        <url>...url here...</url>
        <revision>34859</revision>
      </hudson.scm.SubversionSCM_-SvnInfo>
      <list>
        <string>...tag url here...</string>
      </list>
    </entry>
  </tags>
</hudson.scm.SubversionTagAction>

I replaced

<list>
    <string>...tag url here...</string>
</list>

with

<list/>

and this got rid of the tag.

My questions:

  1. Is there a cleaner way to remove the tag annotation from a Hudson build than manually editing the build.xml?
  2. Is there a way to completely remove the tag from Hudson/SVN through the Hudson interface? It would be nice to have an "undo" button to complement the "tag now" button.
+1  A: 

We ended up deleting the tag in subversion, but Hudson still showed the tag on that build. I found the following in \jobs\builds\build.xml

The way I understand it, everything inside [hudson]/jobs/[jobname]/builds is strictly historical data about past builds. To my knowledge, it doesn't ever get updated after the build has been done and "archived". You can for example delete everything under the builds directory and that won't affect future builds of the job in any way.

  1. Probably not. But is it absolutely necessary to have it edited?
  2. As you can execute any arbitrary commands from Hudson, you could certainly (and quite easily) create a Hudson job that e.g. deletes an SVN tag. (You could, for example, make the job parameterisable so that it takes the tag name as parameter.)

Hope this helps and hope I didn't misunderstand what you were trying to do...

Jonik
Removing the "tag" in Hudson is primarily an aesthetic issue. When we rebuilt that version and tagged the new build, that left two builds that claimed to have the exact same tag in Hudson.Granted, this is probably more a problem with our build process than the tools used.
sjohnston