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

Build other projects: "Trigger even if the build is unstable" doesn't work

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • core
    • None
    • Platform: All, OS: All

    Description

      I have a build with maven defined in hudson which should trigger another build
      by using the "Post-build Actions".
      I ticked the checkbox "Build other projects" and entered the project name. I
      also ticked the checkbox "Trigger even if the build is unstable".
      -> Everything works fine if the first build is stable. But if the first build is
      unstable the post build is not started! So the checkbox "Trigger even if the
      build is unstable" has no effect.

      Attachments

        Issue Links

          Activity

            Code changed in hudson
            User: : mindless
            Path:
            trunk/hudson/main/test/src/test/java/hudson/tasks/BuildTriggerTest.java
            http://fisheye4.cenqua.com/changelog/hudson/?cs=23409
            Log:
            JENKINS-4739 Add unit test for BuildTrigger

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/test/src/test/java/hudson/tasks/BuildTriggerTest.java http://fisheye4.cenqua.com/changelog/hudson/?cs=23409 Log: JENKINS-4739 Add unit test for BuildTrigger
            mindless Alan Harder added a comment -

            I added a test for the most basic setup of build trigger, and this test passes.
            I'll try with maven next.. can you describe your setup in a bit more detail?

            mindless Alan Harder added a comment - I added a test for the most basic setup of build trigger, and this test passes. I'll try with maven next.. can you describe your setup in a bit more detail?
            2sober 2sober added a comment -

            The first build checks the scm every 5 minutes for changes and then starts a
            maven build with the goals clean an deploy. This maven build is a multi-modules
            build with a lot of unit-tests.
            When this test has run, even if it is instable, it should start a post-build.
            This second project consists out of html-unit tests, which test the web-app
            which was built in the first job. It is also a maven build.
            -> The problem is, that the second build is not triggered if the first build is
            instable because a few tests have failed.
            Are these the details you wanted?

            2sober 2sober added a comment - The first build checks the scm every 5 minutes for changes and then starts a maven build with the goals clean an deploy. This maven build is a multi-modules build with a lot of unit-tests. When this test has run, even if it is instable, it should start a post-build. This second project consists out of html-unit tests, which test the web-app which was built in the first job. It is also a maven build. -> The problem is, that the second build is not triggered if the first build is instable because a few tests have failed. Are these the details you wanted?
            mindless Alan Harder added a comment -

            that helps.. also, are you using maven project type in Hudson or a freestyle
            project with a maven build step? what is your OS, java version, webserver
            type/version, and is the job running on Hudson master or a slave node?

            mindless Alan Harder added a comment - that helps.. also, are you using maven project type in Hudson or a freestyle project with a maven build step? what is your OS, java version, webserver type/version, and is the job running on Hudson master or a slave node?
            2sober 2sober added a comment -

            -we are using a maven build step
            -our OS is ubuntu 9.04
            -java version: 1.6
            -webserver/servletcontainer: tomcat6
            -deployed as war int the Hudson master

            2sober 2sober added a comment - -we are using a maven build step -our OS is ubuntu 9.04 -java version: 1.6 -webserver/servletcontainer: tomcat6 -deployed as war int the Hudson master
            mindless Alan Harder added a comment -

            Are you sure you mean a freestyle project with a maven build step? I tried that
            and it worked OK, but when I tried a maven type project I do see the behavior
            you describe.. working on a fix for that.

            mindless Alan Harder added a comment - Are you sure you mean a freestyle project with a maven build step? I tried that and it worked OK, but when I tried a maven type project I do see the behavior you describe.. working on a fix for that.

            Code changed in hudson
            User: : mindless
            Path:
            trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/AbstractMavenBuild.java
            trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenBuild.java
            trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java
            trunk/hudson/main/test/src/test/java/hudson/tasks/BuildTriggerTest.java
            trunk/hudson/main/test/src/test/resources/hudson/tasks/maven-empty.zip
            trunk/hudson/main/test/src/test/resources/hudson/tasks/maven-test-failure.zip
            trunk/www/changelog.html
            http://fisheye4.cenqua.com/changelog/hudson/?cs=23455
            Log:
            [FIXED JENKINS-4739] Fixed "even if unstable" option for triggering other projects
            from a Maven type project; added unit test.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/AbstractMavenBuild.java trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenBuild.java trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java trunk/hudson/main/test/src/test/java/hudson/tasks/BuildTriggerTest.java trunk/hudson/main/test/src/test/resources/hudson/tasks/maven-empty.zip trunk/hudson/main/test/src/test/resources/hudson/tasks/maven-test-failure.zip trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=23455 Log: [FIXED JENKINS-4739] Fixed "even if unstable" option for triggering other projects from a Maven type project; added unit test.
            2sober 2sober added a comment -

            We are using a maven type project. I thought a maven build step was the same.
            Sorry for not beeing precise enough!

            2sober 2sober added a comment - We are using a maven type project. I thought a maven build step was the same. Sorry for not beeing precise enough!

            People

              mindless Alan Harder
              2sober 2sober
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: