argocd - 如何让 git log 到另一个仓库?
问题描述
我有一个 GitHub 存储库 A,其中包含要部署的代码。还有一个 gitbun repo B,其中包含图表。我在 repo A 中创建了一个 GitHub Action,所以当我提交时,docker 构建我的图像并将其放入 ECR。Repo B 与 ArgoCD 互锁,因此其图表可以部署到 EKS 集群。
当我使用 docker 构建镜像时,我将相应的 git log 设置为标签。我想将此标签放入values.yaml
repo B 中,以便可以自动部署图表。
解决方案
您可以使用 GitOpsCLI 实现:https ://baloise.github.io/gitopscli/commands/deploy/
# values.yaml
foo:
bar: 123
baz: xyz
docker run --rm -it baloise/gitopscli deploy \
--username "IGNORED" \
--password $GITHUB_API_KEY \
--git-user "GitOps CLI" \
--git-email "gitopscli@baloise.dev" \
--organisation "repoorg" \
--repository-name "reponame" \
--file "values.yaml" \
--values "{foo.bar: $YOUR_GIT_HASH, foo.baz: $YOUR_GIT_HASH}"
推荐阅读
- c# - 将 SQL 转换为 EF Linq,奇怪/令人困惑的 SQL
- python - Python - 如何通过每次“迭代”更新自身的概率来结束例程?
- java - 不允许 JSON 中的单引号值
- reactjs - 动态禁用输入
- shell - 使用 Ansible 任务计算文件数量并删除除 10 个最新的文件之外的所有文件
- windows - 使用 Windows 终端的 Cygwin 起始目录
- list - 如何将地图数据转换为颤动中的对象列表?
- typescript - 如何获得DefinitelyTyped @types 包版本之间的变化差异?
- flutter - 创建一个包含一列条子的条子
- swift - 如果authorizationStatus 被拒绝,SwiftUI 会将用户引导到他们的设置页面