forked from snipsco/homebrew-snips
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
72 lines (56 loc) · 1.83 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
def git_user_email = "[email protected]"
def git_user_name = "Tobor"
def ssh_sh(String action) {
sh """
ssh-agent sh -c 'ssh-add ; $action'
"""
}
def formulae = [
"snips-analytics.rb",
"snips-asr-google.rb",
"snips-asr.rb",
"snips-audio-server.rb",
"snips-dialogue.rb",
"snips-hotword.rb",
"snips-injection.rb",
"snips-nlu.rb",
"snips-skill-server.rb",
"snips-tts.rb",
"snips-watch.rb",
]
node("macos-elcapitan-aws") {
properties([
parameters([
string(defaultValue: 'NONE', description: 'tag to build', name: 'tag'),
])
])
stage('Checkout') {
deleteDir()
checkout scm
}
stage('Release') {
def platformTag = "${params.tag}"
def formulaPaths = formulae.collect { formula -> "Formula/${formula}" }.join(" ")
ssh_sh """
set -e
git config --global user.email ${git_user_email}
git config --global user.name ${git_user_name}
git clone --branch $platformTag --depth 1 [email protected]:snipsco/snips-platform.git
revision=\$(cd snips-platform && git rev-parse $platformTag)
.ci/bump.sh $platformTag \$revision \
Formula/snips-platform-common.rb \
Formula/libsnips_megazord.rb \
$formulaPaths
.ci/audit.sh Formula/snips-platform-common.rb $formulaPaths
.ci/make_bottles.sh Formula/snips-platform-common.rb
.ci/make_bottles.sh Formula/libsnips_megazord.rb
.ci/make_bottles.sh $formulaPaths
.ci/rename_bottles.sh '*.bottle.json'
.ci/merge.sh '*.bottle.json'
.ci/upload_bottles.sh
git checkout master
git commit -am "[Release] ${platformTag}"
git push origin master
"""
}
}