-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
42 lines (39 loc) · 1.3 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
pipeline {
agent {
dockerfile {
filename 'Dockerfile'
}
}
stages {
stage('slack notification') {
agent none
steps {
slackSend color: "good", message: "Build Started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
}
}
stage('run tests') {
steps {
sh 'cd /project && yarn test'
}
}
stage ('publish to expo') {
environment {
expo_creds = credentials('expo_credentials')
}
steps {
sh "npx expo login -u $expo_creds_USR -p $expo_creds_PSW && mv env.beta.ts env.ts && EXPO_DEBUG=true npx expo publish --non-interactive --release-channel ${env.BRANCH_NAME}"
}
}
}
post {
success {
slackSend color: "good", message: "Build Finished - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>) duration: ${currentBuild.durationString}"
}
unstable {
slackSend color: "warning", message: "Build Unstable - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>) duration: ${currentBuild.durationString}"
}
failure {
slackSend color: "danger", message: "Build Failed - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>) duration: ${currentBuild.durationString}"
}
}
}