This commit is contained in:
Joan Sanchez 2018-10-24 14:41:38 +02:00
parent 78bda2c795
commit 6493b05f2b
1 changed files with 21 additions and 23 deletions

44
Jenkinsfile vendored
View File

@ -21,29 +21,27 @@ node {
// on linux / mac
//env.PATH="${env.NODEJS_HOME}/bin:${env.PATH}"
stages {
stage ('Print environment variables') {
echo "Branch ${env.BRANCH_NAME}, build number ${env.BUILD_NUMBER}, environment ${env.NODE_ENV}"
}
stage ('Checkout') {
checkout scm
}
stage ('Install Node dependencies') {
nodejs('node-8.12.0') {
sh "npm install --only=prod"
sh "npm install --only=dev"
sh "gulp install"
}
}
stage ('Build project') {
nodejs('node-8.12.0') {
sh "gulp build"
}
}
stage ('Generating new dockers') {
sh "docker build -t vn-loopback:latest ./services/loopback/"
sh "docker-compose up -d --build"
sh "docker image prune -f"
stage ('Print environment variables') {
echo "Branch ${env.BRANCH_NAME}, build number ${env.BUILD_NUMBER}, environment ${env.NODE_ENV}"
}
stage ('Checkout') {
checkout scm
}
stage ('Install Node dependencies') {
nodejs('node-8.12.0') {
sh "npm install --only=prod"
sh "npm install --only=dev"
sh "gulp install"
}
}
stage ('Build project') {
nodejs('node-8.12.0') {
sh "gulp build"
}
}
stage ('Generating new dockers') {
sh "docker build -t vn-loopback:latest ./services/loopback/"
sh "docker-compose up -d --build"
sh "docker image prune -f"
}
}