githubCreateIssue¶
Create a new GitHub issue.
Prerequisites¶
You need to create a personal access token within GitHub and add this to the Jenkins credentials store.
Please see GitHub documentation for details about creating the personal access token.
Parameters¶
Overview¶
Name | Mandatory | Additional information |
---|---|---|
body | yes | |
owner | yes | |
repository | yes | |
script | yes | |
title | yes | |
token | yes | githubTokenCredentialsId ) |
apiUrl | no | |
verbose | no | activates debug output |
Details¶
apiUrl¶
Set the GitHub API url.
Scope | Details |
---|---|
Aliases | githubApiUrl |
Type | string |
Mandatory | no |
Default | https://api.github.com |
Secret | no |
Configuration scope |
|
Resource references | none |
body¶
Defines the content of the issue, e.g. using markdown syntax.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | $PIPER_body (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
owner¶
Name of the GitHub organization.
Scope | Details |
---|---|
Aliases | githubOrg |
Type | string |
Mandatory | yes |
Default | $PIPER_owner (if set) |
Secret | no |
Configuration scope |
|
Resource references | commonPipelineEnvironment: reference to: github/owner |
repository¶
Name of the GitHub repository.
Scope | Details |
---|---|
Aliases | githubRepo |
Type | string |
Mandatory | yes |
Default | $PIPER_repository (if set) |
Secret | no |
Configuration scope |
|
Resource references | commonPipelineEnvironment: reference to: github/repository |
script¶
Jenkins-specific: Used for proper environment setup.
The common script environment of the Jenkinsfile running. Typically the reference to the script calling the pipeline step is provided with the this
parameter, as in script: this
. This allows the function to access the commonPipelineEnvironment
for retrieving, e.g. configuration parameters.
Scope | Details |
---|---|
Aliases | - |
Type | Jenkins Script |
Mandatory | yes |
Default | |
Secret | no |
Configuration scope |
|
Resource references | none |
title¶
Defines the title for the Issue.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | $PIPER_title (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
token¶
GitHub personal access token as per https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line.
Scope | Details |
---|---|
Aliases | - githubToken - access_token |
Type | string |
Mandatory | yes |
Default | $PIPER_token (if set) |
Secret | yes |
Configuration scope |
|
Resource references | Jenkins credential id: id: githubTokenCredentialsId Vault paths:
|
verbose¶
verbose output
Scope | Details |
---|---|
Aliases | - |
Type | bool |
Mandatory | no |
Default | false |
Possible values | - true - false |
Secret | no |
Configuration scope |
|
Resource references | none |
githubTokenCredentialsId¶
Jenkins-specific: Used for proper environment setup. See using credentials for details.
Jenkins 'Secret text' credentials ID containing token to authenticate to GitHub.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Configuration scope |
|
Description¶
This step allows you to create a new GitHub issue.
You will be able to use this step for example for regular jobs to report into your repository in case of new security findings.
Usage¶
We recommend to define values of step parameters via config.yml file. In this case, calling the step is reduced to one simple line.
Calling the step can be done either via the Jenkins library step or on the command line.
Jenkins Pipeline¶
library('piper-lib-os') githubCreateIssue script: this
Command Line¶
piper githubCreateIssue