Skip to content

Updating another job's thresholds based on this job #75

@nrchandan

Description

@nrchandan

I use two Jenkins jobs in my project - one for building PRs and the other for building the master branch. I have the violations plugin set up in both the jobs, and both use the recently released ratcheting feature. However, this leads to frequent build failures when PRs compete to fix violations.

For example, one PR fixes some violations which automatically updates the threshold (say 10 pylint issues fixed out of 130 so now 120 is the new threshold), but the other PR only updates the README but now fails since the new threshold of 120 is lower than the 130 of the codebase on which this commit is based.

Ideally, I would like to disable ratcheting in the merge job and keep it enabled in the master job, but have the master job post the new thresholds to the merge job on successful build. Does it make sense? Is there a "right" way to do this? Is it possible to update the parameters of one Jenkins job from another using the Jenkins Java API, or does it necessitate the use of Jenkins REST API or file IO?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions