从管道提交的最佳方式是什么。作业从不同的仓库中提取并进行一些更改+构建 - 然后将新文件推送到不同的仓库。这可能吗?
问问题
1016 次
1 回答
1
您应该使用git-resource。
你想要做的基本步骤是
- 从 repo 拉到容器中。
- 用代码做一些事情
- 将新代码移动到不同的容器中
- 将该新容器的内容推送到不同的 git-repository
您的管道配置应如下所示:
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
于 2017-01-31T20:26:46.523 回答