jenkinsci / jenkinsci/github-checks-plugin
Make the configuration independent from SCM
- Dominant language
- Java
- Stars
- 89
- Forks
- 50
- Avg merge
- 13h 55m
- Merged PRs (30d)
- 7
Description
### What feature do you want to see added?
I tried to simplify our Jenkinsfile from sth. like this (already simplified):
```groovy
pipeline {
agent {
label 'built-in'
}
options {
skipDefaultCheckout()
}
stages {
stage('Build') {
parallel {
stage('Windows') {
stages {
stage('msvc2017') {
steps {
publishChecks(name: 'MSVC 2017', status: 'IN_PROGRESS', summary: 'running')
build job: 'msvc2017'
}
post {
success {
publishChecks(name: 'MSVC 2017', status: 'COMPLETED', summary: 'success', conclusion: 'SUCCESS')
}
failure {
publishChecks(name: 'MSVC 2017', status: 'COMPLETED', summary: 'failed', conclusion: 'FAILURE')
}
unstable {
publishChecks(name: 'MSVC 2017', status: 'COMPLETED', summary: 'unstable', conclusion: 'FAILURE')
}
aborted {
publishChecks(name: 'MSVC 2017', status: 'COMPLETED', summary: 'canceled', conclusion: 'CANCELED')
}
}
}
stage('msvc2022') {
when {
branch 'main'
}
steps {
publishChecks(name: 'MSVC 2022', status: 'IN_PROGRESS', summary: 'running')
build job: 'msvc2022'
}
post {
success {
publishChecks(name: 'MSVC 2022', status: 'COMPLETED', summary: 'success', conclusion: 'SUCCESS')
}
failure {
publishChecks(name: 'MSVC 2022', status: 'COMPLETED', summary: 'failed', conclusion: 'FAILURE')
}
unstable {
publishChecks(name: 'MSVC 2022', status: 'COMPLETED', summary: 'unstable', conclusion: 'FAILURE')
}
aborted {
publishChecks(name: 'MSVC 2022', status: 'COMPLETED', summary: 'canceled', conclusion: 'CANCELED')
}
}
}
}
}
stage('Linux') {
stages {
stage('clang') {
when {
branch 'dev'
}
steps {
publishChecks(name: 'clang', status: 'IN_PROGRESS', summary: 'running')
build job: 'clang'
}
post {
success {
publishChecks(name: 'clang', status: 'COMPLETED', summary: 'success', conclusion: 'SUCCESS')
}
failure {
publishChecks(name: 'clang', status: 'COMPLETED', summary: 'failed', conclusion: 'FAILURE')
}
unstable {
publishChecks(name: 'clang', status: 'COMPLETED', summary: 'unstable', conclusion: 'FAILURE')
}
aborted {
publishChecks(name: 'clang', status: 'COMPLETED', summary: 'canceled', conclusion: 'CANCELED')
}
}
}
stage('gcc') {
steps {
publishChecks(name: 'gcc', status: 'IN_PROGRESS', summary: 'running')
build job: 'gcc'
}
post {
success {
publishChecks(name: 'gcc', status: 'COMPLETED', summary: 'success', conclusion: 'SUCCESS')
}
failure {
publishChecks(name: 'gcc', status: 'COMPLETED', summary: 'failed', conclusion: 'FAILURE')
}
unstable {
publishChecks(name: 'gcc', status: 'COMPLETED', summary: 'unstable', conclusion: 'FAILURE')
}
aborted {
publishChecks(name: 'gcc', status: 'COMPLETED', summary: 'canceled', conclusion: 'CANCELED')
}
}
}
}
}
}
}
}
}
```
To:
```groovy
pipeline {
agent {
label 'built-in'
}
options {
skipDefaultCheckout()
}
stages {
stage('Build') {
parallel {
stage('Windows') {
stages {
stage('msvc2017') {
steps {
withChecks('MSVC 2017') {
build job: 'msvc2017'
}
}
}
stage('msvc2022') {
when {
branch 'main'
}
steps {
withChecks('MSVC 2022') {
build job: 'msvc2022'
}
}
}
}
}
stage('Linux') {
stages {
stage('clang') {
when {
branch 'dev'
}
steps {
withChecks('clang') {
build job: 'clang'
}
}
}
stage('gcc') {
steps {
withChecks('gcc') {
build job: 'gcc'
}
}
}
}
}
}
}
}
}
```
But somehow GitHub sees that the jobs are starting and even get notification in case of an error, but never a success state. So I wanted to check whether `Verbose Console log` could help - but this configuration depends on the `checkout` step, which we were skipping in our case.
So it would be nice, when there is another way to enable debug log - maybe as pipeline option (not sure whether `Skip GitHub Branch Source` could also be independent of the checkout).
### Upstream changes
_No response_
### Are you interested in contributing this feature?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.