Code Monkey home page Code Monkey logo

dockerhub-notification-plugin's Introduction

CloudBees Docker Hub/Registry Notification

This plugin provides integration between

  • Jenkins and Docker Hub
  • Jenkins and Docker Registry 2.0

, utilizing webhooks to trigger one (or more) Jenkins job(s). This allows you to implement continuous delivery pipelines based on Docker in Jenkins.

Upon receiving a new image notification, Jenkins will trigger all jobs that have the Docker Hub/Registry trigger enabled and use the incoming Docker image as part of the Build. A DockerHub Pull build step is provided to retrieve the latest image from Hub.

Configuring Docker Hub

Configure your Docker Hub repository with a webhook to your public jenkins instance http://JENKINS/dockerhub-webhook/notify

In your hub.docker.com repository, you can find the "webhooks" section and point it to your jenkins instance:

Configuring Docker Registry 2.0

Follow Docker Registry 2.0 documentation on how to configure registry so that it would send notifications to http://JENKINS/dockerregistry-webhook/notify

The simplest viable configuration looks like this:

  notifications:
    endpoints:
      - name: jenkinslistener
        url: http://JENKINS/dockerregistry-webhook/notify
        timeout: 500ms
        threshold: 5
        backoff: 1s

Examples

Payloads submitted by the hub:

Payloads submitted by the registry:

The plugin can be tested with

    curl -X POST -H "Content-Type: application/json" http://localhost:8080/jenkins/dockerhub-webhook/notify -d @src/test/resources/public-repository-payload.json

dockerhub-notification-plugin's People

Contributors

jtnord avatar kohsuke avatar lguminski avatar rsandell avatar

Watchers

 avatar

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.