从管道提交的最佳方式是什么。作业从不同的仓库中提取并进行一些更改+构建 - 然后将新文件推送到不同的仓库。这可能吗?
答案 0 :(得分:1)
您应该使用git-resource。
你想要做的基本步骤是
您的管道配置应如下所示:
jobs:
- name: pull-code
plan:
- get: git-resource-pull
- get: git-resource-push
- task: do-something
inputs:
- name: git-resource-pull
run:
path: /bin/bash
args:
- -c
- |
pushd git-resource-pull
// do something
popd
// move the code from git-resource-pull to git-resource-push
- put: git-resource-push
params: {repository: git-resource-push}
resources:
- name: git-resource-pull
type: git
source:
uri: https://github.com/team/repository-1.git
branch: master
- name: git-resource-push
type: git
source:
uri: https://github.com/team/repository-2.git
branch: master