nodejs tool

This commit is contained in:
Joan Sanchez 2018-10-24 14:10:41 +02:00
parent 001ca835ee
commit e7ead4be1c
1 changed files with 24 additions and 17 deletions

41
Jenkinsfile vendored
View File

@ -17,23 +17,30 @@ switch (env.BRANCH_NAME) {
}
node {
stage ('Print environment variables') {
echo "Branch ${env.BRANCH_NAME}, build number ${env.BUILD_NUMBER}, environment ${env.NODE_ENV}"
agent any
tools {
nodejs 'node'
}
stage ('Checkout') {
checkout scm
}
stage ('Install Node dependencies') {
sh "npm install --only=prod"
sh "npm install --only=dev"
sh "gulp install"
}
stage ('Build project') {
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"
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') {
sh "npm install --only=prod"
sh "npm install --only=dev"
sh "gulp install"
}
stage ('Build project') {
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"
}
}
}