Kubernetes 多行脚本和多个脚本之间的Gitlab CI差异

Kubernetes 多行脚本和多个脚本之间的Gitlab CI差异,kubernetes,gitlab,gitlab-ci,kubernetes-helm,continuous-deployment,Kubernetes,Gitlab,Gitlab Ci,Kubernetes Helm,Continuous Deployment,对于GitLab CI来说相当陌生,我正试图通过Helm在Kubernetes集群上进行部署。 我有这个: image: docker:stable deploy: stage: deploy image: name: alpine/helm:3.4.1 script: - echo "Deploying to production" - helm list --all-namespaces 它失败于: Error: unknown c

对于GitLab CI来说相当陌生,我正试图通过Helm在Kubernetes集群上进行部署。 我有这个:

image: docker:stable

deploy:
  stage: deploy
  image:
    name: alpine/helm:3.4.1
  script:
    - echo "Deploying to production"
    - helm list --all-namespaces
它失败于:

Error: unknown command "sh" for "helm"
而且
echo
不会被回显,但是,如果我要删除
echo
行,
helm
cmd将成功执行


我想我是在问如何让多行脚本运行?gitlab runner如何执行
脚本中提供的一系列命令:
数组?

脚本中的每个条目都在
sh
shell中运行

sh -x 'echo "Deploying to production"'
您正在使用的
alpine/helm
图像包含
helm
这意味着gitlab试图运行的
sh
命令将作为参数附加到入口点(例如
helm sh-x'echo'部署到生产“

deploy:
  stage: deploy
  image:
    name: alpine/helm:3.4.1
  entrypoint: [""]
  script:
    - echo "Deploying to production"