summaryrefslogtreecommitdiff
path: root/pkg/argocd/update_test.go
AgeCommit message (Collapse)Author
2025-01-14Replace common constant references (#1011)HEADmasterIshita Sequeira
Signed-off-by: Ishita Sequeira <ishiseq29@gmail.com>
2025-01-14chore: separate Argo specific constants from registry-scanner constants (#1010)Ishita Sequeira
Signed-off-by: Ishita Sequeira <ishiseq29@gmail.com>
2025-01-07Move references for kube, image, registry to registry-scanner (#998)Ishita Sequeira
Signed-off-by: Ishita Sequeira <ishiseq29@gmail.com>
2024-12-16Update references of pkg/tag pkg/log pkg/options to use modules from ↵Ishita Sequeira
registry-scanner (#962) Signed-off-by: Ishita Sequeira <ishiseq29@gmail.com>
2024-11-08fix: delay setting git.username and git.email config till commit time (#912)Cheng Fang
Signed-off-by: Cheng Fang <cfang@redhat.com>
2024-10-18fix: Git write back to helm values is incorrect during the first pass and ↵Cheng Fang
corrupts existing data (#885) Signed-off-by: Cheng Fang <cfang@redhat.com>
2024-09-10tests: add tests for github app credentials (#862)Cheng Fang
Signed-off-by: Cheng Fang <cfang@redhat.com>
2024-09-06fix: failed to process a full image-spec annotation with git writeback to ↵Cheng Fang
helmvalues (#843) Signed-off-by: Cheng Fang <cfang@redhat.com>
2024-08-30fix: Multiple aliases for the same image only 1 parameter is updated (#846)Cheng Fang
Signed-off-by: Cheng Fang <cfang@redhat.com>
2024-08-29Allow setting new value in Helm values file (#838)jnovick
Signed-off-by: Joshua Novick <joshua.novick@hunters.ai>
2024-08-13feat: Use shallow clone to speed up performance (#830)jnovick
Signed-off-by: Joshua Novick <joshua.novick@hunters.ai>
2024-08-07tests: Add unit tests for pkg/argocd (#818)Ishita Sequeira
Signed-off-by: isequeir <isequeir@redhat.com>
2024-07-18Fix updates to multiple images when using helm values file (#790)Lyupcho Kotev
Signed-off-by: Lyupcho Kotev <lyupcho.kotev@codira.dev>
2024-07-12chore(lint): Enable spelling linter (#773)Jann Fischer
Signed-off-by: Jann Fischer <jann@mistrust.net>
2024-07-10feat: Support other namespaces than argocd in AIU (#763)sribiere-jellysmack
Signed-off-by: Sebastien RIBIERE <sebastien.ribiere.ext@jellysmack.com> Signed-off-by: Cheng Fang <cfang@redhat.com> Signed-off-by: Mangaal <angommeeteimangaal@gmail.com> Signed-off-by: jannfis <jann@mistrust.net> Co-authored-by: Cheng Fang <cfang@redhat.com> Co-authored-by: Mangaal <44372157+Mangaal@users.noreply.github.com> Co-authored-by: Jann Fischer <jann@mistrust.net>
2024-06-23Fix/helm values wbc (#748)David Vidal Villamide
Signed-off-by: David Vidal Villamide <david@askharilabs.com>
2024-06-14fix: Make Git credentials work again (#737)Jann Fischer
* fix: Make Git credentials work again Signed-off-by: jannfis <jann@mistrust.net> * Update Signed-off-by: jannfis <jann@mistrust.net> --------- Signed-off-by: jannfis <jann@mistrust.net>
2024-06-07fix: Pass AppNamespace to UpdateSpec api call (#687)Merijn Wijngaard
Signed-off-by: Merijn Wijngaard <mwijngaard@gmail.com>
2024-05-27chore(deps): Pull in Git client changes from Argo CD v2.11.2jannfis
Signed-off-by: jannfis <jann@mistrust.net>
2023-12-07feat: add support for separate GitHub app credentials (#649)Dustin Lactin
* feat: add support for separate GitHub app credentials stored as Kubernetes secrets Signed-off-by: Dustin Lactin <dustin.lactin@gmail.com> * test: added tests for consuming GitHub app credentials from a secret Signed-off-by: Dustin Lactin <dustin.lactin@gmail.com> * fix: added GitHub App placeholder words to expect.txt Signed-off-by: Dustin Lactin <dustin.lactin@gmail.com> * fix: checking for errors when converting GitHub App and Installation IDs Signed-off-by: Dustin Lactin <dustin.lactin@gmail.com> * fix: added more descriptive error messages for string-to-number conversions Signed-off-by: Dustin Lactin <dustin.lactin@gmail.com> --------- Signed-off-by: Dustin Lactin <dustin.lactin@gmail.com>
2023-12-04feat: multisource support (#636)David Vidal Villamide
* change: update argocd library from 2.7.9 to 2.8.4 for future multisource support Signed-off-by: David Vidal Villamide <david@askharilabs.com> * feat: added support for multisource applications. Signed-off-by: David Vidal Villamide <david@askharilabs.com> * feat: added multisource support to Git WriteBack method Signed-off-by: David Vidal Villamide <david@askharilabs.com> * changed: all Spec.Source references to enable multisource support Signed-off-by: David Vidal Villamide <david@askharilabs.com> * feat: added multisource support for write back method fix: pointer management at getApplicationSource function Signed-off-by: David Vidal Villamide <david@askharilabs.com> * feat: added write-back-target prefix to allow the use of values.yaml files These changes intend to add support for write-back-method git on multisource applications based on Helm sources and value files as Helm does. Also we tried to keep the same coding patterns and the previous features and flows untouched. Signed-off-by: David Vidal Villamide <david@askharilabs.com> * add: helmvalues word to expected dictionaries for check spelling tests Signed-off-by: David Vidal Villamide <david@askharilabs.com> * fix: readthedocs build.os parameter added and set to ubuntu-22.04 Signed-off-by: David Vidal Villamide <david@askharilabs.com> * fix: build.tools.python set to version 3.12 to create documentation Signed-off-by: David Vidal Villamide <david@askharilabs.com> * test: dded coverage for all the new code Signed-off-by: David Vidal Villamide <david@askharilabs.com> * fix: get image and tag parameter from getHelmParameterNamesFromAnnotation fix: set default values for image and tag parameters change: get application source type from Spec intead of Status values Signed-off-by: David Vidal Villamide <david@askharilabs.com> --------- Signed-off-by: David Vidal Villamide <david@askharilabs.com>
2023-09-21fix: Add support for ocischema.DeserializedImageIndex manifest type (#618)Jesse Bye
* fix: Add support for ocischema.DeserializedImageIndex manifest type Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com> * more informative error logging Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com> --------- Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
2023-08-15feat: Add possibility to specify write-back GIT repository as annotation (#424)Florin Hillebrand
* Add possibility to specify write-back GIT repository as annotation. Signed-off-by: flozzone <flozzone@gmail.com> * Update golangci-lint to 1.52.2. Signed-off-by: flozzone <flozzone@gmail.com> * Replace deprecated golangci linters with 'unused' linter. Signed-off-by: flozzone <flozzone@gmail.com> * Fix Goimport issues. Signed-off-by: flozzone <flozzone@gmail.com> --------- Signed-off-by: flozzone <flozzone@gmail.com>
2023-08-10chore(deps): upgrade dependencies for fix vulnerabilities (#599)MichaelKo
Signed-off-by: Viacheslav Sychov <viacheslav.sychov@gmail.com>
2023-07-30chore: Update to newer argocd version for better API compatibility (#594)Jesse Bye
* fix: update go mods to use newer argocd app definition Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com> * fix deps and tests Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com> * fix spelling Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com> --------- Signed-off-by: Jesse Bye <8467862+jessebye@users.noreply.github.com>
2023-07-09feat: Respect original parameter overrides with git write-back (#573)KS. Yim
* Fix original override not respected Signed-off-by: KS. Yim <ks.yim@linecorp.com> * Add writeOverrides unittest Signed-off-by: KS. Yim <ks.yim@linecorp.com> * Add helm override commit test Signed-off-by: KS. Yim <ks.yim@linecorp.com> * lint Signed-off-by: KS. Yim <ks.yim@linecorp.com> * fix shadowed err Signed-off-by: KS. Yim <ks.yim@linecorp.com> --------- Signed-off-by: KS. Yim <ks.yim@linecorp.com> Co-authored-by: KS. Yim <ks.yim@linecorp.com>
2022-11-15fix: update application config sample & replace the deprecated ioutil pkg (#492)YTCai
* docs: update application config sample Signed-off-by: CaiYueTing <qazxcv367tasi@gmail.com> * fix: use os read/write instead of deprecated ioutil read/write package Signed-off-by: CaiYueTing <qazxcv367tasi@gmail.com> * fix: use io, os pkg instead of all of the ioutil pkg Signed-off-by: CaiYueTing <qazxcv367tasi@gmail.com> Signed-off-by: CaiYueTing <qazxcv367tasi@gmail.com>
2022-03-13chore: Bump docker distribution v2 (#395)jannfis
2022-02-23Checkout after creating a new branch (#384)katainaka
* Checkout after creating a new branch * Fix test * Fix unnecessary checkout
2022-01-29feat: Support app-wide update-strategy annotations (#338)Jan Pieper
* feat: support app-wide update-strategy annotations * refactor: rename constants for pull-secret annotations
2022-01-27feat: Automatic inferring of registry from image prefix (#369)jannfis
* feat: Infer registry from prefix Signed-off-by: jannfis <jann@mistrust.net> * Add missing registry testdata Signed-off-by: jannfis <jann@mistrust.net> * Correctly handle default registries Signed-off-by: jannfis <jann@mistrust.net>
2022-01-07feat: add ability to specify a different write and base branch (#304)Nick
* add ability to specify a different write and base branch * format/spelling * add sha1 to template and truncate branch name length * add hasher error checking * document * spelling * correction to template docs * use sha256 and add warning to truncation * condense annotations into one * add some tests * add docs on omitting base branch
2021-10-26chore: Update and refactor Git client (#283)jannfis
Signed-off-by: jannfis <jann@mistrust.net>
2021-10-21fix: use kyaml to preserve kustomization (#274)noah
* fix: use kyaml to preserve kustomization fixes #250 fixes #268 fixes #247 * chore: linter error * fix: tests and linting * go mod tidy
2021-10-05chore: Fix unit test (#269)jannfis
Signed-off-by: jannfis <jann@mistrust.net>
2021-10-04chore: Test successful update two images (#264)Zhong, Ming-Xun
* Test successful update two images * fix: NumImagesUpdated regression of commit 274d19c7a06a8413db07672d9983c0821f488ba5
2021-10-04fix: multiple image with alias (#266)Zhong, Ming-Xun
2021-09-17feat: Support OCI repositories by using distribution/v3 (#249)Mercier Ludovic
* upgrade registry dependencies to distribution v3 Signed-off-by: ludovicMercier <ludovic.mercier.lm@gmail.com> * upgrade registry dependencies to distribution v3 Signed-off-by: ludovicMercier <ludovic.mercier.lm@gmail.com> * upgrade registry dependencies to distribution v3 Signed-off-by: ludovicMercier <ludovic.mercier.lm@gmail.com> * upgrade registry dependencies to distribution v3 Signed-off-by: ludovicMercier <ludovic.mercier.lm@gmail.com> * upgrade to distribution v3 an implement ocischema Signed-off-by: ludovicMercier <ludovic.mercier.lm@gmail.com> * upgrade to distribution v3 an implement ocischema Signed-off-by: ludovicMercier <ludovic.mercier.lm@gmail.com> * go mod tidy Signed-off-by: ludovicMercier <ludovic.mercier.lm@gmail.com> * lint Signed-off-by: ludovicMercier <ludovic.mercier.lm@gmail.com> * fix broken tests Signed-off-by: ludovicMercier <ludovic.mercier.lm@gmail.com> * Update to changes from master branch Signed-off-by: jannfis <jann@mistrust.net> Co-authored-by: jannfis <jann@mistrust.net>
2021-09-12fix: Get tags from correct registry/image with a different kustomize image ↵jannfis
(#253) * fix: Get tags from correct registry/image with a different kustomize image * Fix logs and update image * Fix tags * More tests * More tests
2021-08-02chore: Upgrade Argo CD dependencies to v2.0.5 (#230)jannfis
Signed-off-by: jannfis <jann@mistrust.net>
2021-05-11feat: allow write-back to actual kustomization files (#200)noah
* feat: allow write-back to actual kustomization files #199 * fix: was not handling default path correctly default is the source path * fix: sort imports
2021-04-26fix : Images not updated if registry or repository is different with same ↵noah
version (#194) * update image even if only difference is the registry * refactor: use annotation methods which are more consistent
2021-04-15fix: Correctly consider image with force-update set and semver strategy (#192)noah
* fix issue with force-update and semver * simplify by just removing the invalid tag
2021-04-14feat: Allow setting custom Git commit messages (#193)jannfis
* feat: Support Git commit message templates Signed-off-by: jannfis <jann@mistrust.net> * More templating Signed-off-by: jannfis <jann@mistrust.net> * Update Signed-off-by: jannfis <jann@mistrust.net> * Make TemplateCommitMessage public Signed-off-by: jannfis <jann@mistrust.net> * Update Signed-off-by: jannfis <jann@mistrust.net> * Update Signed-off-by: jannfis <jann@mistrust.net> * Introduce git.CommitOptions{} Signed-off-by: jannfis <jann@mistrust.net> * Update documentation for commit message templates Signed-off-by: jannfis <jann@mistrust.net> * Add unit tests Signed-off-by: jannfis <jann@mistrust.net> * Update manifests Signed-off-by: jannfis <jann@mistrust.net> * Fix typo in docs Signed-off-by: jannfis <jann@mistrust.net> * Fix linter issues Signed-off-by: jannfis <jann@mistrust.net> * Fix linter issues Signed-off-by: jannfis <jann@mistrust.net>
2021-04-01fix: Prevent nil pointer deref on emtpy tag with running image (#182)jannfis
Signed-off-by: jannfis <jann@mistrust.net>
2021-03-29fix: Prevent concurrent updates to git repositories (#177)Bartosz Sławianowski
* Add method docs and RequiresLocking method
2021-01-31feat: Allow setting Git user and e-mail for commits (#153)jannfis
* feat: Allow setting Git user and e-mail for commits Signed-off-by: jannfis <jann@mistrust.net> * Also allow setting git.user and git.email from configmap * Update docs to include information about Git commit author Signed-off-by: jannfis <jann@mistrust.net> * Update spelling * Add some unit tests Signed-off-by: jannfis <jann@mistrust.net> * Fix linter Signed-off-by: jannfis <jann@mistrust.net>
2021-01-30feat: Resolve symrefs to allow them as targetRevision for write back (#151)jannfis
2021-01-22feat: Allow reuse of Argo CD repo credentials (#141)Alexander Matyushentsev
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-01-22fix: run 'git add' for create files before pushing back (#143)Alexander Matyushentsev
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>