2019-01-06 21:13:29 +00:00
|
|
|
#!/usr/bin/env groovy
|
|
|
|
/*
|
|
|
|
* Jenkinsfile
|
|
|
|
* mas-cli
|
|
|
|
*
|
|
|
|
* Declarative Jenkins pipeline script - https://jenkins.io/doc/book/pipeline/
|
|
|
|
*/
|
|
|
|
|
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
|
|
|
|
options {
|
|
|
|
// https://jenkins.io/doc/book/pipeline/syntax/#options
|
|
|
|
buildDiscarder(logRotator(numToKeepStr: '100'))
|
|
|
|
disableConcurrentBuilds()
|
|
|
|
timeout(time: 1, unit: 'HOURS')
|
|
|
|
timestamps()
|
|
|
|
}
|
|
|
|
|
|
|
|
triggers {
|
|
|
|
// cron('H */4 * * 1-5')
|
|
|
|
githubPush()
|
|
|
|
}
|
|
|
|
|
|
|
|
environment {
|
|
|
|
LANG = 'en_US.UTF-8'
|
|
|
|
LANGUAGE = 'en_US.UTF-8'
|
|
|
|
LC_ALL = 'en_US.UTF-8'
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
2019-01-13 01:51:45 +00:00
|
|
|
stage('🏗️ Assemble') {
|
2019-01-06 21:13:29 +00:00
|
|
|
steps {
|
2019-01-06 22:22:41 +00:00
|
|
|
ansiColor('xterm') {
|
|
|
|
sh 'script/bootstrap'
|
|
|
|
sh 'script/build'
|
|
|
|
sh 'script/archive'
|
2019-01-19 01:38:41 +00:00
|
|
|
sh 'script/install build/distribution-tmp'
|
|
|
|
sh 'script/package'
|
2019-01-06 22:22:41 +00:00
|
|
|
}
|
2019-01-06 21:13:29 +00:00
|
|
|
}
|
|
|
|
}
|
2019-01-13 01:51:45 +00:00
|
|
|
stage('✅ Test') {
|
2019-01-06 21:13:29 +00:00
|
|
|
steps {
|
2019-01-06 22:22:41 +00:00
|
|
|
ansiColor('xterm') {
|
|
|
|
sh 'script/test'
|
|
|
|
}
|
2019-01-06 21:13:29 +00:00
|
|
|
}
|
|
|
|
}
|
2019-01-13 01:51:45 +00:00
|
|
|
stage('🚨 Lint') {
|
2019-01-06 21:13:29 +00:00
|
|
|
steps {
|
2019-01-06 22:22:41 +00:00
|
|
|
ansiColor('xterm') {
|
2019-01-12 20:30:59 +00:00
|
|
|
sh 'script/lint'
|
2019-01-06 22:22:41 +00:00
|
|
|
}
|
2019-01-06 21:13:29 +00:00
|
|
|
}
|
|
|
|
}
|
2019-01-13 01:51:45 +00:00
|
|
|
stage('⚠️ Danger') {
|
2019-01-06 21:13:29 +00:00
|
|
|
steps {
|
2019-01-06 22:22:41 +00:00
|
|
|
ansiColor('xterm') {
|
2019-01-13 01:33:44 +00:00
|
|
|
sh 'script/danger'
|
2019-01-06 22:22:41 +00:00
|
|
|
}
|
2019-01-06 21:13:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|