我开发了一个shell脚本,可以帮助我将source.yml文件添加到所有的repos中,但是我遇到了一些障碍
需要推送到所有的git仓库(100个),即如何将source.yml文件添加到所有的仓库中。 如何根据 repo 名称更新元数据中的变量 1,2 假设 repo 名称为 developer,那么 source.yaml 文件中的元数据,变量 1,2 应该替换为 developer。
这里的情况是
我需要将一个source.yml文件添加到多个资源库(100个)中,配置可变。
In .yml file, metadata consists of projectKey(variable-1(Current-reponame)) & FriendlyName(variable-2(current-reponame))where these variable values should change according to repo name
apiVersion: v9
metadata:
askId: ABCDE123-45678
caAgileId: ABC
//com.ABC is common for all repos (yourproduct.yourApp.yourComponent)
variable-1(current repo name)
// (YourApp-SomeComponent) - variable-2(current repo name)
projectKey: com.ABC.yourproduct.yourApp.yourComponent
FriendlyName: YourApp-SomeComponent
componentType: code
targetQG: GATE_77
请帮助我,如何将.yml文件推送到多个机构的多个存储库中
#!/bin/bash
cd $baselocation "https://github.com/xxxxxxx-xxxx/"
repocount='gitrepo.csv | wc -l'
for i in 'gitrepo.csv'
reponame="$i"
cd $baselocation/$i
cp source.yaml .
git add .
git commit -m "Create source.yaml"