Compare commits
2 Commits
274478532e
...
v2.0.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
| 96ddb09ea3 | |||
| 4865ca8392 |
58
Jenkinsfile
vendored
Normal file
58
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
|
||||||
|
options {
|
||||||
|
timestamps()
|
||||||
|
}
|
||||||
|
|
||||||
|
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 {
|
||||||
|
expression { currentBuild.currentResult == 'SUCCESS' }
|
||||||
|
}
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user