chore: test deploy with host runner8
This commit is contained in:
parent
ccbb0f7d1e
commit
a753824375
1 changed files with 8 additions and 7 deletions
|
|
@ -15,7 +15,7 @@ jobs:
|
||||||
|
|
||||||
- name: Build and Push
|
- name: Build and Push
|
||||||
run: |
|
run: |
|
||||||
# Instala Docker CLI
|
# Garante que temos o cliente Docker
|
||||||
apk add --no-cache docker-cli
|
apk add --no-cache docker-cli
|
||||||
|
|
||||||
export DOCKER_HOST=tcp://localhost:2375
|
export DOCKER_HOST=tcp://localhost:2375
|
||||||
|
|
@ -26,13 +26,14 @@ jobs:
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
run: |
|
run: |
|
||||||
# Baixa o binário do kubectl oficial (já que o apk não encontrou)
|
# 1. Instala curl e certificados para conseguir baixar o kubectl
|
||||||
|
apk add --no-cache curl ca-certificates
|
||||||
|
|
||||||
|
# 2. Baixa e instala o kubectl oficial
|
||||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
||||||
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
|
chmod +x kubectl
|
||||||
|
mv kubectl /usr/local/bin/kubectl
|
||||||
|
|
||||||
# Testa se o kubectl está funcionando
|
# 3. Aplica as mudanças no cluster
|
||||||
kubectl version --client
|
|
||||||
|
|
||||||
# Aplica as mudanças
|
|
||||||
kubectl apply -f k8s/
|
kubectl apply -f k8s/
|
||||||
kubectl rollout restart deployment/photum-backend -n photum
|
kubectl rollout restart deployment/photum-backend -n photum
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue