generic-webhook-trigger-plugin | HTTP request , extract any values from JSON or XML | Plugin library

 by   jenkinsci Java Version: generic-webhook-trigger-1.86.2 License: No License

kandi X-RAY | generic-webhook-trigger-plugin Summary

kandi X-RAY | generic-webhook-trigger-plugin Summary

generic-webhook-trigger-plugin is a Java library typically used in Plugin, Jira applications. generic-webhook-trigger-plugin has no bugs, it has no vulnerabilities, it has build file available and it has low support. You can download it from GitHub.

This is a Jenkins plugin that can:.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              generic-webhook-trigger-plugin has a low active ecosystem.
              It has 376 star(s) with 148 fork(s). There are 12 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 8 open issues and 226 have been closed. On average issues are closed in 148 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of generic-webhook-trigger-plugin is generic-webhook-trigger-1.86.2

            kandi-Quality Quality

              generic-webhook-trigger-plugin has 0 bugs and 0 code smells.

            kandi-Security Security

              generic-webhook-trigger-plugin has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              generic-webhook-trigger-plugin code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              generic-webhook-trigger-plugin does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              generic-webhook-trigger-plugin releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              generic-webhook-trigger-plugin saves you 2097 person hours of effort in developing the same functionality from scratch.
              It has 4635 lines of code, 343 functions and 61 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed generic-webhook-trigger-plugin and discovered the below as its top functions. This is intended to give you an instant insight into generic-webhook-trigger-plugin implemented functionality, and help decide if they suit your requirements.
            • Build the environment for the given run
            • Checks if the run is not logged in
            • Gets the post content
            • Returns the resolved variables
            • Whether the variables should be printed
            • Is print post content
            • Command line tool
            • Downloads a file from an URL
            • Checks if the provided credentials id is valid
            • Finds the credential with the given credentials id
            • Checks to see if the request should be processed
            • Fill a list box with the credentials id items
            • Registers this form
            Get all kandi verified functions for this library.

            generic-webhook-trigger-plugin Key Features

            No Key Features are available at this moment for generic-webhook-trigger-plugin.

            generic-webhook-trigger-plugin Examples and Code Snippets

            No Code Snippets are available at this moment for generic-webhook-trigger-plugin.

            Community Discussions

            Trending Discussions on generic-webhook-trigger-plugin

            QUESTION

            Trigger Jenkins build when pull request is merged in Github
            Asked 2020-Sep-30 at 14:22

            This should be an easy, out-of-the-box configuration in Jenkins but I haven't found anything straightforward on the internet. All I want to do is a trigger a build ONLY when a pull request i merged in our Github repo.

            To start with, Github aggregates almost all activity around the pull request into one webhook (versus bitbucket which allows you to differentiate between actions).

            On the Jenkins side I've seen posts point towards the Generic Webhook Plugin which allows you to ingest the json of the webhook and create variables, however from here it looks like those need to be used in a script in order to trigger/not trigger a build.

            Github Pull Request Build is another popular plugin, but again there is nothing explicit that states "only trigger this build when a PR is merged" or even seems to give the option of looking for a specific value in the webhook json.

            Unless there are other plugins out there I haven't found the best option (i.e. least configuration to just get the build started) is to configure the GitHub hook trigger for GITSCM polling in Jenkins and on the Github side send the webhook only on push events... however this isn't the exact behavior we're looking for.

            Right now this is all being done via the UI, and it's been awhile since I've used Jenkins so maybe the declarative pipeline infrastructure has passed the UI by, but it seems like this should be much more intuitive. Can someone explain the easiest implementation they've found, using Jenkins and Github, to trigger a build ONLY when a pull request is merged to a specific branch?

            ...

            ANSWER

            Answered 2020-Sep-24 at 21:08

            you can configure the generic webhook trigger plugin to parse the payload json coming from the github.
            first make sure that you have checked Pull requests in github webhook configuration

            now you can look up for the merged key in webhook json, more details given at this url: https://developer.github.com/webhooks/event-payloads/#pull_request

            first you need to check for the action key if it is closed then check for the merged key. according to the official documentation If the action is closed and the merged key is false, the pull request was closed with unmerged commits. If the action is closed and the merged key is true, the pull request was merged.

            now configure the generic webhook to read they action and merged key from the payload in your jenkins pipline you can follow this example: https://github.com/jenkinsci/generic-webhook-trigger-plugin/blob/master/sandbox/multibranch.jenkinsfile

            in your pipeline you can use these keys to check if you want to trigger the build or not.

            for triggering the build on merge on a specific branch you can use environment variables in jenkins pipeline the env.BRANCH_NAME will tell you what branch you got the commit from

            Source https://stackoverflow.com/questions/64050510

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install generic-webhook-trigger-plugin

            If you need the resolved values in pre build steps, like git clone, you need to add a parameter with the same name as the variable.

            Support

            If you want to fiddle with the plugin, you may use this repo: https://github.com/tomasbjerre/jenkins-configuration-as-code-sandbox.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/jenkinsci/generic-webhook-trigger-plugin.git

          • CLI

            gh repo clone jenkinsci/generic-webhook-trigger-plugin

          • sshUrl

            git@github.com:jenkinsci/generic-webhook-trigger-plugin.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link