【发布时间】:2017-10-15 15:42:56
【问题描述】:
我不确定如何处理声明式 jenkins 管道。
按照此处的示例: https://github.com/jenkinsci/ansicolor-plugin
wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm']) {
sh 'something that outputs ansi colored stuff'
}
上面的sn-p去哪儿了?
这是我的简单 Jenkinsfile:
#!groovy
pipeline {
agent any
// Set log rotation, timeout and timestamps in the console
options {
buildDiscarder(logRotator(numToKeepStr:'10'))
timeout(time: 5, unit: 'MINUTES')
}
stages {
stage('Initialize') {
steps {
sh '''
java -version
node --version
npm --version
'''
}
}
}
}
包装器是否绕过阶段?每个阶段都有吗?
【问题讨论】:
标签: jenkins jenkins-pipeline ansi-colors