46 lines
704 B
Groovy
46 lines
704 B
Groovy
pipeline {
|
|
agent any
|
|
|
|
options {
|
|
timestamps()
|
|
}
|
|
|
|
tools {
|
|
nodejs 'NodeJS 22.22'
|
|
}
|
|
|
|
libraries {
|
|
lib('xsh-common@main')
|
|
}
|
|
|
|
stages {
|
|
stage('Checkout') {
|
|
steps {
|
|
checkout scm
|
|
}
|
|
}
|
|
|
|
stage('Build') {
|
|
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"
|
|
}
|
|
}
|
|
}
|