session-ios/Jenkinsfile

57 lines
1.7 KiB
Plaintext
Raw Normal View History

2019-01-03 18:46:22 +01:00
pipeline {
agent any
environment {
LANG = "en_US.UTF-8"
LANGUAGE = "en_US.UTF-8"
LC_ALL = "en_US.UTF-8"
PATH = "PATH=$HOME/.rbenv/bin:$HOME/.rbenv/shims:/usr/local/bin/:$PATH"
}
stages {
stage('env setup') {
steps {
2019-01-10 21:49:07 +01:00
script {
// CHANGE_ID is set only for pull requests, so it is safe to access the pullRequest global variable
if (env.CHANGE_ID) {
currentBuild.displayName = "PR #${pullRequest.number}: ${pullRequest.title}"
}
}
2019-01-03 18:46:22 +01:00
sh 'make setup'
}
}
stage('build dependencies') {
steps {
sh 'make dependencies'
}
}
stage('test') {
steps {
ansiColor('xterm') {
sh 'make test'
}
}
}
}
post {
success {
script {
// CHANGE_ID is set only for pull requests, so it is safe to access the pullRequest global variable
if (env.CHANGE_ID) {
2019-01-07 18:55:42 +01:00
def comment = pullRequest.comment("👍 Build PASSED commit: ${pullRequest.head}\nbuild: ${currentBuild.absoluteUrl}")
2019-01-03 18:46:22 +01:00
}
}
}
failure {
script {
// CHANGE_ID is set only for pull requests, so it is safe to access the pullRequest global variable
if (env.CHANGE_ID) {
2019-01-07 18:55:42 +01:00
def comment = pullRequest.comment("💥 Build FAILED commit: ${pullRequest.head}\nbuild: ${currentBuild.absoluteUrl}")
2019-01-03 18:46:22 +01:00
}
}
}
}
}