/
Jenkinsfile
44 lines (37 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
34
35
36
37
38
39
40
41
42
43
44
@Library('pipeline') _
properties([
buildDiscarder(
logRotator(
artifactDaysToKeepStr: '10',
artifactNumToKeepStr: '10',
daysToKeepStr: '10',
numToKeepStr: '10'
)
),
disableConcurrentBuilds()
])
node('nodejs') {
useNodeJs('10.2.1', '6.1.0')
dir('build') {
stage('checkout') {
checkout scm
}
stage('npm install') {
sh "npm install --ignore-scripts"
}
stage('test') {
sh "npm test"
}
stage('build') {
sh "npm run build"
}
stage('package mac') {
sh 'npm run package:mac'
dir('build/TimeTrack-darwin-x64') {
sh 'zip -r TimeTrack.zip TimeTrack.app'
archiveArtifacts 'TimeTrack.zip'
}
}
}
cleanWs()
}