-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Adding tests to 02-checkrun.sh #19
Conversation
b088373
to
6218d0d
Compare
f4f9f6a
to
6bf8fd5
Compare
4e6b00a
to
6bdeb1c
Compare
6bdeb1c
to
72091bd
Compare
a89aa42
to
f5f4148
Compare
@@ -4,4 +4,6 @@ infrastructures: | |||
- name: testing | |||
inventory: ./test_infra1_inv.yaml | |||
- name: prod | |||
inventory: ./prod_infra1.inv.yaml | |||
inventory: ./prod_infra1_inv.yaml | |||
- name: locked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strange name for stage
config = load_configuration() | ||
validate_option_values_with_config(config, options) | ||
validate_option_values_against_config(config, options, required_opts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good but it's nice to have separate commit for just name change to make the history easier to check. Maybe not so important on current stage.
ansible_deploy/command_line.py
Outdated
@@ -129,6 +129,7 @@ def validate_options(options, subcommand): | |||
required = ["infra", "stage"] | |||
notsupported = ["task", "commit"] | |||
elif subcommand == "list": | |||
required = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't it redundant? required is defined before if
ansible_deploy/command_line.py
Outdated
@@ -354,7 +354,7 @@ def run_task(config: dict, options: dict, inventory: str): | |||
sys.exit(70) | |||
else: | |||
for playbook in playbooks: | |||
command = ["ansible-playbook", "-l", options["infra"], "-i", inventory, playbook] | |||
command = ["ansible-playbook", "-i", inventory, playbook] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's good that it's a separate commit but this is rally a fix, so commit message should mention that
etc/lock_infra1_inv.yaml
Outdated
@@ -0,0 +1,2 @@ | |||
420 | |||
cinek |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new line at the end of yaml? strange to call inventory "lock" :) If it's just for tests... I'd say add it to setup_hook so we can run tests locally without a file being copied prior running
etc/ansible-deploy.yaml
Outdated
- name: parent_work_dir | ||
value: "/tmp" | ||
|
||
- name: parent_config_dir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one has to be hardcoded - can't read config without that
No description provided.