fix: use kaniko instead of docker
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
34
.drone.yml
34
.drone.yml
@@ -17,15 +17,16 @@ steps:
|
||||
- mvn clean package -DskipTests
|
||||
|
||||
- name: dev-build-image
|
||||
image: ccr.ccs.tencentyun.com/violin/docker:linux-amd64
|
||||
image: ccr.ccs.tencentyun.com/violin/kaniko-project-executor:latest
|
||||
environment:
|
||||
DOCKER_CONFIG:
|
||||
from_secret: docker_config
|
||||
commands:
|
||||
- docker build -t ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA} .
|
||||
- docker push ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA}
|
||||
settings:
|
||||
username:
|
||||
from_secret: registry_username
|
||||
password:
|
||||
from_secret: registry_password
|
||||
- >-
|
||||
/kaniko/executor
|
||||
--context .
|
||||
--destination ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA}
|
||||
--destination ccr.ccs.tencentyun.com/violin/todo-backend:latest
|
||||
|
||||
- name: dev-deploy
|
||||
image: ccr.ccs.tencentyun.com/violin/kubectl:latest
|
||||
@@ -55,15 +56,16 @@ steps:
|
||||
- mvn clean package -DskipTests
|
||||
|
||||
- name: prod-build-image
|
||||
image: ccr.ccs.tencentyun.com/violin/docker:linux-amd64
|
||||
image: ccr.ccs.tencentyun.com/violin/kaniko-project-executor:latest
|
||||
environment:
|
||||
DOCKER_CONFIG:
|
||||
from_secret: docker_config
|
||||
commands:
|
||||
- docker build -t ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA} .
|
||||
- docker push ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA}
|
||||
settings:
|
||||
username:
|
||||
from_secret: registry_username
|
||||
password:
|
||||
from_secret: registry_password
|
||||
- >-
|
||||
/kaniko/executor
|
||||
--context .
|
||||
--destination ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA}
|
||||
--destination ccr.ccs.tencentyun.com/violin/todo-backend:v1.0.0
|
||||
|
||||
- name: prod-deploy
|
||||
image: ccr.ccs.tencentyun.com/violin/kubectl:latest
|
||||
|
||||
Reference in New Issue
Block a user