nodejs tool
This commit is contained in:
parent
001ca835ee
commit
e7ead4be1c
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue