我尝试使用所需图片更新管道。当我将这个配置用于我的第一份工作时:
- name: deploy
plan:
- aggregate:
- get: go-time
trigger: true
- get: github-repo
- task: deploy-<product>
image_resource: &cli
type: docker-image
source:
repository: <repo>/<image>
tag: latest
config:
platform: linux
inputs:
- name: github-repo
outputs:
- name: current-deployment-id
path: deployment_meta
run:
path: github-repo/ci/scripts/deploy.sh
args:
- ...
- ...
我收到此错误:
unknown/extra keys:
- jobs[0].plan[1].image_resource
什么会导致此错误?
答案 0 :(得分:0)
image_resource
键仅存在于任务配置中,因此您的工作应该类似于:
- name: deploy
plan:
- aggregate:
- get: go-time
trigger: true
- get: github-repo
- task: deploy-<product>
config:
platform: linux
image_resource:
type: docker-image
source:
repository: <repo>/<image>
tag: latest
inputs:
- name: github-repo
outputs:
- name: current-deployment-id
path: deployment_meta
run:
path: github-repo/ci/scripts/deploy.sh
args:
- ...
- ...
我不确定&cli
你应该提到的是什么,但你不应该提到它。你应该拥有的只是这里定义的内容:https://concourse-ci.org/single-page.html#image_resource。