38 lines
704 B
Groovy
38 lines
704 B
Groovy
pipeline {
|
|
agent any
|
|
|
|
environment {
|
|
PHP_VERSION = '8.1'
|
|
COMPOSER_HOME = "${WORKSPACE}/.composer"
|
|
}
|
|
|
|
stages {
|
|
stage('Checkout') {
|
|
steps {
|
|
sh "git checkout staging"
|
|
sh "git pull origin staging"
|
|
}
|
|
}
|
|
|
|
stage('Build Assets') {
|
|
steps {
|
|
sh "cd /var/www/lpj"
|
|
sh "npm install"
|
|
sh "npm run build"
|
|
}
|
|
}
|
|
}
|
|
|
|
post {
|
|
always {
|
|
cleanWs()
|
|
}
|
|
success {
|
|
echo 'The pipeline has succeeded!'
|
|
}
|
|
failure {
|
|
echo 'The pipeline has failed.'
|
|
}
|
|
}
|
|
}
|