Skip to content

Commit

Permalink
feat: update Taskfile.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
luboszima committed Mar 31, 2024
1 parent 763f04f commit 0262ce5
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion Taskfile.yaml
Original file line number Diff line number Diff line change
@@ -1,87 +1,124 @@
version: '3'

tasks:
# install dependencies
dependencies:
cmds:
- bash scripts/dependencies.sh

# install asdf tools
install:
preconditions:
- command -v asdf
- test -f .tool-versions
cmds:
- asdf install

# update asdf tools
asdf-update-tools:
preconditions:
- command -v bash
cmds:
- bash scripts/update_tools.sh

# list all asdf tools and latest versions
asdf-latest:
preconditions:
- command -v asdf
cmds:
- asdf latest --all

# generate terraform docs
tf-docs:
preconditions:
- command -v terraform-docs
cmds:
- terraform-docs -c .terraform-docs.yml --recursive terragrunt

# format terraform files
tf-fmt:
cmds:
- terraform fmt -recursive terragrunt/modules

# format hcl files
tg-hclfmt:
cmds:
- terragrunt hclfmt --terragrunt-working-dir ./terragrunt

# remove terragrunt cache directories
tg-remove-cache:
cmds:
- find . -type d -name ".terragrunt-cache" -exec rm -fr {} \; > /dev/null 2>&1

# run terragrunt init for all modules
tg-init:
aliases:
- init
cmds:
- yes | terragrunt run-all init -reconfigure --terragrunt-working-dir ./terragrunt/ai/server

# apply terragrunt resources
tg-apply:
aliases:
- apply
cmds:
- yes | terragrunt run-all apply --terragrunt-working-dir ./terragrunt/ai/server

# destroy terragrunt resources
tg-destroy:
aliases:
- destroy
cmds:
- yes | terragrunt run-all destroy --terragrunt-working-dir ./terragrunt/ai/server

# reset terragrunt resources
tg-reset:
aliases:
- reset
cmds:
- task: tg-destroy
- task: tg-apply

# run pre-commit hooks
pre-commit:
cmds:
- pre-commit run -a -v

# run pre-push hooks
pre-push:
cmds:
- task: tf-docs
- task: tf-fmt
- task: tg-hclfmt
- task: pre-commit

# connect to remote server via ssh
ssh:
preconditions:
- command -v ssh
cmd: bash scripts/ssh.sh

# port forward port with webui from remote server to your local machine
port-forward:
preconditions:
- command -v ssh
aliases:
- webui
cmd: bash scripts/port-forward.sh

# upload rag docs to remote server
upload-rag-docs:
preconditions:
- command -v scp
aliases:
- rag-docs
- upload
cmd: bash scripts/upload-rag-docs.sh
cmds:
- bash scripts/upload-rag-docs.sh
- task: restart-webui

# restart webui service on remote server
restart-webui:
preconditions:
- command -v ssh
cmd: bash scripts/restart-webui.sh

0 comments on commit 0262ce5

Please # to comment.