Coder Social home page Coder Social logo

outbound-webhook-plugin's Introduction

Jenkins WebHook plugin

Outbound WebHook for Jenkins build events

Configuration

Configure your Jenkins URL in Jenkins > Configuration section:

Add Outbound Webhook notification to Post-build Actions:

Sample payload

{
  "buildName": "#16",
  "buildUrl": "http://my-jenkins-url.com/job/test%20job/16/",
  "event": "success",
  "projectName": "test job",
  "buildVars": "..."
}

event has four possible values: start, success, failure, unstable.

Compile

./gradlew build

# or within a docker image:
./gradlew-docker build

Test

./gradlew test

# or within a docker image:
./gradlew-docker test

Run server

./gradlew server

# or within a docker image, port 8080 is forwarded to the docker host:
./gradlew-docker server

Visit http://localhost:8080

The first time you visit it, you are required to go through the setup process. Please don't install any third-party plugins. This plugin we currently working on will be installed by default.

Admin user

I use the following credential for testing: admin/admin

Of course you don't have to copy my example.

publish

Create a tag on GitHub: outbound-webhook-plugin-<version>.

Create file ~/.jenkins-ci.org with the following content:

userName=username
password=password

Note: The credentials are from https://accounts.jenkins.io/.

Run:

./gradlew clean publish

# or within a docker image:
./gradlew-docker clean publish

outbound-webhook-plugin's People

Contributors

jamiewastin avatar jc21 avatar tylerlong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

outbound-webhook-plugin's Issues

Must be compatible with JDK11

Official Jenkins docker images are based on JDK11 so it's impossible to use this plugin:

Some plugins could not be loaded due to unsatisfied dependencies. Fix these issues and restart Jenkins to re-enable these plugins.

Dependency errors:

Outbound WebHook for build events (0.3.0)
Java (14) or higher required

Use Environment Variable or Parameter Variable as part of url

What feature do you want to see added?

In the webhook url, allow us to pass some variable (parameters) or environment variable like ${BUILD_NUMBER}.

image

We tried passing ${BUILD_NUMBER} in the url, and this is the output: it didn't render the build number into the actual build number.

image

Upstream changes

No response

Add basic auth for webhooks

Hey -- it looks like this is missing any ability to hit webhooks requiring basic auth. Just a suggestion.

Not showing in Post Build actions

Jenkins and plugins versions report

Jenkins 2.370
After fresh installing plugin not showing in Post Build actions.
Plugin: Outbound WebHook for build events 0.3.0

image

What Operating System are you using (both controller, and any agents involved in the problem)?

Windows

Reproduction steps

Install plugin

Expected Results

.

Actual Results

.

Anything else?

No response

How to use?

Hi, I'm a beginner with Jenkins. I wish to call an external API whenever my Jenkins build/deploy is complete. Could you point me to the docs, so I can use this tool?

Don't load in last jenkins server

Hi! After the last update module doesn't load in the last jenkins docker image based on Centos latest.
Java version:

openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

Is there any way to fix it?

UPD#1: Jenkins doesn't support java 14.
Documentation: https://www.jenkins.io/doc/administration/requirements/java/
Error:


SEVERE: Running with Java class version 58 which is not in the list of supported versions: [52, 55]. Run with the --enable-future-java flag to enable such behavior. See https://jenkins.io/redirect/java-support/
--
  | java.lang.UnsupportedClassVersionError: 58.0
  | at Main.verifyJavaVersion(Main.java:174)
  | at Main.main(Main.java:142)
  |  
  | Jenkins requires Java versions [8, 11] but you are running with Java 14 from /usr/lib/jvm/java-14-openjdk-14.0.1.7-2.rolling.el8.x86_64
  | java.lang.UnsupportedClassVersionError: 58.0
  | at Main.verifyJavaVersion(Main.java:174)
  | at Main.main(Main.java:142)

UPD#2: Plugin error:

java.io.IOException: Failed to load: Outbound WebHook for build events (0.3.0)
 - Java (14) or higher required

cc @tylerlong @jamiewastin @jc21

Where can I get the plug-in logging?

I run this plug-in as the post-build action, while I get nothing from build console log saying webhook is triggered or something like that. Where can I get something?

Cancel event

Hi there!

Are there any plans to add support "cancel"-event?

Does not work with API-scheduled builds

If I create a build with parameters manually in Jenkins UI then everything works fine. If I create one via Jenkins API (POST request to buildWithParameters), the webhook is never triggered and I don't get the information about the build.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.