54 lines
872 B
Groovy
54 lines
872 B
Groovy
pipeline {
|
|
agent any
|
|
|
|
tools {
|
|
nodejs 'nodejs'
|
|
}
|
|
|
|
options {
|
|
timestamps()
|
|
disableConcurrentBuilds()
|
|
timeout(time: 30, unit: 'MINUTES')
|
|
}
|
|
|
|
environment {
|
|
NODE_ENV = 'production'
|
|
CI = 'true'
|
|
}
|
|
|
|
stages {
|
|
stage('Checkout') {
|
|
steps {
|
|
checkout scm
|
|
}
|
|
}
|
|
|
|
stage('Install Dependencies') {
|
|
steps {
|
|
sh 'npm ci'
|
|
}
|
|
}
|
|
|
|
stage('Lint') {
|
|
steps {
|
|
sh 'npm run lint'
|
|
}
|
|
}
|
|
|
|
stage('Build') {
|
|
steps {
|
|
sh 'npm run build'
|
|
}
|
|
}
|
|
}
|
|
|
|
post {
|
|
success {
|
|
archiveArtifacts artifacts: 'dist/**', fingerprint: true
|
|
}
|
|
always {
|
|
cleanWs()
|
|
}
|
|
}
|
|
}
|