diff --git a/Jenkinsfile b/Jenkinsfile index e273dad19..b646f3567 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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" + } } }