ci(piano-sheet): apply k8s manifests before rollout
CI 第一次跑时 ns / PVC / svc / ingress 还不存在,直接 set image 会失败。加一步 kubectl apply -f apps/piano-sheet/k8s/,让 ns + PVC + deployment + service + ingress + middleware 都先就位,再 做镜像 set + rollout status。
This commit is contained in:
@@ -45,6 +45,10 @@ jobs:
|
||||
docker build -f "apps/$APP/Dockerfile" -t "$IMAGE:${{ steps.tag.outputs.sha }}" .
|
||||
docker push "$IMAGE:${{ steps.tag.outputs.sha }}"
|
||||
|
||||
- name: Initialize K8s resources
|
||||
run: |
|
||||
kubectl apply -f apps/piano-sheet/k8s/
|
||||
|
||||
- name: Roll out to k3s
|
||||
run: |
|
||||
kubectl -n "cube-$APP" set image "deploy/$APP" "$APP=$IMAGE:${{ steps.tag.outputs.sha }}"
|
||||
|
||||
Reference in New Issue
Block a user