From 481de04ee5944374dd23f6abfa976e1a055b6c68 Mon Sep 17 00:00:00 2001 From: Trivernis Date: Thu, 19 Dec 2019 20:11:22 +0100 Subject: [PATCH] Jenkins config dependencies - added extra task to install dependencies for time tracking --- Jenkinsfile | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5c53f8a..6f7ffd3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,21 +2,28 @@ pipeline { agent any stages { - stage('Stylecheck') { - steps { - echo 'Checking Style...' - nodejs(nodeJSInstallationName: 'Node 12.x') { - sh 'npm i' - sh 'npm i typescript tslint' - sh 'tslint "src/**/*.ts"' + stage('Dependencies') { + steps { + echo 'Installing Dependencies...' + nodejs(nodeJSInstallationName: 'Node 12.x') { + sh 'npm i @angular/cli' + sh 'npm i' + sh 'tslint "src/**/*.ts"' + } } } + stage('Stylecheck') { + steps { + echo 'Checking Style...' + nodejs(nodeJSInstallationName: 'Node 12.x') { + sh 'tslint "src/**/*.ts"' + } + } } stage('Build') { steps { echo 'Building...' nodejs(nodeJSInstallationName: 'Node 12.x') { - sh 'npm i @angular/cli' sh 'ng build --prod' } }