argocd-image-updater
argocd-image-updater copied to clipboard
Git write-back method and gpg-signed commits
Is your feature request related to a problem? Please describe.
We use git write-back method, but our repository has branch protection rules, which require all commits to main branch to be signed with a gpg key. It looks like there is partial support for passing gpg key id to the git commit command here, but I can not find a way to configure both CommitOptions.SigningKey and CommitOptions.SignOff options.
Describe the solution you'd like
Support configuring these setting via --git-commit-signing-key and --git-commit-sign-offcli args and GIT_COMMIT_SIGNING_KEY and GIT_COMMIT_SIGN_OFF env vars here
Describe alternatives you've considered
Disable require signed commits requirement in main branch protection rules.
Any chance that the changes from the commit that referenced this issue will be ported upstream?
same issue, is there any solution?
time="2024-06-26T07:21:18Z" level=debug msg="Writing commit message to /tmp/image-updater-commit-msg1646947728" application=cicd-argo-application
time="2024-06-26T07:21:18Z" level=info msg="git -c gpg.format=openpgp commit -a -S -F /tmp/image-updater-commit-msg1646947728" dir=/tmp/git-cicd-argo-application3650244213 execID=06adc
time="2024-06-26T07:21:18Z" level=error msg="`git -c gpg.format=openpgp commit -a -S -F /tmp/image-updater-commit-msg1646947728` failed exit status 128: error: cannot run gpg: No such file or directory\nerror: gpg failed to sign the data:\n(no gpg output)\nfatal: failed to write commit object" execID=06adc
time="2024-06-26T07:21:18Z" level=info msg=Trace args="[git -c gpg.format=openpgp commit -a -S -F /tmp/image-updater-commit-msg1646947728]" dir=/tmp/git-cicd-argo-application3650244213 operation_name="exec git" time_ms=5.5094970000000005
time="2024-06-26T07:21:18Z" level=error
time="2024-06-26T07:21:18Z" level=info msg="Processing results: applications=1 images_considered=1 images_skipped=0 images_updated=0 errors=1"
time="2024-06-26T07:21:18Z" level=error msg="Could not update application spec: `git -c gpg.format=openpgp commit -a -S -F /tmp/image-updater-commit-msg1646947728` failed exit status 128: error: cannot run gpg: No such file or directory\nerror: gpg failed to sign the data:\n(no gpg output)\nfatal: failed to write commit object" application=cicd-argo-application
This issue should already be resolved by https://github.com/argoproj-labs/argocd-image-updater/pull/710 . From the error above, it looks like the gpg executable is not available.
we have the same errors. gpg executable is missing in the image of updater, shouldn't it be part of it?
This issue (error: cannot run gpg: No such file or directory) is fixed by https://github.com/argoproj-labs/argocd-image-updater/pull/767