语法错误:未终止的引号字符串Jenkins Pipeline



我正在Jenkins管道中使用helmfile运行舵图。我能够设置Jenkins代理使用这个docker映像jenkinsciinfra/helmfile从https://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 version"我得到成功响应。我错过什么了吗?

我对Jenkins很陌生

我能够解决,docker构建中的helmfile容器有bug,我不得不将helmfile部分替换为

ARG HELMFILE_VERSION=0.144.0
RUN wget "https://github.com/roboll/helmfile/releases/download/v${HELMFILE_VERSION}/helmfile_linux_amd64" --quiet --output-document=/usr/local/bin/helmfile 
&& chmod +x /usr/local/bin/helmfile 
&& helmfile --version | grep -q "${HELMFILE_VERSION}"

相关内容

  • 没有找到相关文章

最新更新