The Unified and Autonomous Development Platform
Edit .onedev-buildspec.yml
Robin Shen25f6636d4076
diff --git a/.onedev-buildspec.yml b/.onedev-buildspec.ymlindex 9975beac24..c9264514e5 100644--- a/.onedev-buildspec.yml+++ b/.onedev-buildspec.yml@@ -4,41 +4,6 @@ imports:revision: mainaccessTokenSecret: onedev-tokenjobs:-- name: CI- steps:- - !CheckoutStep- name: checkout- cloneCredential: !HttpCredential- accessTokenSecret: onedev-token- withLfs: false- withSubmodules: true- cloneDepth: 1- condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL- - !UseTemplateStep- name: set up cache- templateName: set up cache- condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL- - !UseTemplateStep- name: set build version- templateName: set build version- condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL- - !CommandStep- name: test- runInContainer: true- image: '@property:buildEnvironment@'- interpreter: !DefaultInterpreter- commands: |- mvn test -Pee- useTTY: true- condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL- triggers:- - !BranchUpdateTrigger- branches: main- projects: onedev/server- retryCondition: never- maxRetries: 3- retryDelay: 30- timeout: 3600- name: Releasesteps:- !CheckoutStep@@ -193,32 +158,8 @@ jobs:jobDependencies:- jobName: CIrequireSuccessful: true- retryCondition: never- maxRetries: 3- retryDelay: 30- timeout: 3600-- name: Sync Main (GitHub)- steps:- - !CheckoutStep- name: checkout- cloneCredential: !DefaultCredential {}- withLfs: false- withSubmodules: false- condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL- - !CommandStep- name: sync- runInContainer: true- image: alpine/git:1.0.7- interpreter: !DefaultInterpreter- commands: |- git config --global --unset http.extraHeader- git push -f https://robinshine:@secrets:github-token@@@github.com/theonedev/onedev.git- useTTY: false- condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL- triggers:- - !BranchUpdateTrigger- branches: main- projects: onedev/server+ - jobName: Scan Vulnerabilities+ requireSuccessful: trueretryCondition: nevermaxRetries: 3retryDelay: 30@@ -348,3 +289,64 @@ jobs:- !SendNotificationActioncondition: failedreceivers: committers+- name: CI+ steps:+ - !CheckoutStep+ name: checkout+ cloneCredential: !HttpCredential+ accessTokenSecret: onedev-token+ withLfs: false+ withSubmodules: true+ cloneDepth: 1+ condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL+ - !UseTemplateStep+ name: set up cache+ templateName: set up cache+ condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL+ - !UseTemplateStep+ name: set build version+ templateName: set build version+ condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL+ - !CommandStep+ name: test+ runInContainer: true+ image: '@property:buildEnvironment@'+ interpreter: !DefaultInterpreter+ commands: |+ mvn test -Pee+ useTTY: true+ condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL+ triggers:+ - !BranchUpdateTrigger+ branches: main+ projects: onedev/server+ retryCondition: never+ maxRetries: 3+ retryDelay: 30+ timeout: 3600+- name: Sync Main (GitHub)+ steps:+ - !CheckoutStep+ name: checkout+ cloneCredential: !DefaultCredential {}+ withLfs: false+ withSubmodules: false+ condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL+ - !CommandStep+ name: sync+ runInContainer: true+ image: alpine/git:1.0.7+ interpreter: !DefaultInterpreter+ commands: |+ git config --global --unset http.extraHeader+ git push -f https://robinshine:@secrets:github-token@@@github.com/theonedev/onedev.git+ useTTY: false+ condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL+ triggers:+ - !BranchUpdateTrigger+ branches: main+ projects: onedev/server+ retryCondition: never+ maxRetries: 3+ retryDelay: 30+ timeout: 3600