jenkins - 未找到此类字段:运行我的 jenkinsfile 时出现字段 java.lang.String sinput 错误
问题描述
No such field found: field java.lang.String sinput
运行我的 Jenkinsfile 时出错。
我开发了一个 Jenkinsfile,它将接受用户输入,并进一步在远程机器上运行一个命令,将用户输入作为变量
stages {
stage("Interactive_Input") {
steps {
script {
def apiinput
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?:''
}
}
}
}
解决方案
推荐阅读
- neo4j - Neo4j/Cypher:提取 StringArray 的最后一项(neo4j 称之为)
- c++ - 在 TFHE(全快速同态加密)上执行除法
- javascript - 如何在 rails5.1.6 中使用 AJAX 上传图片
- regression - 如何处理缺乏经验的客户满意度分数作为缺失值?
- ios - Swift交替UITableViewCell渐变颜色
- python - 在 Python 中以特定间隔将数据附加到 DataFrame
- typescript - 用打字稿正确使用黄瓜?
- jekyll - jekyll 中的单反引号内联代码块,选择语言
- javascript - 将 Google 云端硬盘内容流式传输到 Chromecast
- office-js - 如何使用。officejs中的Isempty