forked from Oysica/Pandas
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile
123 lines (111 loc) · 2.23 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
119
120
121
122
123
def loadEnvironmentFromFile(path) {
def props = readProperties file: path
keys= props.keySet()
for(key in keys) {
value = props["${key}"]
env."${key}" = "${value}"
}
}
pipeline {
agent any
environment {
CRASHRPT_APPID = credentials('422b61bc-371d-4cf0-b131-fffca123ddb8')
CRASHRPT_PUBLICKEY = credentials('6e5e965d-ffd8-4cfc-9ebf-58fd1fd50930')
SYMBOLS_OSS_FULL_ACCESS_KEY_ID = credentials('d9e2b6d7-012e-439c-8214-3bf9111bb79f')
SYMBOLS_OSS_FULL_ACCESS_KEY_SECRET = credentials('5af89f3a-4b77-40d7-9ce9-a47970245314')
}
parameters {
booleanParam(
name: 'publish_package',
defaultValue: 'false',
description: 'Do you want to perform packaging after the build is completed?'
)
booleanParam(
name: 'archive_symbols',
defaultValue: 'false',
description: 'Do you want to archive symbols after the build is completed?'
)
}
stages {
stage('Environment') {
steps {
script {
if (env.GIT_URL.contains("Commercial")) {
env.PUBLISH_ZIP_PASSWORD = "lovero"
}
loadEnvironmentFromFile("${env.JENKINS_ENVIRONMENT_FILE}")
}
dir('artifacts') {
deleteDir()
}
}
}
stage('Prepare') {
parallel {
stage('Prepare: Pipenv') {
steps {
bat """
cd tools\\python\\
pipenv install
"""
}
}
}
}
stage('Build') {
steps {
bat """
cd tools\\python\\
pipenv run dawn_compile.py
"""
}
}
stage('Finish') {
parallel {
stage('Finish: Archive Symbols') {
when {
expression {
return params.archive_symbols
}
}
steps {
bat """
cd tools\\python\\
pipenv run dawn_symstore.py
"""
}
}
stage('Finish: Publish Packages') {
when {
expression {
return params.publish_package
}
}
steps {
bat """
cd tools\\python\\
pipenv run dawn_publish.py
"""
}
}
}
}
stage('Archive') {
when {
expression {
return params.publish_package || params.archive_symbols
}
}
steps {
archiveArtifacts artifacts: 'artifacts\\**', fingerprint: true, onlyIfSuccessful: true
}
}
}
post {
always {
dir('artifacts') {
deleteDir()
}
}
}
}