diff --git a/.drone.yml b/.drone.yml index 9021916..bac50d1 100644 --- a/.drone.yml +++ b/.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