Skip to content

Commit

Permalink
feat: Adicionar etapas de implantação do Helm para produção, staging …
Browse files Browse the repository at this point in the history
…e desenvolvimento
  • Loading branch information
nataliagranato committed Sep 14, 2024
1 parent 8e311d4 commit 8e58cd4
Showing 1 changed file with 49 additions and 24 deletions.
73 changes: 49 additions & 24 deletions .github/workflows/deploy-helm-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,31 +38,56 @@ jobs:
export KUBECONFIG=$(pwd)/kubeconfig
kubectl get nodes
# # Passo 5: Instalar Helm
# - name: Install Helm
# uses: azure/setup-helm@v1
# with:
# version: 'latest'
# Passo 5: Instalar Helm
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: 'latest'

# # Passo 6: Criar namespaces se não existirem
# - name: Create namespaces
# env:
# KUBECONFIG: ${{ secrets.KUBECONFIG }}
# run: |
# echo "$KUBECONFIG" | base64 --decode > kubeconfig
# export KUBECONFIG=$(pwd)/kubeconfig
# kubectl create namespace giropops-senhas-prd || true
# kubectl create namespace giropops-senhas-dev || true
# kubectl create namespace giropops-senhas-stg || true
# Passo 6: Criar namespaces se não existirem
- name: Create namespaces
env:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
run: |
echo "$KUBECONFIG" | base64 --decode > kubeconfig
export KUBECONFIG=$(pwd)/kubeconfig
kubectl create namespace giropops-senhas-prd || true
kubectl create namespace giropops-senhas-dev || true
kubectl create namespace giropops-senhas-stg || true
# - name: Deploy Helm Chart to Production
# env:
# KUBECONFIG: ${{ secrets.KUBECONFIG }}
# run: |
# cd /senhas/charts/senhas
# echo "$KUBECONFIG" | base64 --decode > kubeconfig
# export KUBECONFIG=$(pwd)/kubeconfig
# helm upgrade -i giropops-senhas -n giropops-senhas-prd .
- name: Deploy Helm Chart Production
env:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
run: |
cd /senhas/charts/senhas
echo "$KUBECONFIG" | base64 --decode > kubeconfig
export KUBECONFIG=$(pwd)/kubeconfig
helm upgrade -i giropops-senhas -n giropops-senhas-prd .

- name: Deploy Helm Chart Production
env:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
run: |
cd /senhas/charts/senhas
echo "$KUBECONFIG" | base64 --decode > kubeconfig
export KUBECONFIG=$(pwd)/kubeconfig
helm upgrade -i giropops-senhas -n giropops-senhas-prd .
- name: Deploy Helm Chart Staging
env:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
run: |
cd /senhas/charts/senhas
echo "$KUBECONFIG" | base64 --decode > kubeconfig
export KUBECONFIG=$(pwd)/kubeconfig
helm upgrade -i giropops-senhas -n giropops-senhas-stg .
- name: Deploy Helm Chart Development
env:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
run: |
cd /senhas/charts/senhas
echo "$KUBECONFIG" | base64 --decode > kubeconfig
export KUBECONFIG=$(pwd)/kubeconfig
helm upgrade -i giropops-senhas -n giropops-senhas-dev .

0 comments on commit 8e58cd4

Please sign in to comment.