session-ios/Jenkinsfile
2019-01-11 10:53:22 -07:00

56 lines
1.7 KiB
Groovy

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 {
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}"
}
}
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) {
def comment = pullRequest.comment("👍 Build PASSED commit: ${pullRequest.head}\nbuild: ${currentBuild.absoluteUrl}")
}
}
}
failure {
script {
// CHANGE_ID is set only for pull requests, so it is safe to access the pullRequest global variable
if (env.CHANGE_ID) {
def comment = pullRequest.comment("💥 Build FAILED commit: ${pullRequest.head}\nbuild: ${currentBuild.absoluteUrl}")
}
}
}
}
}