Revert "chore: use default clone for public repo"
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This reverts commit 176f587996.
This commit is contained in:
36
.drone.yml
36
.drone.yml
@@ -3,6 +3,9 @@ type: kubernetes
|
|||||||
|
|
||||||
name: build-and-deploy-dev
|
name: build-and-deploy-dev
|
||||||
|
|
||||||
|
clone:
|
||||||
|
disable: true
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
@@ -10,15 +13,26 @@ trigger:
|
|||||||
- dev
|
- dev
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: dev-clone
|
||||||
|
image: ccr.ccs.tencentyun.com/violin/git-alpine:latest
|
||||||
|
commands:
|
||||||
|
- 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
|
||||||
|
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:
|
commands:
|
||||||
- docker build -t ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA} .
|
- 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}
|
- docker push ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA}
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
@@ -41,6 +55,9 @@ type: kubernetes
|
|||||||
|
|
||||||
name: build-and-deploy-prod
|
name: build-and-deploy-prod
|
||||||
|
|
||||||
|
clone:
|
||||||
|
disable: true
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
@@ -48,15 +65,26 @@ trigger:
|
|||||||
- master
|
- master
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: prod-clone
|
||||||
|
image: ccr.ccs.tencentyun.com/violin/git-alpine:latest
|
||||||
|
commands:
|
||||||
|
- 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
|
||||||
|
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:
|
commands:
|
||||||
- docker build -t ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA} .
|
- 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}
|
- docker push ccr.ccs.tencentyun.com/violin/todo-backend:${DRONE_COMMIT_SHA}
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
|
|||||||
Reference in New Issue
Block a user