Skip to content

Instantly share code, notes, and snippets.

@pythoninthegrass
Forked from vfarcic/task.sh
Created March 7, 2024 21:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pythoninthegrass/427c159d03fdfaa8e103d9efc1e7b92a to your computer and use it in GitHub Desktop.
Save pythoninthegrass/427c159d03fdfaa8e103d9efc1e7b92a to your computer and use it in GitHub Desktop.
# Source: https://gist.github.com/vfarcic/77c63cede031951654d5fea5ce0acb43
#########################################################################################
# Say Goodbye to Makefile - Use Taskfile to Manage Tasks in CI/CD Pipelines and Locally #
#########################################################################################
# Additional Info:
# - Task: https://taskfile.dev
# - Dagger: The Missing Ingredient for Your Disastrous CI/CD Pipeline: https://youtu.be/oosQ3z_9UEM
#########
# Setup #
#########
# Make sure that Docker is up-and-running
git clone https://github.com/vfarcic/crossplane-kubernetes
cd crossplane-kubernetes
git pull
git checkout -t origin/task
# Watch https://youtu.be/0ulldVwZiKA if you are not familiar with Nix. Alternatively, you can skip Nix and install all the tools listed in `shell.nix` yourself.
nix-shell --run $SHELL
# Open a second terminal sessions in the same directory.
##########################################################
# Task and Taskfile (Replacements for Make and Makefile) #
##########################################################
cat Taskfile.yaml
task --list
task --summary package-generate
cat Taskfile.yaml | yq ".tasks.package-generate"
task package-generate
cat Taskfile.yaml | yq ".tasks.cluster-create"
task cluster-create --dry
task cluster-create
# That task will take a while to execute. Be patient...
cat Taskfile.yaml | yq ".tasks.test-watch"
task test-watch
# Modify `tests/aws/00-assert.yaml` in the second terminal session.
# Undo the change to `tests/aws/00-assert.yaml`.
# Press `ctrl+c` to stop the process
task cluster-destroy
cat .github/workflows/build11.yaml
###########
# Destroy #
###########
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment