语法错误:未终止引用的字符串jenkins管道
我正在使用Jenkins Pipeline中使用Helmfile运行Helm图表。我能够设置Jenkins代理来使用此Docker Image Jenkinsciinfra/helmfile,来自 htttps:// github。 com/jenkins-infra/docker-helmfile 。以下是我的管道,
pipeline{
agent {
label 'helm'
}
stages{
stage("helm version") {
steps {
sh "helmfile version"
}
}
}
}
我得到了此响应
Running on helm-thxmv in /home/jenkins/agent/workspace/helmfile
[Pipeline] {
[Pipeline] stage
[Pipeline] { (helm version)
[Pipeline] sh
+ helmfile --version
/usr/local/bin/helmfile: line 1: syntax error: unterminated quoted string
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 2
Finished: FAILURE
,我尝试运行SH“ Helm版本”,并获得成功响应。我在这里错过什么吗?
我是詹金斯的新手
I'm working on running helm charts using helmfile in Jenkins pipeline. I was able to setup Jenkins Agent to use this docker image jenkinsciinfra/helmfile from https://github.com/jenkins-infra/docker-helmfile. below is my pipeline
pipeline{
agent {
label 'helm'
}
stages{
stage("helm version") {
steps {
sh "helmfile version"
}
}
}
}
I get this response
Running on helm-thxmv in /home/jenkins/agent/workspace/helmfile
[Pipeline] {
[Pipeline] stage
[Pipeline] { (helm version)
[Pipeline] sh
+ helmfile --version
/usr/local/bin/helmfile: line 1: syntax error: unterminated quoted string
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 2
Finished: FAILURE
I have tried running sh "helm version" and i get success response. Am I missing anything here?
I'm very new to Jenkins
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能够解决,Docker构建中的Helmfile容器是越野车,我必须用
I was able to resolve, The helmfile container in the docker build was buggy, I had to replace the helmfile section with