Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-4227

patch to use cvs update of releases with submodules on different branches

    Details

    • Type: Patch
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Component/s: cvs-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      on our environment we are using CVS and ant to build and deploy releases of a
      customer application. The releases are structured in submodules on different
      tags and branches which are referenced by a xml file.

      A release is defined like this
      --> build.xml
      --> units.xml

      the units.xml describes the different modules of the application like the following:
      <units>
      <unit>
      <name>module-a</name>
      <tag>v39-0</tag>
      <repository>XXXX</repository>
      </unit>
      <unit>
      <name>module-a</name>
      <tag>HEAD</tag>
      <repository>XXXX</repository>
      </unit>
      ...
      </units>

      Why we generated this issue?
      when we checkout the release via hudson and runs the ant task to checkout the
      different units on different tags/branches - the build process works fine.
      when the cvs updates process is executed - all submodules are updated to the
      branch of the release - the build of the wholes release fails.

      We patched the following class to get it working on our environment:
      Path: /core/main/java/scm/CVSSCM.java
      Output of svn diff :
      Index: CVSSCM.java
      ===================================================================
      — CVSSCM.java (revision 20403)
      +++ CVSSCM.java (working copy)
      @@ -514,11 +514,12 @@
      if(dryRun)
      cmd.add("-n");
      cmd.add("update","-PdC");

      • if (branch != null) {
        + /*
        + if (branch != null) { cmd.add("-r", branch); }

        configureDate(cmd, date);

      • + */
        if(flatten) {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();

      This patch provides the functionality to preserve the given tag/branch of the
      underlaying modules in the given environment. For us it works fine.

      Can you check the patch please. It would be very helpfully when the patch can be
      integrated into one of the next releases of hudson.

        Attachments

          Issue Links

            Activity

            Hide
            kohsuke Kohsuke Kawaguchi added a comment -

            Thanks for the patch. However, the problem is that the -D option to specify the
            date is necessary to get a consistent snapshot (plus making sure matrix builds
            check out the exact same source files.)

            Perhaps we could split out the CVS SCM into its own plugin, so that you can
            relatively easily maintain your own version without patching core for every release.

            Show
            kohsuke Kohsuke Kawaguchi added a comment - Thanks for the patch. However, the problem is that the -D option to specify the date is necessary to get a consistent snapshot (plus making sure matrix builds check out the exact same source files.) Perhaps we could split out the CVS SCM into its own plugin, so that you can relatively easily maintain your own version without patching core for every release.
            Hide
            gunniman gunniman added a comment -

            ok, I understand the problem with the matrix projects. The solution with the
            creation of an own CVS SCM plugin would be great.

            Can you tell me which timeline I can expect to get it?

            Thanks

            Gunnar

            Show
            gunniman gunniman added a comment - ok, I understand the problem with the matrix projects. The solution with the creation of an own CVS SCM plugin would be great. Can you tell me which timeline I can expect to get it? Thanks Gunnar
            Hide
            mc1arke Michael Clarke added a comment -

            Closing this as it's covered by various other defects about wanting to have multiple modules or multiple CVS roots

            Show
            mc1arke Michael Clarke added a comment - Closing this as it's covered by various other defects about wanting to have multiple modules or multiple CVS roots

              People

              • Assignee:
                mc1arke Michael Clarke
                Reporter:
                gunniman gunniman
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: