【问题标题】:Jenkins Pipeline Stash not Stashing fileJenkins Pipeline Stash 不存储文件
【发布时间】:2019-09-26 23:26:34
【问题描述】:

我第一次尝试使用 Jenkins stash/unstash,但我无法成功存储我的文件。

这是文件的路径:

/opt/cicd/jenkins/workspace/DEVOPS/stageParams.yaml

这是我的存储命令:

{stash name: "config", includes: "/DEVOPS/stageParams.yaml"}

我不断收到此错误:

ERROR:No files included in stash 'config'

请帮忙!

【问题讨论】:

  • 路径应该是DEVOPS/stageParams.yaml
  • @uncletall 是对的。在类似 unix 的系统中,“/”指的是根目录(/opt 所在的位置)。当您使用 /DEVOPS/... 这样的路径时,您会告诉 jenkins 在根级别查找 DEVOPS 文件夹。当您已经在工作区中时(我假设),您可以像 DEVOPS/stageParams.yaml 一样使用它

标签: jenkins jenkins-pipeline declarative


【解决方案1】:

/opt/cicd/jenkins/workspace/DEVOPS/stageParams.yaml
/DEVOPS/stageParams.yaml
上面的两条路径是不同的。
让我们试试: {stash name: "config", includes: "DEVOPS/stageParams.yaml"}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-19
    • 2019-09-20
    • 1970-01-01
    • 1970-01-01
    • 2018-02-23
    • 2018-11-02
    相关资源
    最近更新 更多