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

Build whenever a SNAPSHOT dependency is built trigger is not working or seems to be hazardous

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • maven-plugin
    • None

      We have a quite large setup of Hudson with ~110 maven2 jobs categorized in server, common and full-build categories. As you'd expect, server-type jobs depend on some of the commons, and some common jobs depend on each other. Jobs in server and common categories always produce one JAR per each job, run the tests and deploy the artifact in the maven repo, if the build is stable. Piece of cake.

      The only job in the full-build category assembles an EAR file from the available artifacts in maven (we don't build the full product from source and I will not tell you why, there are reasons for it), deploys it to a container and says hello to developers. Piece of cake again.

      Accurev is setup to trigger the appropriate job if a commit (promote) arrives in the depot, this works fine.

      To formalize our setup:
      jobC1 builds moduleC1 which creates and deploys artifactC1
      jobC2 builds moduleC2 which creates and deploys artifactC2
      jobC3 builds moduleC3 which creates and deploys artifactC3, depends on artifactC1

      jobS1 builds moduleS1 which creates and deploys artifactS1, depends on artifactC1
      jobS1 builds moduleS1 which creates and deploys artifactS1, depends on artifactC1, artifactC2
      jobS1 builds moduleS1 which creates and deploys artifactS1, depends on artifactC2, artifactC3

      jobF builds moduleF which creates artifactF (the full build), depends on all artifacts

      All produced artifacts are maven2 SNAPSHOT versions. Always.

      What I'd like to achieve is that if the Accurev post-promote trigger pokes jobC1 (it does), that build should create artifactC1 (it does), and after this, all jobs that depend on artifactC1 (jobS1, jobS2, jobS3) should be triggered and built. AFAIK this was achievable with the "Build whenever a SNAPSHOT dependency is built" trigger in the 1.2xx series (last time I've checked Hudson was something like a year ago), but if I check that option in all jobs, no automatic dependency building happens. I know I could check all modules manually with "build other projects", but no thanks, that would cost a week's work and would cause lots of unflexibility.

      What's interesting is, though, that jobF (the full EAR assembly build) becomes the downstream job of all other jobs but it seems that it gets triggered only occasionally (or most probably never).

      Any hints or tips or fixes are welcome, I'm more than happy to help investigating this issue.

      We're using the most recent Hudson version (1.353) with updated plugins. The Accurev plugin uses no workspace, just pops the contents of a stream.

            tamasmezei tamasmezei
            tamasmezei tamasmezei
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: