1

I have a GitHub repo A which contains the code to deploy. And also have a gitbun repo B, which contains the chart. I made a GitHub Action in repo A, so when I commit, docker build my image and put it to ECR. Repo B is interlocked with ArgoCD, so its chart can be deployed to EKS Cluster.

When I build the image using docker, I set the corresponding git log as a tag. I want to put this tag in values.yaml in repo B so chart can be deployed automatically.

bad_coder
  • 11,289
  • 20
  • 44
  • 72
  • There are over a million ways to do this. Check the docs of your CI provider. Most of them provide a variable that holds the git commit and you can do whatever you want with it. – kazanaki Dec 03 '21 at 14:03

1 Answers1

0

You could achieve that with the 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}"