现在,我有一个Concourse管道脚本,可以从git repo更新dockerhub图像.我是根据以下tutorial创建的.我在此git repo中有几个docker容器,我希望能够通过它们进行迭代以针对每个不同的容器重复docker-image资源和图像更新作业,以制作我的脚本更干净,更易读.这是我当前的脚本:
---
resources:
- name: resource-docker
type: git
source:
uri: https://github.com/$MYUSER/$MYREPO.git
branch: master
# docker-image resources
- name: first-container
type: docker-image
source:
repository: $MYUSER/first-container
- name: second-container
type: docker-image
source:
repository: $MYUSER/second-container
jobs:
# image-update jobs
- name: first-container-image-update
public: true
serial: true
plan:
- get: resource-docker
- put: first-container
params:
build: resource-docker/first-container
- name: second-container-image-update
public: true
serial: true
plan:
- get: resource-docker
- put: second-container
params:
build: resource-docker/second-container
如何更改此设置,以便仅创建一个docker-image资源和image-update作业?
最佳答案
原文链接:/docker/532675.html