jenkinsci / jenkinsci/nodelabelparameter-plugin

[JENKINS-69820] Usage in jenkinsfiles

Open
#577 4 comments 0 reactions 0 assignees View on GitHub
component:nodelabelparameter-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
28
Forks
59
Avg merge
1h 24m
Merged PRs (30d)
3

Description

I wish for an implementation of this plugin, that I can use in my Jenkinsfiles. Right now it's either not possible, or not straight forward, to configure a node/label parameter in the parameters-block of a Jenkinsfile.

If the functionality exists, extending the documenation would be appreciated.

I tried it this way:

parameters {

        $class: 'NodeParameterValue'(name: 'nodeName',labels: ['label1', 'label2'], nodeEligibility: [$class: 'IgnoreOfflineNodeEligibility'])
    }

but Jenkins only accepts the "standard" classes for parameters.

---
Originally reported by ger_senshi, imported from: Usage in jenkinsfiles


  • status: Open
  • priority: Minor
  • component(s): nodelabelparameter-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 3
  • imported: 20251210-235911

Raw content of original issue

I wish for an implementation of this plugin, that I can use in my Jenkinsfiles. Right now it's either not possible, or not straight forward, to configure a node/label parameter in the parameters-block of a Jenkinsfile.

If the functionality exists, extending the documenation would be appreciated.

I tried it this way:



parameters {

        $class: 'NodeParameterValue'(name: 'nodeName',labels: ['label1', 'label2'], nodeEligibility: [$class: 'IgnoreOfflineNodeEligibility'])
    }


but Jenkins only accepts the "standard" classes for parameters.

1 attachment

- [image-2025-01-27-14-36-42-616.png](https://issues.jenkins.io/secure/attachment/63861/image-2025-01-27-14-36-42-616.png)
> ![image-2025-01-27-14-36-42-616.png](https://issues.jenkins.io/secure/attachment/63861/image-2025-01-27-14-36-42-616.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.