Получение Не найдено такое поле: field java.lang.String sinput error во время работы Jenkinsfile
Я разработал Jenkinsfile, который будет принимать пользовательский ввод и далее будет запускать команду на удаленной машине, принимающую пользовательский ввод.в качестве переменной
stage {
stage("Interactive_Input") {
steps {
script {
// Variables for input
//def inputConfig apiinput
//def inputTest apilog
def apiinput
// Get the input
def userInput = input(
id: 'userInput', message: 'This is my project',
parameters: [
string(defaultValue: 'None',
description: 'Enter the name of the service',
name: 'sinput'),
])
// Save to variables. Default to empty string if not found.
apiinput = userInput.sinput?:''
// Echo to console
//echo("IQA Sheet Path: ${inputConfig}")
sh 'ssh king@1.2.3.4 "docker service logs ${apiinput} --raw"'
}
}
}
}
}