forked from mas-cli/mas
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
70 lines (65 loc) · 1.97 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
#!/usr/bin/env groovy
/*
* Jenkinsfile
* mas-cli
*
* Declarative Jenkins pipeline script - https://jenkins.io/doc/book/pipeline/
*
* sh steps use "label:" argument, new in Pipeline: Nodes and Processes 2.28
* https://plugins.jenkins.io/workflow-durable-task-step
* https://jenkins.io/doc/pipeline/steps/workflow-durable-task-step/#sh-shell-script
*/
pipeline {
agent any
options {
// https://jenkins.io/doc/book/pipeline/syntax/#options
buildDiscarder(logRotator(numToKeepStr: '100'))
disableConcurrentBuilds()
timeout(time: 1, unit: 'HOURS')
timestamps()
}
triggers {
// cron('H */4 * * 1-5')
githubPush()
}
environment {
LANG = 'en_US.UTF-8'
LANGUAGE = 'en_US.UTF-8'
LC_ALL = 'en_US.UTF-8'
DEVELOPER_DIR = '/Applications/Xcode-11.5.app'
}
stages {
stage('🏗️ Assemble') {
steps {
ansiColor('xterm') {
sh script: 'script/bootstrap', label: "👢 Bootstrap"
sh script: 'script/build', label: "🏗️ Build"
sh script: 'script/archive', label: "🗜️ Archive"
sh script: 'script/install build/distribution-tmp', label: "📲 Install"
sh script: 'script/package', label: "📦 Package"
}
}
}
stage('✅ Test') {
steps {
ansiColor('xterm') {
sh script: 'script/test', label: "✅ Test"
}
}
}
stage('🚨 Lint') {
steps {
ansiColor('xterm') {
sh script: 'script/lint', label: "🚨 Lint"
}
}
}
stage('⚠️ Danger') {
steps {
ansiColor('xterm') {
sh script: 'script/danger', label: "⚠️ Danger"
}
}
}
}
}