Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish multiple github-statuses from the same pipeline job #832

Open
benipeled opened this issue Feb 28, 2022 · 1 comment
Open

Publish multiple github-statuses from the same pipeline job #832

benipeled opened this issue Feb 28, 2022 · 1 comment

Comments

@benipeled
Copy link

What feature do you want to see added?

Suppose I have the following pipeline

pipeline {
    agent any
    stages {
        stage ('Build') {
            /* some build steps here */
        }
        stage ('Test') {
            /* some test steps here */
        }
    }
}

I expect github-checks to look like this:

image

I saw that there is an option to do it by using several different jobs that would update the same PR but
I see no reason (at least in my case) to split the tasks (build, test etc.) into different jobs and maintain
them separately,

The pipeline-github plugin provides the pullRequest.createStatus function to publish the status during
the run which is quite efficient and makes the status update more dynamic, example:

pullRequest.createStatus(
    status: 'success',
    context: 'Build',
    description: 'Build finished Successful',
    targetUrl: "${env.JOB_URL}/console"
)

With such an option, the user can update different statuses in the same pipeline

...and if you're wondering why I'm not using the pipeline-github plugin :) - because I prefer the simplicity
of the ghprb-plugin which allows using one Job for all PRs in all branches in a given repository and doesn't
create jobs for each PR in each Branch (as GitHub Branch Source plugin does which is required by
the pipeline-github plugin)

Upstream changes

No response

@heowc
Copy link

heowc commented Dec 16, 2022

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants