forked from Dyalog/ride
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
118 lines (118 loc) · 3.45 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
pipeline {
agent none
stages {
stage('Build Linux & Windows') {
agent {
docker {
image 'dyalogci/node:lts'
registryCredentialsId '0435817a-5f0f-47e1-9dcc-800d85e5c335'
args '-v /devt:/devt'
}
}
steps {
checkout scm
sh 'rm -Rf _ ship'
sh 'npm i'
sh './mk l a w'
sh './CI/publish.sh'
stash name: 'ride-win', includes: '_/ride*/Ride-*-win32-ia32/**'
stash name: 'ride-linux', includes: '_/ride*/Ride-*-linux*/**'
stash name: 'ride-version', includes: '_/version, _/version.js'
sh 'rm -Rf _'
}
}
stage ('Packaging') {
parallel {
stage ('Linux Packaging') {
agent {
docker {
image 'dyalogci/node:lts'
registryCredentialsId '0435817a-5f0f-47e1-9dcc-800d85e5c335'
}
}
steps {
sh 'rm -Rf _ ship'
unstash 'ride-linux'
unstash 'ride-version'
sh './CI/packagescripts/linux/packageLinux.sh'
stash name: 'linux-ship', includes: 'ship/*'
sh 'rm -Rf _ ship'
}
}
stage ('Mac Build and Packaging') {
agent {
label 'Mac && Build'
}
steps {
sh 'rm -Rf _ ship'
sh 'npm i'
sh './mk o'
withCredentials([usernamePassword(credentialsId: '868dda6c-aaec-4ee4-845a-57362dec695b', passwordVariable: 'APPLE_APP_PASS', usernameVariable: 'APPLE_ID')]) {
sh './CI/packagescripts/osx/packageOSX.sh'
}
stash name: 'ride-mac', includes: '_/ride*/Ride-*-darwin*/**'
stash name: 'mac-ship', includes: 'ship/*'
sh 'rm -Rf _ ship'
}
}
stage ('Windows Packaging') {
agent {
label 'Windows && ride'
}
steps {
powershell 'if (Test-Path -Path ship) {remove-item ship -Recurse -Force }'
powershell 'if (Test-Path -Path _) { remove-item _ -Recurse -Force }'
unstash 'ride-win'
unstash 'ride-version'
bat './CI/packagescripts/windows/packageWindows.bat'
stash name: 'win-ship', includes: 'ship/*'
powershell 'remove-item ship -Recurse -Force'
powershell 'remove-item _ -Recurse -Force'
}
}
}
}
stage ('Copy install images') {
agent {
docker {
image 'dyalogci/node:lts'
registryCredentialsId '0435817a-5f0f-47e1-9dcc-800d85e5c335'
args '-v /devt:/devt'
}
}
steps {
sh 'rm -Rf _ ship'
unstash 'ride-win'
unstash 'ride-mac'
unstash 'ride-linux'
unstash 'ride-version'
unstash 'linux-ship'
unstash 'mac-ship'
unstash 'win-ship'
sh './CI/copyinstallers.sh'
sh 'rm -Rf _ ship'
}
}
stage ('Publish to Github') {
agent {
docker {
image 'dyalogci/node:lts'
registryCredentialsId '0435817a-5f0f-47e1-9dcc-800d85e5c335'
args '-v /devt:/devt'
}
}
environment {
GHTOKEN = credentials('250bdc45-ee69-451a-8783-30701df16935')
}
steps {
sh 'rm -Rf _ ship'
unstash 'ride-version'
unstash 'linux-ship'
unstash 'mac-ship'
unstash 'win-ship'
sh './CI/GH-Release.sh'
sh 'rm -Rf _ ship'
}
}
}
}