chore: update taskfiles and direnv (#1601)
This commit is contained in:
1 parent
be2819a84e
commit
dd16fcd64b
8 files changed
+147
-183
No files matched your search
@@ -1,75 +1,48 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
||||
version: "3"
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
CLUSTER_SECRET_SOPS_FILE: "{{.KUBERNETES_DIR}}/flux/vars/cluster-secrets.sops.yaml"
|
||||
CLUSTER_SETTINGS_FILE: "{{.KUBERNETES_DIR}}/flux/vars/cluster-settings.yaml"
|
||||
GITHUB_DEPLOY_KEY_FILE: "{{.KUBERNETES_DIR}}/bootstrap/flux/github-deploy-key.sops.yaml"
|
||||
CLUSTER_SECRET_SOPS_FILE: '{{.KUBERNETES_DIR}}/flux/vars/cluster-secrets.sops.yaml'
|
||||
CLUSTER_SETTINGS_FILE: '{{.KUBERNETES_DIR}}/flux/vars/cluster-settings.yaml'
|
||||
GITHUB_DEPLOY_KEY_FILE: '{{.KUBERNETES_DIR}}/bootstrap/flux/github-deploy-key.sops.yaml'
|
||||
|
||||
tasks:
|
||||
|
||||
bootstrap:
|
||||
desc: Bootstrap Flux into a Kubernetes cluster
|
||||
cmds:
|
||||
- kubectl apply --kubeconfig {{.KUBECONFIG_FILE}} --server-side --kustomize {{.KUBERNETES_DIR}}/bootstrap/flux
|
||||
- kubectl apply --server-side --kustomize {{.KUBERNETES_DIR}}/bootstrap/flux
|
||||
- |
|
||||
if ! kubectl --kubeconfig {{.KUBECONFIG_FILE}} -n flux-system get secret sops-age >/dev/null 2>&1; then
|
||||
cat {{.AGE_FILE}} | kubectl --kubeconfig {{.KUBECONFIG_FILE}} -n flux-system create secret generic sops-age --from-file=age.agekey=/dev/stdin
|
||||
if ! kubectl --namespace flux-system get secret sops-age >/dev/null 2>&1; then
|
||||
cat {{.SOPS_AGE_KEY_FILE}} | kubectl --namespace flux-system create secret generic sops-age --from-file=age.agekey=/dev/stdin
|
||||
else
|
||||
echo "sops-age secret already exists, skipping creation."
|
||||
fi
|
||||
- sops --decrypt {{.CLUSTER_SECRET_SOPS_FILE}} | kubectl apply --kubeconfig {{.KUBECONFIG_FILE}} --server-side --filename -
|
||||
- kubectl apply --kubeconfig {{.KUBECONFIG_FILE}} --server-side --filename {{.CLUSTER_SETTINGS_FILE}}
|
||||
- kubectl apply --kubeconfig {{.KUBECONFIG_FILE}} --server-side --kustomize {{.KUBERNETES_DIR}}/flux/config
|
||||
- sops --decrypt {{.CLUSTER_SECRET_SOPS_FILE}} | kubectl apply --server-side --filename -
|
||||
- kubectl apply --server-side --filename {{.CLUSTER_SETTINGS_FILE}}
|
||||
- kubectl apply --server-side --kustomize {{.KUBERNETES_DIR}}/flux/config
|
||||
preconditions:
|
||||
- msg: Missing kubeconfig
|
||||
sh: test -f {{.KUBECONFIG_FILE}}
|
||||
sh: test -f {{.KUBECONFIG}}
|
||||
- msg: Missing Sops Age key file
|
||||
sh: test -f {{.AGE_FILE}}
|
||||
|
||||
apply:
|
||||
desc: Apply a Flux Kustomization resource for a cluster
|
||||
summary: |
|
||||
Args:
|
||||
path: Path under apps containing the Flux Kustomization resource (ks.yaml) (required)
|
||||
ns: Namespace the Flux Kustomization exists in (default: flux-system)
|
||||
cmd: |
|
||||
flux --kubeconfig {{.KUBECONFIG_FILE}} build ks $(basename {{.path}}) \
|
||||
--namespace {{.ns}} \
|
||||
--kustomization-file {{.KUBERNETES_DIR}}/apps/{{.path}}/ks.yaml \
|
||||
--path {{.KUBERNETES_DIR}}/apps/{{.path}} \
|
||||
{{- if contains "not found" .ks }}--dry-run \{{ end }}
|
||||
| \
|
||||
kubectl apply --kubeconfig {{.KUBECONFIG_FILE}} --server-side \
|
||||
--field-manager=kustomize-controller -f -
|
||||
requires:
|
||||
vars: ["path"]
|
||||
vars:
|
||||
ns: '{{.ns | default "flux-system"}}'
|
||||
ks:
|
||||
sh: flux --kubeconfig {{.KUBECONFIG_FILE}} --namespace {{.ns}} get kustomizations $(basename {{.path}}) 2>&1
|
||||
preconditions:
|
||||
- msg: Missing kubeconfig
|
||||
sh: test -f {{.KUBECONFIG_FILE}}
|
||||
- msg: Missing Flux Kustomization for app {{.path}}
|
||||
sh: test -f {{.KUBERNETES_DIR}}/apps/{{.path}}/ks.yaml
|
||||
sh: test -f {{.SOPS_AGE_KEY_FILE}}
|
||||
|
||||
reconcile:
|
||||
desc: Force update Flux to pull in changes from your Git repository
|
||||
cmd: flux --kubeconfig {{.KUBECONFIG_FILE}} reconcile --namespace flux-system kustomization cluster --with-source
|
||||
cmd: flux reconcile --namespace flux-system kustomization cluster --with-source
|
||||
preconditions:
|
||||
- msg: Missing kubeconfig
|
||||
sh: test -f {{.KUBECONFIG_FILE}}
|
||||
sh: test -f {{.KUBECONFIG}}
|
||||
|
||||
github-deploy-key:
|
||||
cmds:
|
||||
- kubectl create namespace flux-system --dry-run=client -o yaml | kubectl --kubeconfig {{.KUBECONFIG_FILE}} apply --filename -
|
||||
- sops --decrypt {{.GITHUB_DEPLOY_KEY_FILE}} | kubectl apply --kubeconfig {{.KUBECONFIG_FILE}} --server-side --filename -
|
||||
- kubectl create namespace flux-system --dry-run=client -o yaml | kubectl apply --filename -
|
||||
- sops --decrypt {{.GITHUB_DEPLOY_KEY_FILE}} | kubectl apply --server-side --filename -
|
||||
preconditions:
|
||||
- msg: Missing kubeconfig
|
||||
sh: test -f {{.KUBECONFIG_FILE}}
|
||||
sh: test -f {{.KUBECONFIG}}
|
||||
- msg: Missing Sops Age key file
|
||||
sh: test -f {{.AGE_FILE}}
|
||||
sh: test -f {{.SOPS_AGE_KEY_FILE}}
|
||||
- msg: Missing Github deploy key file
|
||||
sh: test -f {{.GITHUB_DEPLOY_KEY_FILE}}
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
||||
version: "3"
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
KUBECONFORM_SCRIPT: "{{.SCRIPTS_DIR}}/kubeconform.sh"
|
||||
@@ -10,10 +10,10 @@ tasks:
|
||||
resources:
|
||||
desc: Gather common resources in your cluster, useful when asking for support
|
||||
cmds:
|
||||
- for: { var: resource }
|
||||
- for: { var: RESOURCE }
|
||||
cmd: kubectl get {{.ITEM}} {{.CLI_ARGS | default "-A"}}
|
||||
vars:
|
||||
resource: >-
|
||||
RESOURCE: >-
|
||||
nodes
|
||||
gitrepositories
|
||||
kustomizations
|
||||
@@ -31,6 +31,6 @@ tasks:
|
||||
- msg: Missing kubeconform script
|
||||
sh: test -f {{.KUBECONFORM_SCRIPT}}
|
||||
|
||||
.reset:
|
||||
reset:
|
||||
internal: true
|
||||
cmd: rm -rf {{.KUBERNETES_DIR}}
|
||||
@@ -1,6 +1,9 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
||||
version: "3"
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
PRIVATE_DIR: '{{.ROOT_DIR}}/.private'
|
||||
|
||||
tasks:
|
||||
|
||||
@@ -26,18 +29,13 @@ tasks:
|
||||
sh: test -f {{.ROOT_DIR}}/.github/renovate.json5
|
||||
|
||||
reset:
|
||||
desc: Reset templated configuration files
|
||||
desc: Reset templated configuration files (use --force to reset repo back to HEAD)
|
||||
prompt: Reset templated configuration files... continue?
|
||||
cmds:
|
||||
- task: :kubernetes:.reset
|
||||
- task: :sops:.reset
|
||||
- task: :talos:.reset
|
||||
|
||||
force-reset:
|
||||
desc: Reset repo back to HEAD
|
||||
prompt: Reset repo back to HEAD... continue?
|
||||
cmds:
|
||||
- task: reset
|
||||
- git reset --hard HEAD
|
||||
- git clean -f -d
|
||||
- git pull origin main
|
||||
- task: :kubernetes:reset
|
||||
- task: :sops:reset
|
||||
- task: :talos:reset
|
||||
- cmd: |
|
||||
{{- if eq .CLI_FORCE true }}
|
||||
git reset --hard HEAD && git clean -f -d && git pull origin main
|
||||
{{- end }}
|
||||
@@ -1,13 +1,14 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
||||
version: "3"
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
|
||||
age-keygen:
|
||||
desc: Initialize Age Key for Sops
|
||||
cmd: age-keygen --output {{.AGE_FILE}}
|
||||
status: ["test -f {{.AGE_FILE}}"]
|
||||
cmd: age-keygen --output {{.SOPS_AGE_KEY_FILE}}
|
||||
status:
|
||||
- test -f {{.SOPS_AGE_KEY_FILE}}
|
||||
|
||||
encrypt:
|
||||
desc: Encrypt all Kubernetes SOPS secrets
|
||||
@@ -16,15 +17,15 @@ tasks:
|
||||
find "{{.KUBERNETES_DIR}}" -type f -name "*.sops.*" | while read -r file; do
|
||||
if sops filestatus "$file" | jq --exit-status ".encrypted == false" > /dev/null; then
|
||||
sops --encrypt --in-place "$file"
|
||||
echo "Encrypted $file"
|
||||
echo "Encrypted ${file}"
|
||||
fi
|
||||
done
|
||||
preconditions:
|
||||
- msg: Missing Sops config file
|
||||
sh: test -f {{.SOPS_CONFIG_FILE}}
|
||||
- msg: Missing Sops Age key file
|
||||
sh: test -f {{.AGE_FILE}}
|
||||
sh: test -f {{.SOPS_AGE_KEY_FILE}}
|
||||
|
||||
.reset:
|
||||
reset:
|
||||
internal: true
|
||||
cmd: rm -rf {{.SOPS_CONFIG_FILE}}
|
||||
@@ -1,22 +1,21 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
||||
version: "3"
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
TALHELPER_CLUSTER_DIR: "{{.KUBERNETES_DIR}}/bootstrap/talos/clusterconfig"
|
||||
TALHELPER_SECRET_FILE: "{{.KUBERNETES_DIR}}/bootstrap/talos/talsecret.sops.yaml"
|
||||
TALHELPER_CONFIG_FILE: "{{.KUBERNETES_DIR}}/bootstrap/talos/talconfig.yaml"
|
||||
HELMFILE_FILE: "{{.KUBERNETES_DIR}}/bootstrap/helmfile.yaml"
|
||||
TALOSCONFIG_FILE: "{{.TALHELPER_CLUSTER_DIR}}/talosconfig"
|
||||
TALHELPER_CLUSTER_DIR: '{{.KUBERNETES_DIR}}/bootstrap/talos/clusterconfig'
|
||||
TALHELPER_SECRET_FILE: '{{.KUBERNETES_DIR}}/bootstrap/talos/talsecret.sops.yaml'
|
||||
TALHELPER_CONFIG_FILE: '{{.KUBERNETES_DIR}}/bootstrap/talos/talconfig.yaml'
|
||||
HELMFILE_FILE: '{{.KUBERNETES_DIR}}/bootstrap/helmfile.yaml'
|
||||
|
||||
env:
|
||||
TALOSCONFIG: "{{.TALOSCONFIG_FILE}}"
|
||||
TALOSCONFIG: '{{.TALHELPER_CLUSTER_DIR}}/talosconfig'
|
||||
|
||||
tasks:
|
||||
|
||||
bootstrap:
|
||||
desc: Bootstrap the Talos cluster
|
||||
dir: "{{.KUBERNETES_DIR}}/bootstrap/talos"
|
||||
dir: '{{.KUBERNETES_DIR}}/bootstrap/talos'
|
||||
cmds:
|
||||
- |
|
||||
if [ ! -f "{{.TALHELPER_SECRET_FILE}}" ]; then
|
||||
@@ -26,8 +25,8 @@ tasks:
|
||||
- talhelper genconfig --config-file {{.TALHELPER_CONFIG_FILE}} --secret-file {{.TALHELPER_SECRET_FILE}} --out-dir {{.TALHELPER_CLUSTER_DIR}}
|
||||
- talhelper gencommand apply --config-file {{.TALHELPER_CONFIG_FILE}} --out-dir {{.TALHELPER_CLUSTER_DIR}} --extra-flags="--insecure" | bash
|
||||
- until talhelper gencommand bootstrap --config-file {{.TALHELPER_CONFIG_FILE}} --out-dir {{.TALHELPER_CLUSTER_DIR}} | bash; do sleep 10; done
|
||||
- task: fetch-kubeconfig
|
||||
- task: install-helm-apps
|
||||
- task: conf
|
||||
- task: apps
|
||||
- talosctl health --server=false
|
||||
preconditions:
|
||||
- msg: Missing talhelper config file
|
||||
@@ -35,42 +34,21 @@ tasks:
|
||||
- msg: Missing Sops config file
|
||||
sh: test -f {{.SOPS_CONFIG_FILE}}
|
||||
- msg: Missing Sops Age key file
|
||||
sh: test -f {{.AGE_FILE}}
|
||||
|
||||
fetch-kubeconfig:
|
||||
desc: Fetch kubeconfig
|
||||
dir: "{{.KUBERNETES_DIR}}/bootstrap/talos"
|
||||
cmd: until talhelper gencommand kubeconfig --config-file {{.TALHELPER_CONFIG_FILE}} --out-dir {{.TALHELPER_CLUSTER_DIR}} --extra-flags="{{.ROOT_DIR}} --force" | bash; do sleep 10; done
|
||||
preconditions:
|
||||
- msg: Missing talhelper config file
|
||||
sh: test -f {{.TALHELPER_CONFIG_FILE}}
|
||||
|
||||
install-helm-apps:
|
||||
desc: Bootstrap core apps needed for Talos
|
||||
dir: "{{.KUBERNETES_DIR}}/bootstrap/talos"
|
||||
cmds:
|
||||
- until kubectl --kubeconfig {{.KUBECONFIG_FILE}} wait --for=condition=Ready=False nodes --all --timeout=600s; do sleep 10; done
|
||||
- helmfile --kubeconfig {{.KUBECONFIG_FILE}} --file {{.HELMFILE_FILE}} apply --skip-diff-on-install --suppress-diff
|
||||
- until kubectl --kubeconfig {{.KUBECONFIG_FILE}} wait --for=condition=Ready nodes --all --timeout=600s; do sleep 10; done
|
||||
preconditions:
|
||||
- msg: Missing kubeconfig
|
||||
sh: test -f {{.KUBECONFIG_FILE}}
|
||||
- msg: Missing helmfile
|
||||
sh: test -f {{.HELMFILE_FILE}}
|
||||
sh: test -f {{.SOPS_AGE_KEY_FILE}}
|
||||
|
||||
upgrade:
|
||||
desc: Upgrade Talos on a node
|
||||
dir: "{{.KUBERNETES_DIR}}/bootstrap/talos"
|
||||
dir: '{{.KUBERNETES_DIR}}/bootstrap/talos'
|
||||
cmds:
|
||||
- talosctl --nodes {{.node}} upgrade --image {{.image}} --wait=true --timeout=10m --preserve=true --reboot-mode={{.mode}}
|
||||
- talosctl --nodes {{.node}} health --wait-timeout=10m --server=false
|
||||
- talosctl --nodes {{.NODE}} upgrade --image {{.IMAGE}} --wait=true --timeout=10m --preserve=true --reboot-mode={{.MODE}}
|
||||
- talosctl --nodes {{.NODE}} health --wait-timeout=10m --server=false
|
||||
vars:
|
||||
mode: '{{.mode | default "default"}}'
|
||||
MODE: '{{.MODE | default "default"}}'
|
||||
requires:
|
||||
vars: ["node", "image"]
|
||||
vars: ['NODE', 'IMAGE']
|
||||
preconditions:
|
||||
- msg: Missing talosconfig
|
||||
sh: test -f {{.TALOSCONFIG_FILE}}
|
||||
sh: test -f {{.TALOSCONFIG}}
|
||||
- msg: Unable to retrieve Talos config
|
||||
sh: talosctl config info >/dev/null 2>&1
|
||||
- msg: Node not found
|
||||
@@ -78,17 +56,17 @@ tasks:
|
||||
|
||||
upgrade-k8s:
|
||||
desc: Upgrade Kubernetes across the cluster
|
||||
dir: "{{.KUBERNETES_DIR}}/bootstrap/talos"
|
||||
cmd: talosctl --nodes {{.controller}} upgrade-k8s --to {{.to}}
|
||||
dir: '{{.KUBERNETES_DIR}}/bootstrap/talos'
|
||||
cmd: talosctl --nodes {{.CONTROLLER}} upgrade-k8s --to {{.TO}}
|
||||
requires:
|
||||
vars: ["controller", "to"]
|
||||
vars: ['CONTROLLER', 'TO']
|
||||
preconditions:
|
||||
- msg: Missing talosconfig
|
||||
sh: test -f {{.TALOSCONFIG_FILE}}
|
||||
sh: test -f {{.TALOSCONFIG}}
|
||||
- msg: Unable to retrieve Talos config
|
||||
sh: talosctl config info >/dev/null 2>&1
|
||||
- msg: Node not found
|
||||
sh: talosctl --nodes {{.controller}} get machineconfig >/dev/null 2>&1
|
||||
sh: talosctl --nodes {{.CONTROLLER}} get machineconfig >/dev/null 2>&1
|
||||
|
||||
nuke:
|
||||
desc: Resets nodes back to maintenance mode
|
||||
@@ -96,6 +74,27 @@ tasks:
|
||||
prompt: This will destroy your cluster and reset the nodes back to maintenance mode... continue?
|
||||
cmd: talhelper gencommand reset --config-file {{.TALHELPER_CONFIG_FILE}} --out-dir {{.TALHELPER_CLUSTER_DIR}} --extra-flags="--reboot {{- if eq .CLI_FORCE false }} --system-labels-to-wipe STATE --system-labels-to-wipe EPHEMERAL{{ end }} --graceful=false --wait=false" | bash
|
||||
|
||||
.reset:
|
||||
conf:
|
||||
internal: true
|
||||
dir: '{{.KUBERNETES_DIR}}/bootstrap/talos'
|
||||
cmd: until talhelper gencommand kubeconfig --config-file {{.TALHELPER_CONFIG_FILE}} --out-dir {{.TALHELPER_CLUSTER_DIR}} --extra-flags="{{.ROOT_DIR}} --force" | bash; do sleep 10; done
|
||||
preconditions:
|
||||
- msg: Missing talhelper config file
|
||||
sh: test -f {{.TALHELPER_CONFIG_FILE}}
|
||||
|
||||
apps:
|
||||
internal: true
|
||||
dir: '{{.KUBERNETES_DIR}}/bootstrap/talos'
|
||||
cmds:
|
||||
- until kubectl wait --for=condition=Ready=False nodes --all --timeout=600s; do sleep 10; done
|
||||
- helmfile --file {{.HELMFILE_FILE}} apply --skip-diff-on-install --suppress-diff
|
||||
- until kubectl wait --for=condition=Ready nodes --all --timeout=600s; do sleep 10; done
|
||||
preconditions:
|
||||
- msg: Missing kubeconfig
|
||||
sh: test -f {{.KUBECONFIG}}
|
||||
- msg: Missing helmfile
|
||||
sh: test -f {{.HELMFILE_FILE}}
|
||||
|
||||
reset:
|
||||
internal: true
|
||||
cmd: rm -rf {{.TALHELPER_CLUSTER_DIR}} {{.TALHELPER_SECRET_FILE}} {{.TALHELPER_CONFIG_FILE}}
|
||||
@@ -1,54 +1,46 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
||||
version: "3"
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
ARCHFILE: "{{.ROOT_DIR}}/.taskfiles/Workstation/Archfile"
|
||||
BREWFILE: "{{.ROOT_DIR}}/.taskfiles/Workstation/Brewfile"
|
||||
GENERIC_BIN_DIR: "{{.ROOT_DIR}}/.bin"
|
||||
ARCHFILE: '{{.ROOT_DIR}}/.taskfiles/Workstation/Archfile'
|
||||
BREWFILE: '{{.ROOT_DIR}}/.taskfiles/Workstation/Brewfile'
|
||||
GENERIC_BIN_DIR: '{{.ROOT_DIR}}/.bin'
|
||||
PIP_REQUIREMENTS_FILE: '{{.ROOT_DIR}}/requirements.txt'
|
||||
PYTHON_BIN: python3
|
||||
|
||||
tasks:
|
||||
|
||||
direnv:
|
||||
desc: Run direnv hooks
|
||||
cmd: direnv allow .
|
||||
status:
|
||||
- "[[ $(direnv status --json | jq '.state.foundRC.allowed') == 0 ]]"
|
||||
- "[[ $(direnv status --json | jq '.state.loadedRC.allowed') == 0 ]]"
|
||||
|
||||
venv:
|
||||
desc: Set up virtual environment
|
||||
cmds:
|
||||
- "{{.PYTHON_BIN}} -m venv {{.VIRTUAL_ENV}}"
|
||||
- '{{.VIRTUAL_ENV}}/bin/python3 -m pip install --upgrade pip setuptools wheel'
|
||||
- '{{.VIRTUAL_ENV}}/bin/python3 -m pip install --upgrade --requirement "{{.PIP_REQUIREMENTS_FILE}}"'
|
||||
sources:
|
||||
- "{{.PIP_REQUIREMENTS_FILE}}"
|
||||
generates:
|
||||
- "{{.VIRTUAL_ENV}}/pyvenv.cfg"
|
||||
arch:
|
||||
desc: Install Arch workstation dependencies with Paru Or Yay
|
||||
cmd: '{{.PKGMGR}} -Syu --needed --noconfirm --noprogressbar $(cat {{.ARCHFILE}} | xargs)'
|
||||
vars:
|
||||
PKGMGR:
|
||||
sh: command -v yay || command -v paru
|
||||
preconditions:
|
||||
- { msg: "Missing Pip requirements file", sh: "test -f {{.PIP_REQUIREMENTS_FILE}}" }
|
||||
- msg: Missing Archfile
|
||||
sh: test -f {{.ARCHFILE}}
|
||||
|
||||
brew:
|
||||
desc: Install workstation dependencies with Brew
|
||||
cmd: brew bundle --file {{.BREWFILE}}
|
||||
preconditions:
|
||||
- { msg: "Missing Homebrew", sh: "command -v brew" }
|
||||
- { msg: "Missing Brewfile", sh: "test -f {{.BREWFILE}}" }
|
||||
- msg: Missing Homebrew
|
||||
sh: command -v brew
|
||||
- msg: Missing Brewfile
|
||||
sh: test -f {{.BREWFILE}}
|
||||
|
||||
arch:
|
||||
desc: Install Arch workstation dependencies with Paru Or Yay
|
||||
cmd: "{{.helper}} -Syu --needed --noconfirm --noprogressbar $(cat {{.ARCHFILE}} | xargs)"
|
||||
vars:
|
||||
helper:
|
||||
sh: "command -v yay || command -v paru"
|
||||
preconditions:
|
||||
- { msg: "Missing Archfile", sh: "test -f {{.ARCHFILE}}" }
|
||||
direnv:
|
||||
desc: Run direnv hooks
|
||||
cmd: direnv allow .
|
||||
status:
|
||||
- '[[ $(direnv status --json | jq ".state.foundRC.allowed") == 0 ]]'
|
||||
- '[[ $(direnv status --json | jq ".state.loadedRC.allowed") == 0 ]]'
|
||||
|
||||
generic-linux:
|
||||
desc: Install CLI tools into the projects .bin directory using curl
|
||||
dir: "{{.GENERIC_BIN_DIR}}"
|
||||
platforms: ["linux/amd64", "linux/arm64"]
|
||||
desc: Try to install CLI tools into the projects .bin directory
|
||||
dir: '{{.GENERIC_BIN_DIR}}'
|
||||
platforms: ['linux/amd64', 'linux/arm64']
|
||||
cmds:
|
||||
- for:
|
||||
- budimanjojo/talhelper?as=talhelper&type=script
|
||||
@@ -64,8 +56,22 @@ tasks:
|
||||
- mikefarah/yq?as=yq&type=script
|
||||
cmd: curl -fsSL "https://i.jpillora.com/{{.ITEM}}" | bash
|
||||
- cmd: curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
||||
platforms: ["linux/amd64"]
|
||||
platforms: ['linux/amd64']
|
||||
- cmd: curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl"
|
||||
platforms: ["linux/arm64"]
|
||||
platforms: ['linux/arm64']
|
||||
- cmd: chmod +x kubectl
|
||||
- cmd: curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | USE_SUDO="false" HELM_INSTALL_DIR="." bash
|
||||
|
||||
venv:
|
||||
desc: Set up virtual environment
|
||||
cmds:
|
||||
- '{{.PYTHON_BIN}} -m venv {{.VIRTUAL_ENV}}'
|
||||
- '{{.VIRTUAL_ENV}}/bin/python3 -m pip install --upgrade pip setuptools wheel'
|
||||
- '{{.VIRTUAL_ENV}}/bin/python3 -m pip install --upgrade --requirement "{{.PIP_REQUIREMENTS_FILE}}"'
|
||||
sources:
|
||||
- '{{.PIP_REQUIREMENTS_FILE}}'
|
||||
generates:
|
||||
- '{{.VIRTUAL_ENV}}/pyvenv.cfg'
|
||||
preconditions:
|
||||
- msg: Missing Pip requirements file
|
||||
sh: test -f {{.PIP_REQUIREMENTS_FILE}}
|
||||
Reference in new issue
Block a user