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

Build status for pipeline building multiple projects and branches #77

Open
hbazan-pp opened this issue Jun 16, 2022 · 2 comments
Open
Labels
enhancement Improvement or new feature

Comments

@hbazan-pp
Copy link

Jenkins and plugins versions report

Environment

I don't have access to jenkins settings

What Operating System are you using (both controller, and any agents involved in the problem)?

I don't have access to jenkins settings

Reproduction steps

  1. Pipeline that builds multiple projects and branches on those projects. I have a description with an html table with build status for the latest build per project/branch
  2. My current parametrization for the icons is: https://jenkins....com/job/my-generic-pipeline/badge/icon?build=lastCompleted:$%7bparams.TARGET=dev%7d,lastCompleted:$%7bparams.PROJECT=my-ui-project%7d where TARGET and PROJECT are build parameters defined either from UI or from webhooks

Expected Results

I expect to get accurate build status per project and branch

Actual Results

All icons are shown, but the status is not accurate. Most of them show PASSING, even for projects that only one of the branches have been executed (i.e. dev did pass, main never ran). Or some have the opposite to what I expected, when dev failed and main succeeded, the icons show the opposite.

Anything else?

Is there a way to filter using environment variables I set during the plan execution? env.SOMETHING is set based on several situations, and I would like to have a build status icon for those too.

@hbazan-pp hbazan-pp added the bug Incorrect or flawed behavior label Jun 16, 2022
@hbazan-pp
Copy link
Author

hbazan-pp commented Jul 7, 2022

If anyone is having similar issues, use import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
def badge = addEmbeddableBadgeConfiguration(id: "someID", subject: "Hi!")
badge.setStatus('failing')

and then display it as < img href='https://jenkins....com/job/your-pipeline/badge/icon?config=someID' />

@hbazan-pp hbazan-pp reopened this Jul 7, 2022
@hbazan-pp
Copy link
Author

Nope. This only keeps the custom badge for the last build, so it won't work for multiple values.

@MarkEWaite MarkEWaite added enhancement Improvement or new feature and removed bug Incorrect or flawed behavior labels Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement or new feature
Projects
None yet
Development

No branches or pull requests

2 participants