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

Github multibranch: GitHub Webhook is not created right after saving the job

    XMLWordPrintable

    Details

    • Sprint:
      Pipeline - December
    • Similar Issues:

      Description

      I am observing the following behavior:

      1.- Fresh installation, installing latest version of Pipeline, GitHub plugin and GitHub Branch Source Plugin

      2.- Manage Jenkins > Configuring GitHub plugin: Credentials of an Owner of a Organization which hosts a Repo X

      3.- New Pipeline Multibranch Item pointing to Repo X, after saving the job the webhook in GitHub is not automatically generated (vs. GitHub Organization Folder item which is done)

      4.- Manage Jenkins > GitHub plugin > Advanced > Re-register hooks for all jobs > webhook in GitHub is finally generated
       
      What I am reporting: I'd expect the webhook in GitHub is automatically generated right after the saving the Pipeline Multibranch Branch but it does not it until I click on Re-register hooks for all jobs (GitHub plugin)

        Attachments

          Issue Links

            Activity

            Hide
            stephenconnolly Stephen Connolly added a comment -

            claimed resolved in 2.3.2

            Show
            stephenconnolly Stephen Connolly added a comment - claimed resolved in 2.3.2
            Hide
            michaelneale Michael Neale added a comment -

            Just reopening to make sure we do org folders as well 

            Show
            michaelneale Michael Neale added a comment - Just reopening to make sure we do org folders as well 
            Hide
            michaelneale Michael Neale added a comment -

            Stephen Connolly can this then be closed? 

            Show
            michaelneale Michael Neale added a comment - Stephen Connolly can this then be closed? 
            Hide
            carlosrodlop Carlos Rodríguez López added a comment - - edited

            rsandell Stephen Connolly I am reopening this ticket again because the same reported issue seems to be back running (Regression?)

            Environment

            Jenkins LTS 2.164.2
             * github:1.29.4 'GitHub plugin'
             * github-api:1.95 'GitHub API Plugin'
             * github-branch-source:2.5.0 *(update available)* 'GitHub Branch Source Plugin'
            

            Observations

            What we see on Jenkins logs
            May 16, 2019 3:12:38 PM org.jenkinsci.plugins.github.webhook.WebhookManager$2 applyNullSafe
            WARNING: Failed to add GitHub webhook for GitHubRepositoryName[host=github.com,username=mock-carlosrodlop-org,repository=my-hw-maven-app]
            java.lang.NullPointerException: There are no credentials with admin access to manage hooks on GitHubRepositoryName[host=github.com,username=mock-carlosrodlop-org,repository=my-hw-maven-app]
            

            But it is not right... I am using this repo https://github.com/mock-carlosrodlop-org/my-hw-maven-app with user:carlosrodlop and pass:APIToken and as you can tell from the following images carlosrodlop is an admin

            Custom dedicated loggers as explained in this guide: GitHub-Webhook-Troubleshooting are not providing any useful hint just
            May 16, 2019 4:05:50 PM FINE com.cloudbees.jenkins.GitHubWebHook$1 apply
            Calling registerHooks() for multibranch-example-job
            May 16, 2019 4:05:51 PM FINE com.cloudbees.jenkins.GitHubWebHook$1 apply
            Calling registerHooks() for multibranch-example-job
            
            Manage Jenkins > GitHub plugin > Advanced > Re-register hooks for all jobs > webhook in GitHub is NOT generated either. Independently if I enabled or disable Manage hooks options the output is the same: Works only when Jenkins manages hooks (one or more creds specified)
            Show
            carlosrodlop Carlos Rodríguez López added a comment - - edited rsandell Stephen Connolly I am reopening this ticket again because the same reported issue seems to be back running (Regression?) Environment Jenkins LTS 2.164.2 * github:1.29.4 'GitHub plugin' * github-api:1.95 'GitHub API Plugin' * github-branch-source:2.5.0 *(update available)* 'GitHub Branch Source Plugin' Observations What we see on Jenkins logs May 16, 2019 3:12:38 PM org.jenkinsci.plugins.github.webhook.WebhookManager$2 applyNullSafe WARNING: Failed to add GitHub webhook for GitHubRepositoryName[host=github.com,username=mock-carlosrodlop-org,repository=my-hw-maven-app] java.lang.NullPointerException: There are no credentials with admin access to manage hooks on GitHubRepositoryName[host=github.com,username=mock-carlosrodlop-org,repository=my-hw-maven-app] But it is not right... I am using this repo https://github.com/mock-carlosrodlop-org/my-hw-maven-app with user:carlosrodlop and pass:APIToken and as you can tell from the following images carlosrodlop is an admin Custom dedicated loggers as explained in this guide: GitHub-Webhook-Troubleshooting are not providing any useful hint just May 16, 2019 4:05:50 PM FINE com.cloudbees.jenkins.GitHubWebHook$1 apply Calling registerHooks() for multibranch-example-job May 16, 2019 4:05:51 PM FINE com.cloudbees.jenkins.GitHubWebHook$1 apply Calling registerHooks() for multibranch-example-job Manage Jenkins > GitHub plugin > Advanced > Re-register hooks for all jobs > webhook in GitHub is NOT generated either. Independently if I enabled or disable Manage hooks options the output is the same: Works only when Jenkins manages hooks (one or more creds specified)
            Hide
            carlosrodlop Carlos Rodríguez López added a comment -

            It is working fine after deep testing

            Show
            carlosrodlop Carlos Rodríguez López added a comment - It is working fine after deep testing

              People

              • Assignee:
                rsandell rsandell
                Reporter:
                carlosrodlop Carlos Rodríguez López
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: