Add tab completion for `components` and `stack` in Atmos commands @samtholiya (#992)
what
- Add tab completion for
components
andstack
in Atmos commands - Update docs https://atmos.tools/cli/commands/completion
why
- Providing completions for components and stack will improve the accuracy and speed of the user while executing commands that require components and stacks
Don't check stacks config in `atmos.yaml` in Atmos commands that don't require stacks @samtholiya (#1052)
what
- Don't check stacks config in
atmos.yaml
in Atmos commands that don't require stacks
why
- Atmos commands (including Atmos custom commands) may or may not be using components and stacks
Add Test Timeouts and Clean Working & Home Directories @osterman (#1051)
what
- Add a new
timeout
configuration to abort long running tests - Disable version checks on tests that are not testing that functionality
- Change home directory to empty temp directory
why
- It's hard to identify sometimes which test is hung in CI; adding a timer makes it easier to track down
- Atmos and terraform orphan files (e.g. cache files) which means test behavior can change between runs
- Home directory configuration can affect test outcomes
Fix mergify dispatch @osterman (#1059)
what
- Incorrect specification of head ref
why
- Mergify doesn't really explain how to do it.
- Based on the example of how
{{ author }}
works, there's nopull_request
prefix https://docs.mergify.com/workflow/actions/github_actions/#examples - Based on the documentation here, it suggests the key is just
head
https://docs.mergify.com/configuration/data-types/#template
Documented Example
Based on the documentation,
The dynamic_workflow.yaml takes the template input author.
This implies that everything under data-types
can be used as a Jinja template variable. Since author
works (at least based on their example), head
should as well.
pull_request_rules:
- name: Dispatch GitHub Actions
conditions:
- label = dispatch
actions:
github_actions:
workflow:
dispatch:
- workflow: foo_workflow.yaml
- workflow: hello_world_workflow.yaml
inputs:
name: steve
age: 42
- workflow: dynamic_workflow.yaml
inputs:
author: "{{ author }}"
Support Trailing Args for Custom Commands @samtholiya (#1046)
what
- Add support for double dash
--
argument in custom command - Use
{{ .TrailingArgs }}
in templates to get the arguments after the double dash--
- Update docs
why
- Allow users use double dash
--
to get the native args and send them to the custom command executable
Trailing Arguments
Atmos supports trailing arguments after --
(a standalone double-dash). The --
itself is a delimiter that signals the end of Atmos-specific options. Anything after --
is passed directly to the underlying command without being interpreted by Atmos. The value of these trailing arguments is accessible in {{ .TrailingArgs }}
.
For the example, adding the following to atmos.yaml
will introduce a new echo
command that accepts one name
argument and also uses trailingArgs
- name: ansible run
description: "Runs an Ansible playbook, allowing extra arguments after --."
arguments:
- name: playbook
description: "The Ansible playbook to run"
default: site.yml
required: true
steps:
- "ansible-playbook {{ .Arguments.playbook }} {{ .TrailingArgs }}"
Output:
$ atmos ansible run -- --limit web
Running: ansible-playbook site.yml --limit web
PLAY [web] *********************************************************************