Giter Club home page Giter Club logo

pipeline-githubnotify-step-plugin's Introduction

Pipeline GitHub Notify Step Plugin

This step allows a pipeline job to notify a status for any GitHub commit.

Intended for jobs that want to notify GitHub of any desired event with complete control over the notification content. Including context, status or target url.

The available parameters are:

  • credentialsId: The id of the github's credentials to use, must be of type UsernameAndPassword
  • status: The status to send, one of SUCCESS, FAILURE, ERROR or PENDING
  • description: The description that will appear at the notification
  • context: The notifications context, GH uses the context to diferentiate notifications (optional, jenkins/githubnotify is used by default)
  • sha: The sha that identifies the commit to notify status
  • repo: The repo that ows the commit we want to notify
  • account: The account that owns the repository;
  • gitApiUrl: GitHub Enterprise instance API URL (optional, https://api.github.com is used by default)
  • targetUrl: The targetUrl for the notification

Inferring parameter values

It may be cumbersome to specify all parameters, so this step will try to infer some of them if and only if are not provided. The parameters that can be inferred are:

  • credentialsId Is inferred from the SCM used on the parent project
  • repo is inferred from the Git Build Data of the current build
  • sha is inferred from the Git Build Data of the current build
  • account is inferred from the Git Build Data of the current build

Please note that infer will only work if you have Git Build Data and the parent of the Build has one and only one SCM, for example you created a Multibranch Pipeline project and you are using a Jenkinsfile build mode. If you find problems when inferring please specify the required data explicitly. (You can access this data on your Jenkinsfile by using the appropriate env variables)

Example

githubNotify account: 'raul-arabaolaza', context: 'Final Test', credentialsId: 'raul-github',
    description: 'This is an example', repo: 'acceptance-test-harness', sha: '0b5936eb903d439ac0c0bf84940d73128d5e9487'
    , status: 'SUCCESS', targetUrl: 'https://my-jenkins-instance.com'

Example with data inference and default values

githubNotify description: 'This is a shorted example',  status: 'SUCCESS'

pipeline-githubnotify-step-plugin's People

Contributors

raul-arabaolaza avatar recena avatar

Watchers

 avatar  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.