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

[JENKINS-72958] expose buildable property to API #441

Merged
merged 1 commit into from
Nov 16, 2024
Merged

Conversation

jtnord
Copy link
Member

@jtnord jtnord commented Nov 14, 2024

jenkinsci/branch-api-plugin#468 but on the base class that defines isBuildable

See JENKINS-73425.

Obsoletes jenkinsci/branch-api-plugin#468 (untested)

Proposed changelog entries

  • Expose buildable for ComputedFolders to the REST API

Submitter checklist

  • JIRA issue is well described
  • Changelog entry appropriate for the audience affected by the change (users or developer, depending on the change).
    * Use the Internal: prefix if the change has no user-visible impact (API, test frameworks, etc.)
  • Appropriate autotests or explanation to why this change has no tests

@jglick
Copy link
Member

jglick commented Nov 14, 2024

(pending testing as per jenkinsci/branch-api-plugin#468 (comment))

@MarkRx
Copy link

MarkRx commented Nov 15, 2024

@jtnord tested works thanks!

http://localhost:8080/jenkins/job/folder1/job/pipeline1/api/json?tree=buildable

Enabled:

{
    _class: "org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject",
    buildable: true
}

Disabled:

{
    _class: "org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject",
    buildable: false
}

Note child jobs will have buildable=true even if the parent is disabled (buildable=false). The buildable property doesn't propagate so the parent job needs to be checked. This is existing behavior and unrelated to exposing the buildable property.

@jtnord jtnord merged commit 4ed5cc9 into master Nov 16, 2024
18 checks passed
@jtnord jtnord deleted the JENKINS-72958 branch November 16, 2024 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants