diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index be4d72c..745aad8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,7 @@ on: [ push, pull_request ] name: Build jobs: - test: + Build: strategy: matrix: go-version: [ 1.17.x ] diff --git a/README.md b/README.md index 8973088..6c4ab45 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,32 @@ # goal -goal -- Go Aliases + +GoAl -- Go Aliases + +Start using: + +Install via `brew`: + +```shell +brew install #TODO +``` + +# Idea behind + +1. Local alias management + To avoid typing repeatable commands +2. AssD - Aliases as a Documentation :D + No need to read through whole README file to start operating on you infrastructure + +# Project plan + +[ ] Add manual approve step +[ ] Add "environment" management to avoid tf-plan-dev, tf-plan-stage, tf-plan-prod, etc. +[ ] Add "depends on" other task like switch to dev? +[ ] Recursive dependencies +[ ] Assertions + [ ] ref output + [ ] recursive assertions + [ ] raw CLI output -- bad pattern? +[ ] Global aliases in `$HOME` directory? +[ ] Self-autocompletion via [https://github.com/posener/complete](complete) library +[ ] Generate ops-doc from commands diff --git a/examples/helm/goal.yaml b/examples/helm/goal.yaml new file mode 100644 index 0000000..ef0532f --- /dev/null +++ b/examples/helm/goal.yaml @@ -0,0 +1,39 @@ +current-context: + desc: Current kubectl context + cmd: kubectl + args: + - config + - current-context + +helm-upgrade-dev-dry-run: + desc: Dry run upgrade on dev + assert: + name: Check if on dev cluster + ref: current-context + equals: dev-cluster + cmd: helm + args: + - upgrade + - release-name + - -f + - values.yaml + - -f + - values/dev.yaml + - . + - --dry-run + +helm-upgrade-dev: + desc: Upgrade on dev + assert: + name: Check if on dev cluster + ref: current-context + equals: dev-cluster + cmd: helm + args: + - upgrade + - release-name + - -f + - values.yaml + - -f + - values/dev.yaml + - . diff --git a/examples/terraform/goal.yaml b/examples/terraform/goal.yaml new file mode 100644 index 0000000..a4ae6a6 --- /dev/null +++ b/examples/terraform/goal.yaml @@ -0,0 +1,26 @@ +workspace: + desc: Current terraform workspace + cmd: terraform + args: + - workspace + - show + +tf-plan-dev: + desc: Terraform plan for dev + assert: + name: Check if on dev workspace + ref: workspace + equals: dev + cmd: terraform + args: + - plan + +tf-apply-dev: + desc: Terraform apply for dev + assert: + name: Check if on dev workspace + ref: workspace + equals: dev + cmd: terraform + args: + - plan