From fca362ccdf237fb9f7447765ea0f20c7b367382f Mon Sep 17 00:00:00 2001 From: ronger Date: Sat, 24 Sep 2022 15:22:14 +0000 Subject: [PATCH] Add .onedev-buildspec.yml --- .onedev-buildspec.yml | 46 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .onedev-buildspec.yml diff --git a/.onedev-buildspec.yml b/.onedev-buildspec.yml new file mode 100644 index 0000000..ff4cc44 --- /dev/null +++ b/.onedev-buildspec.yml @@ -0,0 +1,46 @@ +version: 18 +jobs: +- name: maven ci + steps: + - !CheckoutStep + name: checkout + cloneCredential: !DefaultCredential {} + withLfs: false + withSubmodules: false + condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + - !CommandStep + name: detect build version + runInContainer: true + image: '@script:builtin:maven:determine-docker-image@' + interpreter: !DefaultInterpreter + commands: + - echo "Detecting project version (may require some time while downloading maven + dependencies)..." + - echo $(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version + -q -DforceStdout) > buildVersion + useTTY: false + condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + - !SetBuildVersionStep + name: set build version + buildVersion: '@file:buildVersion@' + condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + - !CommandStep + name: run unit tests + runInContainer: true + image: '@script:builtin:maven:determine-docker-image@' + interpreter: !DefaultInterpreter + commands: + - mvn clean test + useTTY: false + condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + triggers: + - !BranchUpdateTrigger {} + retryCondition: never + maxRetries: 3 + retryDelay: 30 + cpuRequirement: 250 + memoryRequirement: 256 + caches: + - key: maven-cache + path: /root/.m2/repository + timeout: 3600