Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: push new commit to pushBranch when newer image is found #410

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

katainaka0503
Copy link
Contributor

@katainaka0503 katainaka0503 commented Mar 29, 2022

If pushBranch is designated like :target_branch, image updater continues to emit error messages like below after pushing a branch initially.

time="2022-03-29T11:03:47Z" level=error msg="Could not update application spec: could not push image-updater-katainaka0503/argocd-image-updater-test-app-0.0.4 to origin: `git push origin image-updater-katainaka0503/argocd-image-updater-test-app-0.0.4` failed exit status 1: To https://github.com/katainaka0503/argocd-image-updater-test.git\n ! [rejected]        image-updater-katainaka0503/argocd-image-updater-test-app-0.0.4 -> image-updater-katainaka0503/argocd-image-updater-test-app-0.0.4 (non-fast-forward)\nerror: failed to push some refs to 'https://github.com/katainaka0503/argocd-image-updater-test.git'\nhint: Updates were rejected because the tip of your current branch is behind\nhint: its remote counterpart. Integrate the remote changes (e.g.\nhint: 'git pull ...') before pushing again.\nhint: See the 'Note about fast-forwards' in 'git push --help' for details." application=test

This PR allows the image updater to update the branch if designated branch is found on the remote repository.

Related: #304, #384

@katainaka0503 katainaka0503 changed the title Push new commits if new image is found feat: push new commits to push branch if new image is found Mar 29, 2022
@katainaka0503 katainaka0503 changed the title feat: push new commits to push branch if new image is found feat: push a new commit to pushBranch if new image is found Mar 29, 2022
@katainaka0503 katainaka0503 changed the title feat: push a new commit to pushBranch if new image is found feat: push new commit to pushBranch if new image is found Mar 29, 2022
@katainaka0503 katainaka0503 changed the title feat: push new commit to pushBranch if new image is found feat: push new commit to pushBranch when newer image is found Apr 5, 2022
@katainaka0503
Copy link
Contributor Author

@jannfis Hi! Is there anything I can to help you review this PR?

@codecov-commenter
Copy link

Codecov Report

Merging #410 (760bc66) into master (ccb749f) will increase coverage by 0.01%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##           master     #410      +/-   ##
==========================================
+ Coverage   65.70%   65.72%   +0.01%     
==========================================
  Files          21       21              
  Lines        2041     2048       +7     
==========================================
+ Hits         1341     1346       +5     
- Misses        571      572       +1     
- Partials      129      130       +1     
Impacted Files Coverage Δ
pkg/argocd/git.go 65.04% <75.00%> (+0.20%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants