Hello
I would like to implement in jenkins pipeline method to select agent type like
docker, dockerfile, kubernetes, label, none
in the nutshell
if ( $TESTS == “Bitbucket”) {
agent {
kubernetes { yamlFile ‘rc/config/default/node-template.yaml’ // separate yaml file defining the pod template
defaultContainer ‘python’ // the default container where all task will be exceuted, unless other specified
}
}
}
else {
agent none
}
Is it possible ???
Please drop me any hints ?