如何在concourse中链接yaml文件?

问题描述 投票:0回答:1

在我的任务中,我有

file: tasks/build-task-config.yml

unknown artifact source: 'tasks' in task config file path 'tasks/build-task-config.yml'

我通过docker-compose运行concourse。

  • ci
    • pipeline.yml
    • 任务
      • 建立-任务-配置.yml

上面是我的目录结构。

这是我运行fly的方式

fly -t tutorial set-pipeline -c ./ci/main-pipeline.yml -p test-frontend

  1. 我如何解决这个问题?
  2. 路径在Concourse中如何工作?

编辑:我试过用路径 ci/tasks/build-task-config.yml 但也不行

docker devops concourse
1个回答
0
投票

你需要给任务输入一个名为 tasks. 这可能来自于 get: 步骤,或作为前一个任务的输出。很可能您有一个 get 与您的repo一起使用,其中有这样的代码(让我们假设它叫做 source). 如果是这样,那么你的任务应该是这样的

- task: build-task-config # Or whatever name you want
  file: source/ci/tasks/build-task-config.yml
  ...

一切都要相对于任务中的一个输入,如果它不是基础图像的一部分。

© www.soinside.com 2019 - 2024. All rights reserved.