Issue #191 resolved
DekstrinG created an issue

Initially, the Jenkins-plugin automatically launch the assembly after using the command "hg push" (Mercurial repository). This is very good, but he starts the assembly of only one specific project, for one branch, and what if we have more then one branch and accordingly, more then one Jenkins-project for one Mercurial repository?

Comments (14)

  1. Sebastian Sdorra repo owner
    • changed status to open

    You have to use the global configuration of the jenkins plugin. When you use the global configuration, then the plugin will use "Push Notifications" (https://wiki.jenkins-ci.org/display/JENKINS/Mercurial+Plugin). The jenkins plugin will send the url of the repository to jenkins after each push. Jenkins will build each job which is configured with the repository url in the "Push Notification".

  2. DekstrinG reporter
    • attached 1

    I can't enable trace level because in my directory /root/.scm/config there is no file logging.xml .

  3. Sebastian Sdorra repo owner

    The logging.xml is in the conf directory of scm-server. If you use an other applicationserver the config is in WEB-INF/classes.

  4. DekstrinG reporter

    12:32:07.026 [Thread-1158] WARN sonia.scm.jenkins.JenkinsHook - jenkins configuration for repository TestHeads is not valid 12:32:07.053 [Thread-1158] INFO sonia.scm.jenkins.JenkinsGlobalHookHandler - request returned 200

  5. Sebastian Sdorra repo owner

    Did you see log lines like the following?

    DEBUG sonia.scm.repository.RepositoryHookTask - execute async POST_RECEIVE hook sonia.scm.jenkins.JenkinsHook for repository scm-manager
    DEBUG sonia.scm.jenkins.JenkinsGlobalHookHandler - check for global jenkins hook: type=hg, hg disabled=false, git disabled=false
    DEBUG sonia.scm.jenkins.JenkinsGlobalHookHandler - try to access url https://scm-manager.ci.cloudbees.com/mercurial/notifyCommit?url=https://bitbucket.org/sdorra/scm-manager
    DEBUG sonia.scm.net.URLHttpClient - fetch 'https://scm-manager.ci.cloudbees.com/mercurial/notifyCommit?url=https://bitbucket.org/sdorra/scm-manager'
    INFO  sonia.scm.jenkins.JenkinsGlobalHookHandler - request returned 200
    
  6. Sebastian Sdorra repo owner

    No mercurial hook will work. Because you have a syntax error in the file /usr/lib64/python2.6/site-packages/myMercurialInlineHooks.py.

      File "/usr/lib64/python2.6/site-packages/myMercurialInlineHooks.py", line 15
        def hook(ui, repo, **kwargs):
    

    And the forbid_2heads hook seems to be invalid. Please remove all custom mercurial hooks for testing.

  7. Sebastian Sdorra repo owner

    Looks good for me. SCM-Manager have successfully called the Jenkins url. I think there is something wrong with your jenkins configuration. Have you configured polling for each repository which should be build after a change? You could call the notifyCommit url of the log manually with a browser. The mercurial plugin of jenkins should show you a list of jobs which are scheduled for polling.

    Sources:

  8. Log in to comment