Contains miscellaneous scripts used by the infra team.
Terraform:
| Action | Command |
|---|---|
| Format | terraform fmt -recursive |
| Lint | tflint --recursive |
etcd-defrag:
| Action | Command |
|---|---|
| Build | docker build maintenance/etcd |
| Lint | shellcheck maintenance/etcd/defrag.sh |
rover-group-sync:
| Action | Command |
|---|---|
| Build | docker build maintenance/rover-group-sync |
| Lint | shellcheck maintenance/rover-group-sync/sync-rover-groups.sh |
| Test | bats maintenance/rover-group-sync/test/ |
Pre-commit:
| Action | Command |
|---|---|
| Setup | pip install pre-commit && pre-commit install |
| Run all | pre-commit run --all-files |
- Terraform format:
terraform fmt path/to/file.tf - Shell lint:
shellcheck path/to/script.sh - YAML lint:
yamllint path/to/file.yaml - BATS test single:
bats path/to/test_file.bats
Terraform module (located at terraform/modules/):
network- networking componentsoidc_provider- OIDC components
etcd-defrag (located at maintenance/etcd/):
defrag.sh- business logicDockerfile- image buildingbuild-deps- pinned dependencies
rover-group-sync (located at maintenance/rover-group-sync/):
sync-rover-groups.sh- business logicDockerfile- image buildingtest/- unit tests