mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-04-10 02:41:14 +00:00
* new module helm_registry_auth * Initial integration tests * final update copyright and integration test before pr * update link to pr in changelog fragment * reformat plugins/module_utils/helm.py with black to fix linters in actions * attempt to fix unit test unit test was missing initially * fix https://pycqa.github.io/isort/ linter * next attemp to fix unit-test * remove unused and unsupported helm_args_common * remove unused imports and fix other linters errors * another fix for unit test * fix issue introducied by commit ff02893a12a31f9c44b5c48f9a8bf85057295961 * add binary_path to arg_spec * return helm_cmd in the output of check mode remove changlog fragment * description suggestion from reviewer/maintainer Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * description suggestion from reviewer/maintainer Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * description suggestion from reviewer/maintainer Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * description suggestion from reviewer/maintainer Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * description suggestion from reviewer/maintainer Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * description suggestion from reviewer/maintainer Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * description suggestion from reviewer/maintainer Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * description suggestion from reviewer/maintainer Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * remove changed from module return Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * remove redundant code Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * Update plugins/modules/helm_registry_auth.py Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * consider support of logout when user is not logged in Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * consider support helm < 3.0.0 * Revert "consider support helm < 3.0.0" This reverts commitf20004d196. * reintroduce support of helm version less than 3.8.0 reference: https://helm.sh/docs/topics/registries/#enabling-oci-support-prior-to-v380 * revert reintroducing support of helm < 3.8.0 reason: didn't find a quick way to deal with tests * update documentation with the recent module updates * Update plugins/modules/helm_registry_auth.py Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * add test of logout impendency Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> * fix linters * fix intendations in the integration tests * create tests/integration/targets/helm_registry_auth/aliases * fix integration test (typo) * fix integration tests (test wrong cred) * add stderr when module fail * another attempt to fix integration test * fix assertion in integration test to be not affceted by the #830 --------- Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> (cherry picked from commitaee847431a) Co-authored-by: Yuriy Novostavskiy <yuriy@novostavskiy.kiev.ua>
This commit is contained in:
@@ -159,11 +159,13 @@ class AnsibleHelmModule(object):
|
||||
self.helm_env = self._prepare_helm_environment()
|
||||
return self.helm_env
|
||||
|
||||
def run_helm_command(self, command, fails_on_error=True):
|
||||
def run_helm_command(self, command, fails_on_error=True, data=None):
|
||||
if not HAS_YAML:
|
||||
self.fail_json(msg=missing_required_lib("PyYAML"), exception=YAML_IMP_ERR)
|
||||
|
||||
rc, out, err = self.run_command(command, environ_update=self.env_update)
|
||||
rc, out, err = self.run_command(
|
||||
command, environ_update=self.env_update, data=data
|
||||
)
|
||||
if fails_on_error and rc != 0:
|
||||
self.fail_json(
|
||||
msg="Failure when executing Helm command. Exited {0}.\nstdout: {1}\nstderr: {2}".format(
|
||||
|
||||
Reference in New Issue
Block a user