fix: use custom clone step instead of default
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:
36
.drone.yml
36
.drone.yml
@@ -15,24 +15,26 @@ trigger:
|
|||||||
steps:
|
steps:
|
||||||
- name: dev-clone
|
- name: dev-clone
|
||||||
image: ccr.ccs.tencentyun.com/violin/git-alpine:latest
|
image: ccr.ccs.tencentyun.com/violin/git-alpine:latest
|
||||||
settings:
|
commands:
|
||||||
username:
|
- git clone https://${GIT_USERNAME}:${GIT_PASSWORD}@gitea.violin-work.online/sales/todo-backend.git /repo
|
||||||
|
- cd /repo && git checkout ${DRONE_COMMIT_SHA}
|
||||||
|
environment:
|
||||||
|
GIT_USERNAME:
|
||||||
from_secret: git_username
|
from_secret: git_username
|
||||||
password:
|
GIT_PASSWORD:
|
||||||
from_secret: git_password
|
from_secret: git_password
|
||||||
|
|
||||||
- name: dev-build
|
- name: dev-build
|
||||||
image: ccr.ccs.tencentyun.com/violin/maven:3.9-eclipse-temurin-22
|
image: ccr.ccs.tencentyun.com/violin/maven:3.9-eclipse-temurin-22
|
||||||
commands:
|
commands:
|
||||||
- mvn clean package -DskipTests
|
- cd /repo && mvn clean package -DskipTests
|
||||||
|
|
||||||
- name: dev-build-image
|
- name: dev-build-image
|
||||||
image: ccr.ccs.tencentyun.com/violin/docker:linux-amd64
|
image: ccr.ccs.tencentyun.com/violin/docker:linux-amd64
|
||||||
|
commands:
|
||||||
|
- docker build -t ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA} /repo
|
||||||
|
- docker push ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA}
|
||||||
settings:
|
settings:
|
||||||
repo: ccr.ccs.tencentyun.com/violin/todo-backend
|
|
||||||
tags:
|
|
||||||
- ${DRONE_COMMIT_SHA}
|
|
||||||
- latest
|
|
||||||
username:
|
username:
|
||||||
from_secret: registry_username
|
from_secret: registry_username
|
||||||
password:
|
password:
|
||||||
@@ -65,24 +67,26 @@ trigger:
|
|||||||
steps:
|
steps:
|
||||||
- name: prod-clone
|
- name: prod-clone
|
||||||
image: ccr.ccs.tencentyun.com/violin/git-alpine:latest
|
image: ccr.ccs.tencentyun.com/violin/git-alpine:latest
|
||||||
settings:
|
commands:
|
||||||
username:
|
- git clone https://${GIT_USERNAME}:${GIT_PASSWORD}@gitea.violin-work.online/sales/todo-backend.git /repo
|
||||||
|
- cd /repo && git checkout ${DRONE_COMMIT_SHA}
|
||||||
|
environment:
|
||||||
|
GIT_USERNAME:
|
||||||
from_secret: git_username
|
from_secret: git_username
|
||||||
password:
|
GIT_PASSWORD:
|
||||||
from_secret: git_password
|
from_secret: git_password
|
||||||
|
|
||||||
- name: prod-build
|
- name: prod-build
|
||||||
image: ccr.ccs.tencentyun.com/violin/maven:3.9-eclipse-temurin-22
|
image: ccr.ccs.tencentyun.com/violin/maven:3.9-eclipse-temurin-22
|
||||||
commands:
|
commands:
|
||||||
- mvn clean package -DskipTests
|
- cd /repo && mvn clean package -DskipTests
|
||||||
|
|
||||||
- name: prod-build-image
|
- name: prod-build-image
|
||||||
image: ccr.ccs.tencentyun.com/violin/docker:linux-amd64
|
image: ccr.ccs.tencentyun.com/violin/docker:linux-amd64
|
||||||
|
commands:
|
||||||
|
- docker build -t ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA} /repo
|
||||||
|
- docker push ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA}
|
||||||
settings:
|
settings:
|
||||||
repo: ccr.ccs.tencentyun.com/violin/todo-backend
|
|
||||||
tags:
|
|
||||||
- ${DRONE_COMMIT_SHA}
|
|
||||||
- v1.0.0
|
|
||||||
username:
|
username:
|
||||||
from_secret: registry_username
|
from_secret: registry_username
|
||||||
password:
|
password:
|
||||||
|
|||||||
Reference in New Issue
Block a user