Update .gitea/workflows/build-deploy.yaml
Some checks failed
CI/CD Pipeline / pipeline-execution (push) Failing after 19s
Some checks failed
CI/CD Pipeline / pipeline-execution (push) Failing after 19s
This commit is contained in:
parent
a6c4c352ea
commit
aaf7404760
@ -18,10 +18,18 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker buildx build --push -t registry-service.container-registry.svc.cluster.local:5000/apps/microservice-sample:latest .
|
docker buildx build --push -t registry-service.container-registry.svc.cluster.local:5000/apps/microservice-sample:latest .
|
||||||
|
|
||||||
- name: Déployer sur Kubernetes
|
- name: Déployer sur Kubernetes (Méthode Avancée DinD)
|
||||||
env:
|
|
||||||
KUBERNETES_SERVICE_HOST: kubernetes.default.svc
|
|
||||||
KUBERNETES_SERVICE_PORT: 443
|
|
||||||
run: |
|
run: |
|
||||||
/usr/local/bin/kubectl apply -f k8s-deployment.yaml
|
# 1. Appliquer le déploiement
|
||||||
/usr/local/bin/kubectl rollout restart deployment/microservice-sample
|
cat k8s-deployment.yaml | docker run -i --rm --network host \
|
||||||
|
-v /var/run/secrets/kubernetes.io/serviceaccount:/var/run/secrets/kubernetes.io/serviceaccount \
|
||||||
|
-e KUBERNETES_SERVICE_HOST=kubernetes.default.svc \
|
||||||
|
-e KUBERNETES_SERVICE_PORT=443 \
|
||||||
|
bitnami/kubectl:latest apply -f -
|
||||||
|
|
||||||
|
# 2. Redémarrer le service
|
||||||
|
docker run -i --rm --network host \
|
||||||
|
-v /var/run/secrets/kubernetes.io/serviceaccount:/var/run/secrets/kubernetes.io/serviceaccount \
|
||||||
|
-e KUBERNETES_SERVICE_HOST=kubernetes.default.svc \
|
||||||
|
-e KUBERNETES_SERVICE_PORT=443 \
|
||||||
|
bitnami/kubectl:latest rollout restart deployment/microservice-sample
|
||||||
Loading…
Reference in New Issue
Block a user