Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jenkinsci/pipeline-githubnotify-step-plugin
A pipeline step to notify a status for any GitHub commit
https://github.com/jenkinsci/pipeline-githubnotify-step-plugin
github jenkins-pipeline
Last synced: 2 days ago
JSON representation
A pipeline step to notify a status for any GitHub commit
- Host: GitHub
- URL: https://github.com/jenkinsci/pipeline-githubnotify-step-plugin
- Owner: jenkinsci
- License: mit
- Created: 2016-11-29T15:00:43.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-20T13:57:50.000Z (almost 2 years ago)
- Last Synced: 2025-01-29T14:39:24.282Z (8 days ago)
- Topics: github, jenkins-pipeline
- Language: Java
- Homepage: https://plugins.jenkins.io/pipeline-githubnotify-step/
- Size: 91.8 KB
- Stars: 32
- Watchers: 5
- Forks: 24
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PLEASE DO NOT USE THIS PLUGIN, USE https://github.com/jenkinsci/github-checks-plugin INSTEAD
# 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
and contain the password or a personal access token. Which one of them depends on the server configuration
* _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'
```