Compare commits
4 Commits
274478532e
...
chore/add-
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a54ecd003 | |||
| 8dea27d14a | |||
| 96ddb09ea3 | |||
| 4865ca8392 |
1
.node-version
Normal file
1
.node-version
Normal file
@@ -0,0 +1 @@
|
|||||||
|
v22.22.0
|
||||||
74
Jenkinsfile
vendored
Normal file
74
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
|
||||||
|
options {
|
||||||
|
timestamps()
|
||||||
|
}
|
||||||
|
|
||||||
|
parameters {
|
||||||
|
choice(
|
||||||
|
name: 'XSH_DEPLOY_TARGET',
|
||||||
|
choices: ['main'],
|
||||||
|
description: 'main:眩生花线上版本'
|
||||||
|
)
|
||||||
|
booleanParam(
|
||||||
|
name: 'XSH_DEPLOY_TO_PRODUCTION',
|
||||||
|
defaultValue: true,
|
||||||
|
description: '是否自动部署到线上环境(否则只构建产物)\n* 仅在 main 分支生效'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
tools {
|
||||||
|
nodejs 'NodeJS 22.22'
|
||||||
|
}
|
||||||
|
|
||||||
|
libraries {
|
||||||
|
lib('xsh-common@main')
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Checkout') {
|
||||||
|
steps {
|
||||||
|
checkout scm
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Lint') {
|
||||||
|
steps {
|
||||||
|
sh '''
|
||||||
|
corepack enable
|
||||||
|
pnpm install --registry=https://registry.npmmirror.com
|
||||||
|
pnpm run lint
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build') {
|
||||||
|
when {
|
||||||
|
allOf {
|
||||||
|
expression { currentBuild.currentResult == 'SUCCESS' }
|
||||||
|
expression { env.TAG_NAME != null }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh '''
|
||||||
|
corepack enable
|
||||||
|
pnpm install --registry=https://registry.npmmirror.com
|
||||||
|
pnpm run generate
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
echo "Build finished: ${currentBuild.currentResult}"
|
||||||
|
}
|
||||||
|
success {
|
||||||
|
archiveArtifacts allowEmptyArchive: true, artifacts: 'dist/**', followSymlinks: true, onlyIfSuccessful: true
|
||||||
|
}
|
||||||
|
failure {
|
||||||
|
echo "Build failed"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9841
pnpm-lock.yaml
generated
9841
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user