40 lines
701 B
Groovy
40 lines
701 B
Groovy
pipeline {
|
|
agent any
|
|
|
|
environment {
|
|
NODE_ENV = 'production'
|
|
}
|
|
|
|
stages {
|
|
stage('Install Dependencies') {
|
|
steps {
|
|
sh 'npm ci'
|
|
}
|
|
}
|
|
|
|
stage('Build') {
|
|
steps {
|
|
sh 'npm run build'
|
|
}
|
|
}
|
|
|
|
stage('Deploy') {
|
|
steps {
|
|
echo 'Deploying application...'
|
|
// Add your deployment steps here
|
|
}
|
|
}
|
|
}
|
|
|
|
post {
|
|
always {
|
|
cleanWs()
|
|
}
|
|
success {
|
|
echo 'Pipeline completed successfully!'
|
|
}
|
|
failure {
|
|
echo 'Pipeline failed!'
|
|
}
|
|
}
|
|
} |