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

support passing additional env vars to host #176

Merged
merged 3 commits into from
Dec 20, 2022

Conversation

rplevka
Copy link
Member

@rplevka rplevka commented Dec 15, 2022

addresses:
#174

These commits add support for additional env vars. the following approaches work:

nick:

my_nick:
  container_host: "ubi8:rplevka"
  environment:
    ARG1: "val1"
    ARG2: "val2"

cli:

broker checkout --nick my_nick --environment "ARG1=val1,ARG2=val2"

Also, the processing of the args_file was refactored to combine parsed args with eventual cli args (cli args taking precedence)

@rplevka rplevka marked this pull request as ready for review December 15, 2022 20:37
@ogajduse
Copy link
Member

@rplevka
Copy link
Member Author

rplevka commented Dec 16, 2022

There is one unit test failing: https://github.com/SatelliteQE/broker/actions/runs/3707727860/jobs/6284488033

Odd, It is passing on my local, python 3.9 env setup:

$ pytest tests/ --ignore tests/functional
================================ test session starts ================================
platform linux -- Python 3.9.12, pytest-7.2.0, pluggy-1.0.0 -- /home/rplevka/.virtualenvs/broker/bin/python
cachedir: .pytest_cache
rootdir: /home/rplevka/work/rplevka/broker, configfile: pytest.ini
collected 32 items                                                                  

tests/test_broker.py::test_empty_init PASSED                                  [  3%]
tests/test_broker.py::test_kwarg_assignment PASSED                            [  6%]
tests/test_broker.py::test_full_init PASSED                                   [  9%]
tests/test_broker.py::test_broker_e2e PASSED                                  [ 12%]
tests/test_broker.py::test_broker_empty_checkin PASSED                        [ 15%]
tests/test_broker.py::test_mp_checkout PASSED                                 [ 18%]
tests/test_broker.py::test_mp_checkout_twice PASSED                           [ 21%]
tests/test_broker.py::test_mp_decorator PASSED                                [ 25%]
tests/test_helpers.py::test_load_json_file PASSED                             [ 28%]
tests/test_helpers.py::test_load_yaml_file PASSED                             [ 31%]
tests/test_helpers.py::test_negative_load_file PASSED                         [ 34%]
tests/test_helpers.py::test_resolve_file_args PASSED                          [ 37%]
tests/test_helpers.py::test_emitter PASSED                                    [ 40%]
tests/test_helpers.py::test_lock_file_created PASSED                          [ 43%]
tests/test_helpers.py::test_lock_timeout PASSED                               [ 46%]
tests/test_helpers.py::test_find_origin_simple PASSED                         [ 50%]
tests/test_helpers.py::test_find_origin_fixture PASSED                        [ 53%]
tests/test_helpers.py::test_find_origin_jenkins[set_envars0] PASSED           [ 56%]
tests/test_helpers.py::test_flatten_duplicate PASSED                          [ 59%]
tests/test_settings.py::test_default_settings PASSED                          [ 62%]
tests/test_settings.py::test_alternate_settings PASSED                        [ 65%]
tests/test_settings.py::test_validator_trigger PASSED                         [ 68%]
tests/test_settings.py::test_nested_envar[set_envars0] PASSED                 [ 71%]
tests/test_settings.py::test_default_envar[set_envars0] PASSED                [ 75%]
tests/test_settings.py::test_nondefault_envar[set_envars0] PASSED             [ 78%]
tests/test_settings.py::test_purge_vault_envars[set_envars0] PASSED           [ 81%]
tests/providers/test_ansible_tower.py::test_execute PASSED                    [ 84%]
tests/providers/test_ansible_tower.py::test_host_creation PASSED              [ 87%]
tests/providers/test_ansible_tower.py::test_workflow_lookup_failure PASSED    [ 90%]
tests/providers/test_container.py::test_empty_init PASSED                     [ 93%]
tests/providers/test_container.py::test_host_creation PASSED                  [ 96%]
tests/providers/test_container.py::test_image_lookup_failure PASSED           [100%]

================================ 32 passed in 9.99s =================================

@JacobCallahan JacobCallahan merged commit fca5b61 into SatelliteQE:master Dec 20, 2022
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.

3 participants