@@ -3,8 +3,7 @@ name: CI-CD-EKS
3
3
on :
4
4
push :
5
5
branches :
6
- - main # Vai disparar quando fizer push na main
7
- # - dev/k8s
6
+ - dev/k8s # Executar apenas na branch dev/k8s
8
7
workflow_dispatch : # Permite disparar o workflow manualmente
9
8
10
9
jobs :
32
31
push : true
33
32
tags : |
34
33
rafallltm/giropops-senhas:latest
35
- rafallltm/giropops-senhas:2. ${{ github.run_number }}
34
+ rafallltm/giropops-senhas:${{ github.sha }}
36
35
37
36
cd :
38
37
runs-on : ubuntu-latest
@@ -59,24 +58,17 @@ jobs:
59
58
- name : Configurar kubectl
60
59
run : aws eks update-kubeconfig --name meu-cluster
61
60
62
- - name : Create namespace giropops-senhas
63
- run : kubectl create namespace giropops-senhas || true
61
+ # Validar o Helm Chart
62
+ - name : Helm Lint
63
+ run : helm lint ./helm-chat
64
64
65
- - name : Install Helm
66
- uses : azure/setup-helm@v1
65
+ # Instalar app com Helm Chart
66
+ - name : Deploy with Helm
67
67
run : |
68
- helm repo add stable https://charts.helm.sh/stable
69
- helm repo update
70
-
71
- # Deploy no Kubernetes
72
- - name : Deploy to Kubernetes
73
- uses : Azure/k8s-deploy@v5
74
- with :
75
- manifests : |
76
- ./manifestos/giropops-senhas-deployment.yaml
77
- ./manifestos/redis-deployment.yaml
78
- ./manifestos/giropops-senhas-svc.yaml
79
- ./manifestos/redis-svc.yaml
80
- images : |
81
- rafallltm/giropops-senhas:2.${{ github.run_number }}
82
- namespace : giropops-senhas # Definir explicitamente o namespace correto
68
+ helm upgrade --install giropops ./helm-chat \
69
+ --namespace giropops-senhas \
70
+ --create-namespace \
71
+ --set image.repository=rafallltm/giropops-senhas \
72
+ --set image.tag=${{ github.sha }} \
73
+ --atomic \
74
+ --timeout 5m
0 commit comments