forked from majoferenc/demo-cicd-automation-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
83 lines (82 loc) · 3.01 KB
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
version: '3'
tasks:
install_argowfl:
cmds:
- |
kubectl create namespace argo --dry-run=client -o yaml | kubectl apply -f -
kubectl apply -n argo -f https://github.com/argoproj/argo-workflows/releases/download/v3.5.5/quick-start-minimal.yaml
kubectl apply -f .argo/argo-nodeport-svc.yaml
install_argocd:
cmds:
- |
kubectl create namespace argocd --dry-run=client -o yaml | kubectl apply -f -
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl apply -f .argo/argocd-nodeport-svc.yaml
install_argoevents:
cmds:
- |
kubectl create namespace argo-events --dry-run=client -o yaml | kubectl apply -f -
kubectl apply -f https://raw.githubusercontent.com/argoproj/argo-events/stable/manifests/install.yaml
setup_docker_creds:
cmds:
- |
# Load environment variables from .env file
if [ -f .env ]; then
export $(grep -v '^#' .env | xargs)
else
echo ".env file not found in the current directory."
exit 1
fi
temp_dir=$(mktemp -d)
export REGISTRY_SERVER='https://index.docker.io/v1/'
kubectl create secret docker-registry registry-creds \
--docker-server=$REGISTRY_SERVER \
--docker-username=$DOCKERHUB_USERNAME \
--docker-password=$DOCKERHUB_PASSWORD \
--docker-email=$DOCKERHUB_EMAIL \
--dry-run=client -o json | jq -r '.data.".dockerconfigjson"' | base64 --decode > $temp_dir/config.json
kubectl delete secret config.json --ignore-not-found=true -n argo
kubectl create secret generic config.json --from-file=$temp_dir/config.json -n argo -o yaml | kubectl apply -f -
rm -rf $temp_dir
kubectl get secret -n argo
create_github_creds:
cmds:
- |
# Load environment variables from .env file
if [ -f .env ]; then
export $(grep -v '^#' .env | xargs)
else
echo ".env file not found in the current directory."
exit 1
fi
kubectl delete secret git-credentials-secret --ignore-not-found=true -n argo
kubectl create secret generic git-credentials-secret --from-literal=.git-credentials="https://[email protected]" -n argo -o yaml | kubectl apply -f -
kubectl get secret git-credentials-secret -n argo
argowfl:
cmds:
- kubectl -n argo port-forward service/argo-server 2746:2746
argowfl_events_wip:
cmds:
- kubectl -n workflows port-forward svc/argo-argo-workflows-server 2746:2746
argocd_pass:
cmds:
- kubectl get secret argocd-initial-admin-secret -n argocd -o json | jq -r '.data.password' | base64 --decode
argocdui:
cmds:
- kubectl port-forward svc/argocd-server -n argocd 8080:443
webhook_tunnel:
cmds:
- ngrok http 12000 --scheme http,https
quick_env_replace:
cmds:
- |
chmod +x quick_replace.sh
sh quick_replace.sh
quick_setup:
cmds:
- |
chmod +x quick_setup.sh
sh quick_setup.sh
clear_nix:
cmds:
- nix-collect-garbage