nodejs tool
This commit is contained in:
parent
e7ead4be1c
commit
78bda2c795
|
@ -17,11 +17,10 @@ switch (env.BRANCH_NAME) {
|
|||
}
|
||||
|
||||
node {
|
||||
agent any
|
||||
//env.NODEJS_HOME = "${tool 'node-8.12.0'}"
|
||||
// on linux / mac
|
||||
//env.PATH="${env.NODEJS_HOME}/bin:${env.PATH}"
|
||||
|
||||
tools {
|
||||
nodejs 'node'
|
||||
}
|
||||
stages {
|
||||
stage ('Print environment variables') {
|
||||
echo "Branch ${env.BRANCH_NAME}, build number ${env.BUILD_NUMBER}, environment ${env.NODE_ENV}"
|
||||
|
@ -30,12 +29,16 @@ node {
|
|||
checkout scm
|
||||
}
|
||||
stage ('Install Node dependencies') {
|
||||
sh "npm install --only=prod"
|
||||
sh "npm install --only=dev"
|
||||
sh "gulp install"
|
||||
nodejs('node-8.12.0') {
|
||||
sh "npm install --only=prod"
|
||||
sh "npm install --only=dev"
|
||||
sh "gulp install"
|
||||
}
|
||||
}
|
||||
stage ('Build project') {
|
||||
sh "gulp build"
|
||||
nodejs('node-8.12.0') {
|
||||
sh "gulp build"
|
||||
}
|
||||
}
|
||||
stage ('Generating new dockers') {
|
||||
sh "docker build -t vn-loopback:latest ./services/loopback/"
|
||||
|
|
Loading…
Reference in New Issue