fix: manually clone with credentials in commands
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:
41
.drone.yml
41
.drone.yml
@@ -3,13 +3,6 @@ type: kubernetes
|
|||||||
|
|
||||||
name: build-and-deploy-dev
|
name: build-and-deploy-dev
|
||||||
|
|
||||||
clone:
|
|
||||||
git:
|
|
||||||
username:
|
|
||||||
from_secret: git_username
|
|
||||||
password:
|
|
||||||
from_secret: git_password
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
@@ -17,10 +10,25 @@ 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 /drone/src
|
||||||
|
- cd /drone/src
|
||||||
|
- git checkout dev
|
||||||
|
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
|
- mvn clean package -DskipTests
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
|
||||||
- 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
|
||||||
@@ -49,13 +57,6 @@ type: kubernetes
|
|||||||
|
|
||||||
name: build-and-deploy-prod
|
name: build-and-deploy-prod
|
||||||
|
|
||||||
clone:
|
|
||||||
git:
|
|
||||||
username:
|
|
||||||
from_secret: git_username
|
|
||||||
password:
|
|
||||||
from_secret: git_password
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
@@ -63,6 +64,18 @@ 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 /drone/src
|
||||||
|
- cd /drone/src
|
||||||
|
- git checkout master
|
||||||
|
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:
|
||||||
|
|||||||
Reference in New Issue
Block a user