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

Build on commit not working for child maven modules on github

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

      I am using the build-on commit feature with github.

      • I've got a dedicated user that has pull-only to several of my repositories.
      • GitHub Web Hook is configured like so:
        + "Let Jenkins auto-manage hook URLs" enabled
        + "Override Hook URL" disabled
        + "GitHub credentials" = credentials of the dedicated user
      • In the job configuration, "Build when a change is pushed to GitHub" is enabled
      • On github.com in the "Service Hooks" section of my repo, I've added a "WebHook URL": https://XXX/github-webhook/

      I've tested the hook (using "Test Hook" button in github Service Hooks configuration) in the following cases and here is what I observe:

      • OK (= a build is triggered) if the repo contains a simple maven project at the root of the repository
      • OK if the repo contains several (unrelated) maven projects and jenkins job root pom points to one of the projects
      • NOT OK if the repo contains a multi-module maven project at the root of the repository and jenkins job root pom points to the 'master' pom, like so:
        <repo>/
        ..pom.xml <- root pom
        ..module1/
        ....src/
        ....pom.xml
        ..module2/
        ....src/
        ....pom.xml

      thanks

          [JENKINS-16981] Build on commit not working for child maven modules on github

          X Y created issue -
          X Y made changes -
          Description Original: I am using the build-on commit feature with github.

          - I've got a dedicated user that has pull-only to several of my repositories.
          - GitHub Web Hook is configured like so:
              + "Let Jenkins auto-manage hook URLs" enabled
              + "Override Hook URL" disabled
              + "GitHub credentials" = credentials of the dedicated user
          - In the job configuration, "Build when a change is pushed to GitHub" is enabled
          - On github.com in the "Service Hooks" section of my repo, I've added a "WebHook URL": https://XXX/github-webhook/

          I've tested the hook (using "Test Hook" button in github Service Hooks configuration) in the following cases and here is what I observe:
          - OK (= a build is triggered) if the repo contains a simple maven project at the root of the repository
          - OK if the repo contains several (unrelated) maven projects and jenkins job root pom points to one of the projects
          - NOT OK if the repo contains a multi-module maven project at the root of the repository and jenkins job root pom points to the 'master' pom, like so:
          <repo>/
            pom.xml <- root pom
            module1
              src/
              pom.xml
            module2
              src/
              pom.xml

          thanks


          New: I am using the build-on commit feature with github.

          - I've got a dedicated user that has pull-only to several of my repositories.
          - GitHub Web Hook is configured like so:
              + "Let Jenkins auto-manage hook URLs" enabled
              + "Override Hook URL" disabled
              + "GitHub credentials" = credentials of the dedicated user
          - In the job configuration, "Build when a change is pushed to GitHub" is enabled
          - On github.com in the "Service Hooks" section of my repo, I've added a "WebHook URL": https://XXX/github-webhook/

          I've tested the hook (using "Test Hook" button in github Service Hooks configuration) in the following cases and here is what I observe:
          - OK (= a build is triggered) if the repo contains a simple maven project at the root of the repository
          - OK if the repo contains several (unrelated) maven projects and jenkins job root pom points to one of the projects
          - NOT OK if the repo contains a multi-module maven project at the root of the repository and jenkins job root pom points to the 'master' pom, like so:
          <repo>/
          ..pom.xml <- root pom
          ..module1
          ....src/
          ....pom.xml
          ..module2
          ....src/
          ....pom.xml

          thanks


          X Y made changes -
          Description Original: I am using the build-on commit feature with github.

          - I've got a dedicated user that has pull-only to several of my repositories.
          - GitHub Web Hook is configured like so:
              + "Let Jenkins auto-manage hook URLs" enabled
              + "Override Hook URL" disabled
              + "GitHub credentials" = credentials of the dedicated user
          - In the job configuration, "Build when a change is pushed to GitHub" is enabled
          - On github.com in the "Service Hooks" section of my repo, I've added a "WebHook URL": https://XXX/github-webhook/

          I've tested the hook (using "Test Hook" button in github Service Hooks configuration) in the following cases and here is what I observe:
          - OK (= a build is triggered) if the repo contains a simple maven project at the root of the repository
          - OK if the repo contains several (unrelated) maven projects and jenkins job root pom points to one of the projects
          - NOT OK if the repo contains a multi-module maven project at the root of the repository and jenkins job root pom points to the 'master' pom, like so:
          <repo>/
          ..pom.xml <- root pom
          ..module1
          ....src/
          ....pom.xml
          ..module2
          ....src/
          ....pom.xml

          thanks


          New: I am using the build-on commit feature with github.

          - I've got a dedicated user that has pull-only to several of my repositories.
          - GitHub Web Hook is configured like so:
              + "Let Jenkins auto-manage hook URLs" enabled
              + "Override Hook URL" disabled
              + "GitHub credentials" = credentials of the dedicated user
          - In the job configuration, "Build when a change is pushed to GitHub" is enabled
          - On github.com in the "Service Hooks" section of my repo, I've added a "WebHook URL": https://XXX/github-webhook/

          I've tested the hook (using "Test Hook" button in github Service Hooks configuration) in the following cases and here is what I observe:
          - OK (= a build is triggered) if the repo contains a simple maven project at the root of the repository
          - OK if the repo contains several (unrelated) maven projects and jenkins job root pom points to one of the projects
          - NOT OK if the repo contains a multi-module maven project at the root of the repository and jenkins job root pom points to the 'master' pom, like so:
          <repo>/
          ..pom.xml <- root pom
          ..module1/
          ....src/
          ....pom.xml
          ..module2/
          ....src/
          ....pom.xml

          thanks


          X Y added a comment -

          Turned out it finally works after updating related plugins and using 'Jenkins (GitHub Plugin)' instead of 'WebHook URLs' in github project hook settings.

          X Y added a comment - Turned out it finally works after updating related plugins and using 'Jenkins (GitHub Plugin)' instead of 'WebHook URLs' in github project hook settings.
          X Y made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 147811 ] New: JNJira + In-Review [ 206446 ]

            Unassigned Unassigned
            pm47 X Y
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: