forked from Ultimaker/cura-build-environment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile.windows
60 lines (44 loc) · 1.78 KB
/
Jenkinsfile.windows
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
pipeline {
agent {label 'WSERWER50'}
environment{
old_files_installation = fileExists './installation'
old_files_build = fileExists './build'
//old_containers = sh (script: 'docker ps -a -f name=cura-build-environment | wc -l', , returnStdout:true).trim()
}
stages {
stage ('Clean environment files old_files_installation') {
when { expression { old_files_installation == 'true' } }
steps {
bat 'powershell "rm -r -fo ./installation"'
}
}
stage ('Clean environment files old_files_build') {
when { expression { old_files_build == 'true' } }
steps {
bat 'powershell "rm -r -fo ./build"'
}
}
stage ('Run build') {
steps {
withCredentials([file(credentialsId: 'certificate_windows', variable: 'CERTIFICATE_WINDOWS')]) {
bat 'powershell "Copy-Item %CERTIFICATE_WINDOWS% -Destination ./docker/certificate.pfx"'
bat 'powershell "./windows_build.ps1"'
bat 'powershell "Remove-Item ./docker/certificate.pfx"'
}
}
}
stage ('Signing') {
steps {
withCredentials([file(credentialsId: 'certificate_windows', variable: 'CERTIFICATE_WINDOWS')]) {
bat 'powershell "signtool sign /fd SHA256 /a /f %CERTIFICATE_WINDOWS% ./windows-installers/output/Zmorph_Divid*"'
bat 'powershell "./signing/windows_installer_exe_signing.ps1"'
}
}
}
}
post {
always {
archiveArtifacts artifacts: 'windows-installers/output/', fingerprint: true
}
}
}