-
Notifications
You must be signed in to change notification settings - Fork 257
Open
Description
please enable a feature of optional selection of the agent type. So the same job could run according to the selected type as a parameter, something like that:
when {
expression { params.AGENT_TYPE == 'kubernetes' }
}
agent {
kubernetes {defaultContainer 'my_k8s_template'}
}
when {
expression { params.AGENT_TYPE == 'label' }
}
agent {
label 'my_label'
}
Originally reported by dancho80, imported from: Add an optional agent type to declarative Pipeline
- assignee: abdo123321
- status: Open
- priority: Minor
- component(s): pipeline-model-definition-plugin
- resolution: Unresolved
- votes: 0
- watchers: 1
- imported: 2025-12-06
Raw content of original issue
please enable a feature of optional selection of the agent type. So the same job could run according to the selected type as a parameter, something like that:
when { expression { params.AGENT_TYPE == 'kubernetes' } } agent { kubernetes {defaultContainer 'my_k8s_template'} } when { expression { params.AGENT_TYPE == 'label' } } agent { label 'my_label' }