-
Notifications
You must be signed in to change notification settings - Fork 55
/
jenkins.groovy
43 lines (38 loc) · 1.17 KB
/
jenkins.groovy
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
// Use this file as a template for a Job definition using Job DSL Jenkins Plugin https://plugins.jenkins.io/job-dsl/
def generatedBy = "Generated by jenkins.groovy at ${new Date()}"
def organization = "yourorg"
def project = "yourapp"
// You need to have a MacOS machine configured in your Nodes in Jenkins with this label
def machineLabel = "macosx"
def yourKeychainPassword = "yourpass"
def gitProjectUrl = "[email protected]:${organization}/${project}.git"
def branchName = "main"
def channel = "#${project}-alerts"
job("build-native") {
label(machineLabel)
description generatedBy
scm {
git(gitProjectUrl, branchName)
}
triggers {
scm(trigger)
}
steps {
shell("""
${installYarn}
cd private/native-app/${environment}
APP_ID=com.meteorapp.mobile ./build.sh
APP_ID=com.meteorapp.mobile ./publish-android.sh
FL_UNLOCK_KEYCHAIN_PASSWORD=${yourKeychainPassword} ./publish-ios.sh
""")
}
configure {
it / 'publishers' / 'jenkins.plugins.slack.SlackNotifier'(plugin: "[email protected]") {
room(channel)
notifySuccess(true)
notifyFailure(true)
notifyBackToNormal(true)
notifyRepeatedFailure(true)
}
}
}