Skip to content

Refactored plugin with test framework - #7

Merged
shcherbak merged 18 commits into
code-tool:mainfrom
s-skorobohatko:main
Sep 29, 2026
Merged

shcherbak merged 18 commits into
code-tool:mainfrom
s-skorobohatko:main

Conversation

@s-skorobohatko

Copy link
Copy Markdown
Contributor

Added test framework (based on bats and shellcheck). Cleanup plugin logic from helm 2. Deleted obsolete or unused code. Fix INCLUDE mode logic

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git update-index --chmod=+x

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread src/argocd-helmfile-plugin.sh Outdated
# discovery broken in 2.7.4
if [[ ! -z "${HELMFILE_DISCOVERY_RESPONSE}" ]]; then
truthy_test "${HELMFILE_DISCOVERY_RESPONSE}" && {
# stdout plus exit code 0 means "use this plugin", diagnostics go to stderr_APP_SOURCE_PATH

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discover: diagnostics go to stderr_APP_SOURCE_PATH - believe this is ctrl-f

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was typo after fixing var names... reverted

Comment thread CHANGELOG.md Outdated
and this project adheres to Semantic Versioning (https://semver.org/).
---

## [1.3.2]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

monor, not a patch

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version bumped to minor

Comment thread CHANGELOG.md Outdated
- Helm version is detected with `helm version --template '{{.Version}}'` instead of parsing `--short` output.
- `init` and `generate` fail with a clear error for Helm < 3, helmfile < 1 or unparsable versions.
- `discover` and `parameters` no longer run `helm`/`helmfile`.
- Minimum versions: helm >= 3.6, helmfile >= 1 (>= 1.2 with Helm 4).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimum version is 3.19, will not support older

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

Comment thread src/argocd-helmfile-plugin.sh Outdated
fi

if [[ "${HELMFILE_GLOBAL_OPTIONS}" == *-f* ]]; then
if [[ "${HELMFILE_GLOBAL_OPTIONS:-}" == *--file* || "${HELMFILE_GLOBAL_OPTIONS:-}" == *-f* ]]; then

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is old condition and looks suspicious
lets check HELMFILE_GLOBAL_OPTIONS="-e prod-frankfurt"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug fixed. tests added to check proper behavior

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. this should be mentioned in release notes

@s-skorobohatko s-skorobohatko changed the title WIP: refactored plugin with test framework Refactored plugin with test framework Sep 29, 2026
@shcherbak
shcherbak merged commit 04938e2 into code-tool:main Sep 29, 2026
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.

2 participants