1

I have some requirement where I have 2 nodes in jenkins say

devl
prod

In some situation i need user to select from dropdown or type as string the node name on which that job will run but its not taking user input in "Restrict where this project can be run" option .

user1427944
  • 111
  • 3

1 Answers1

0

You can do this with Pipeline scripts. An example might look something like this:

properties([
  parameters([
    stringParam(
      name: 'environment',
      defaultValue: 'dev', 
      description: 'Which build environment to run on.',
    ),
  ]),
])

node(params.environment) {
  // your build script here
}
jayhendren
  • 917
  • 4
  • 11