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/
|
2019-01-19 04:45:19 +00:00
|
|
|
*
|
|
|
|
* sh steps use "label:" argument, new in Pipeline: Nodes and Processes 2.28
|
|
|
|
* https://plugins.jenkins.io/workflow-durable-task-step
|
|
|
|
* https://jenkins.io/doc/pipeline/steps/workflow-durable-task-step/#sh-shell-script
|
2019-01-06 21:13:29 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
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'
|
2020-05-24 05:22:48 +00:00
|
|
|
DEVELOPER_DIR = '/Applications/Xcode-11.5.app'
|
2019-01-06 21:13:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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') {
|
2019-01-19 04:45:19 +00:00
|
|
|
sh script: 'script/bootstrap', label: "👢 Bootstrap"
|
|
|
|
sh script: 'script/build', label: "🏗️ Build"
|
|
|
|
sh script: 'script/archive', label: "🗜️ Archive"
|
|
|
|
sh script: 'script/install build/distribution-tmp', label: "📲 Install"
|
|
|
|
sh script: 'script/package', label: "📦 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') {
|
2019-01-19 04:45:19 +00:00
|
|
|
sh script: 'script/test', label: "✅ Test"
|
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('🚨 Lint') {
|
2019-01-06 21:13:29 +00:00
|
|
|
steps {
|
2019-01-06 22:22:41 +00:00
|
|
|
ansiColor('xterm') {
|
2019-01-19 04:45:19 +00:00
|
|
|
sh script: 'script/lint', label: "🚨 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-19 04:45:19 +00:00
|
|
|
sh script: 'script/danger', label: "⚠️ Danger"
|
2019-01-06 22:22:41 +00:00
|
|
|
}
|
2019-01-06 21:13:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|