From a8cd10dc72388770665ec5d52ac979ae3dbd66a3 Mon Sep 17 00:00:00 2001 From: Guillaume Dorce Date: Wed, 15 Feb 2023 18:37:56 +0000 Subject: [PATCH] Edit .onedev-buildspec.yml for next build --- .onedev-buildspec.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.onedev-buildspec.yml b/.onedev-buildspec.yml index 5491ef9..c732cb7 100644 --- a/.onedev-buildspec.yml +++ b/.onedev-buildspec.yml @@ -1,4 +1,38 @@ version: 19 +jobs: +- name: next build + steps: + - !CheckoutStep + name: checkout + cloneCredential: !DefaultCredential {} + withLfs: false + withSubmodules: false + condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + - !SetBuildVersionStep + name: set build version + buildVersion: '@script:builtin:node:determine-project-version@' + condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + - !CommandStep + name: build & test + runInContainer: true + image: node:lts-hydrogen + interpreter: !DefaultInterpreter + commands: + - npm install + - export CI=TRUE + - npx next build + - npx next lint + useTTY: false + condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + triggers: + - !BranchUpdateTrigger {} + retryCondition: never + maxRetries: 3 + retryDelay: 30 + caches: + - key: npm-cache + path: /root/.npm + timeout: 3600 services: - name: run image: node:lts-hydrogen