2022-09-18 18:55:27 +08:00
|
|
|
version: 18
|
|
|
|
jobs:
|
2022-09-18 20:31:27 +08:00
|
|
|
- name: vue ci
|
2022-09-18 18:55:27 +08:00
|
|
|
steps:
|
2022-09-18 20:31:27 +08:00
|
|
|
- !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:16.17.0-alpine
|
|
|
|
interpreter: !DefaultInterpreter
|
|
|
|
commands:
|
2022-09-18 20:45:41 +08:00
|
|
|
- yarn --registry=https://registry.npm.taobao.org
|
|
|
|
- npx nuxt build
|
2022-09-18 20:31:27 +08:00
|
|
|
useTTY: false
|
2022-09-18 18:55:27 +08:00
|
|
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
|
|
|
triggers:
|
2022-09-18 20:31:27 +08:00
|
|
|
- !BranchUpdateTrigger {}
|
2022-09-18 18:55:27 +08:00
|
|
|
retryCondition: never
|
|
|
|
maxRetries: 3
|
|
|
|
retryDelay: 30
|
|
|
|
cpuRequirement: 250
|
|
|
|
memoryRequirement: 256
|
2022-09-18 20:31:27 +08:00
|
|
|
caches:
|
|
|
|
- key: npm-cache
|
|
|
|
path: /root/.npm
|
2022-09-18 18:55:27 +08:00
|
|
|
timeout: 3600
|
2022-09-18 21:40:09 +08:00
|
|
|
- name: Build Docker Image
|
|
|
|
steps:
|
|
|
|
- !CheckoutStep
|
|
|
|
name: Checkout Code
|
|
|
|
cloneCredential: !DefaultCredential {}
|
|
|
|
withLfs: false
|
|
|
|
withSubmodules: false
|
|
|
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
|
|
|
- !BuildImageStep
|
|
|
|
name: Build Docker Image
|
|
|
|
tags: rymcu/nebula:latest
|
|
|
|
publish: false
|
|
|
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
2022-10-11 08:33:16 +08:00
|
|
|
jobExecutor: internal
|
|
|
|
triggers:
|
|
|
|
- !TagCreateTrigger
|
|
|
|
projects: nebula
|
|
|
|
retryCondition: never
|
|
|
|
maxRetries: 3
|
|
|
|
retryDelay: 30
|
|
|
|
cpuRequirement: 250
|
|
|
|
memoryRequirement: 256
|
|
|
|
timeout: 3600
|
|
|
|
- name: Pull from GitHub
|
|
|
|
steps:
|
|
|
|
- !PullRepository
|
|
|
|
name: Pull from GitHub
|
|
|
|
remoteUrl: https://github.com/ronger-x/nebula
|
|
|
|
syncToChildProject: false
|
|
|
|
passwordSecret: access_token
|
|
|
|
refs: refs/heads/* refs/tags/*
|
|
|
|
withLfs: false
|
|
|
|
force: false
|
|
|
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
2022-09-18 21:40:09 +08:00
|
|
|
triggers:
|
2022-10-11 08:33:16 +08:00
|
|
|
- !ScheduleTrigger
|
|
|
|
cronExpression: 0 0 1 * * ?
|
|
|
|
projects: nebula
|
|
|
|
retryCondition: never
|
|
|
|
maxRetries: 3
|
|
|
|
retryDelay: 30
|
|
|
|
cpuRequirement: 250
|
|
|
|
memoryRequirement: 256
|
|
|
|
timeout: 3600
|
|
|
|
- name: Push to GitHub
|
|
|
|
steps:
|
|
|
|
- !PushRepository
|
|
|
|
name: Push to GitHub
|
|
|
|
remoteUrl: https://github.com/ronger-x/nebula
|
|
|
|
passwordSecret: access_token
|
|
|
|
withLfs: false
|
|
|
|
force: false
|
|
|
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
|
|
|
triggers:
|
|
|
|
- !BranchUpdateTrigger
|
|
|
|
projects: nebula
|
2022-09-18 21:40:09 +08:00
|
|
|
- !TagCreateTrigger
|
|
|
|
projects: nebula
|
|
|
|
retryCondition: never
|
|
|
|
maxRetries: 3
|
|
|
|
retryDelay: 30
|
|
|
|
cpuRequirement: 250
|
|
|
|
memoryRequirement: 256
|
|
|
|
timeout: 3600
|