Fix Drone variable syntax to ${DRONE_COMMIT_SHA}
Some checks failed
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Agent
2026-03-20 15:34:49 +00:00
parent 209bc304ba
commit cbec4824de

View File

@@ -28,7 +28,7 @@ steps:
settings: settings:
repo: ccr.ccs.tencentyun.com/violin/todo-backend repo: ccr.ccs.tencentyun.com/violin/todo-backend
tags: tags:
- {{ DRONE_COMMIT_SHA }} - ${DRONE_COMMIT_SHA}
- latest - latest
username: username:
from_secret: registry_username from_secret: registry_username
@@ -38,7 +38,7 @@ steps:
- name: deploy-to-k8s - name: deploy-to-k8s
image: bitnami/kubectl:latest image: bitnami/kubectl:latest
commands: commands:
- kubectl set image deployment/todo-backend todo-backend=ccr.ccs.tencentyun.com/violin/todo-backend:{{ DRONE_COMMIT_SHA }} -n todo-test - kubectl set image deployment/todo-backend todo-backend=ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA} -n todo-test
- kubectl rollout status deployment/todo-backend -n todo-test - kubectl rollout status deployment/todo-backend -n todo-test
environment: environment:
KUBECONFIG: KUBECONFIG:
@@ -84,7 +84,7 @@ steps:
settings: settings:
repo: ccr.ccs.tencentyun.com/violin/todo-backend repo: ccr.ccs.tencentyun.com/violin/todo-backend
tags: tags:
- {{ DRONE_COMMIT_SHA }} - ${DRONE_COMMIT_SHA}
- v1.0.0 - v1.0.0
username: username:
from_secret: registry_username from_secret: registry_username
@@ -94,7 +94,7 @@ steps:
- name: deploy-to-k8s - name: deploy-to-k8s
image: bitnami/kubectl:latest image: bitnami/kubectl:latest
commands: commands:
- kubectl set image deployment/todo-backend todo-backend=ccr.ccs.tencentyun.com/violin/todo-backend:{{ DRONE_COMMIT_SHA }} -n todo-prod - kubectl set image deployment/todo-backend todo-backend=ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA} -n todo-prod
- kubectl rollout status deployment/todo-backend -n todo-prod - kubectl rollout status deployment/todo-backend -n todo-prod
environment: environment:
KUBECONFIG: KUBECONFIG: