-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
33 lines (33 loc) · 893 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
pipeline {
agent any
stages {
stage('setup') {
steps {
sh '''export NVM_DIR="$HOME/.nvm" # set local path to NVM
. ~/.nvm/nvm.sh # add NVM into the Shell session
nvm use v12.4.0 # choose current version
npm install
'''
}
}
stage('build') {
steps {
echo 'BUILD STAGE'
sh '''set +ex # immediate script fail off, echo off
export NVM_DIR="$HOME/.nvm" # set local path to NVM
. ~/.nvm/nvm.sh # add NVM into the Shell session
nvm use 12.4.0 # choose current version
set -ex # immediate script fail on (default), echo on (default)
ng build --prod'''
}
}
stage('deploy') {
environment {
SW_PATH = credentials('sw-path')
}
steps {
sh 'cp -p -r dist/b4os-scholarly-wallet-client/* $SW_PATH'
}
}
}
}