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

Poll SCM with post-commit hook or by cron-definition

    Details

    • Similar Issues:

      Description

      We have splitted some projects from one single job (doing build/test/analyse) to two jobs (one only for build and second one for test/analyse). The first job polls scm every 10 minutes, the second one polls scm at midnight.

      Now we defined a svn post-commit hook for CI, so we don't have to poll every 10 minutes for changes. This is fine for the first job, but the second one now starts too (because 'Poll SCM' is checked). For now it is not possible to define a job, that polls scm due a cron-definition and another one that is triggered by post-commit hook.

      It would be nice to have an additional option like "ignore post-commit hook". So 'Poll SCM' could be checked and triggered by cron-definition and not by post-commit.

        Attachments

          Issue Links

            Activity

            Hide
            manthos manthos added a comment -

            1) this doesn't change anything. if I bind job2 to job1, job2 builds right after job1...
            2) first job starts building by a scm postcommithook (push), no cronjob needed.

            IMO 'Poll SCM' and 'postcommithook (push)' are different triggers. Currently you are not able to have different Builds (based on same scm repository) but one triggered by postcommithook (push), the other by poll.

            Example:
            Job1:

            • maven deploy -DskipTests=true of http://svn.foo.bar/svn/java/foobarproject
            • build triggered by scm postcommithook (push)
              So every time a user checks something into scm, foobarproject builds, skipping the (time consuming) tests

            Job2:

            • maven test of http://svn.foo.bar/svn/java/foobarproject
            • build triggered by Poll SCM, in ex: (Mo-Fr at 23:00 -> 0 23 * * 1,2,3,4,5)
              So at 23:00 -> tests of foobarproject but only if something checked in (since last run)
            Show
            manthos manthos added a comment - 1) this doesn't change anything. if I bind job2 to job1, job2 builds right after job1... 2) first job starts building by a scm postcommithook (push), no cronjob needed. IMO 'Poll SCM' and 'postcommithook (push)' are different triggers. Currently you are not able to have different Builds (based on same scm repository) but one triggered by postcommithook (push), the other by poll. Example: Job1: maven deploy -DskipTests=true of http://svn.foo.bar/svn/java/foobarproject build triggered by scm postcommithook (push) So every time a user checks something into scm, foobarproject builds, skipping the (time consuming) tests Job2: maven test of http://svn.foo.bar/svn/java/foobarproject build triggered by Poll SCM, in ex: (Mo-Fr at 23:00 -> 0 23 * * 1,2,3,4,5) So at 23:00 -> tests of foobarproject but only if something checked in (since last run)
            Hide
            rainerw Rainer Weinhold added a comment -

            +1
            Same Problem: running nightly UI tests, which take about 3-4 hours to finish. I want this to run only after an actual change, because running every midnight will make the test-result-history kind of useless.

            Therefore this is definitively a critical bug!

            Show
            rainerw Rainer Weinhold added a comment - +1 Same Problem: running nightly UI tests, which take about 3-4 hours to finish. I want this to run only after an actual change, because running every midnight will make the test-result-history kind of useless. Therefore this is definitively a critical bug!
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Christoph Kutzinski
            Path:
            changelog.html
            core/src/main/java/hudson/triggers/SCMTrigger.java
            core/src/main/resources/hudson/triggers/SCMTrigger/config.jelly
            core/src/main/resources/hudson/triggers/SCMTrigger/help-ignorePostCommitHooks.html
            http://jenkins-ci.org/commit/jenkins/b65c30cb368e79205edacd958d8fd98dd89f3a73
            Log:
            Switch to ignore post-commit hook in SCM polling triggers [FIXED JENKINS-6846]

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: changelog.html core/src/main/java/hudson/triggers/SCMTrigger.java core/src/main/resources/hudson/triggers/SCMTrigger/config.jelly core/src/main/resources/hudson/triggers/SCMTrigger/help-ignorePostCommitHooks.html http://jenkins-ci.org/commit/jenkins/b65c30cb368e79205edacd958d8fd98dd89f3a73 Log: Switch to ignore post-commit hook in SCM polling triggers [FIXED JENKINS-6846]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Christoph Kutzinski
            Path:
            src/main/java/hudson/scm/SubversionRepositoryStatus.java
            http://jenkins-ci.org/commit/subversion-plugin/2de66bbcc17e80933d754bba09d000b4c6d1ab4d
            Log:
            Switch to ignore post-commit hook in SCM polling triggers [FIXED JENKINS-6846]

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: src/main/java/hudson/scm/SubversionRepositoryStatus.java http://jenkins-ci.org/commit/subversion-plugin/2de66bbcc17e80933d754bba09d000b4c6d1ab4d Log: Switch to ignore post-commit hook in SCM polling triggers [FIXED JENKINS-6846]
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #2096
            Switch to ignore post-commit hook in SCM polling triggers [FIXED JENKINS-6846] (Revision b65c30cb368e79205edacd958d8fd98dd89f3a73)

            Result = UNSTABLE
            Christoph Kutzinski : b65c30cb368e79205edacd958d8fd98dd89f3a73
            Files :

            • core/src/main/resources/hudson/triggers/SCMTrigger/help-ignorePostCommitHooks.html
            • changelog.html
            • core/src/main/resources/hudson/triggers/SCMTrigger/config.jelly
            • core/src/main/java/hudson/triggers/SCMTrigger.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2096 Switch to ignore post-commit hook in SCM polling triggers [FIXED JENKINS-6846] (Revision b65c30cb368e79205edacd958d8fd98dd89f3a73) Result = UNSTABLE Christoph Kutzinski : b65c30cb368e79205edacd958d8fd98dd89f3a73 Files : core/src/main/resources/hudson/triggers/SCMTrigger/help-ignorePostCommitHooks.html changelog.html core/src/main/resources/hudson/triggers/SCMTrigger/config.jelly core/src/main/java/hudson/triggers/SCMTrigger.java

              People

              • Assignee:
                kutzi kutzi
                Reporter:
                manthos manthos
              • Votes:
                5 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: