wangzilun
2021-12-15 3ea0a617c945a224a89ae0212fa108c5c96b8793
Jenkinsfile
@@ -10,6 +10,7 @@
        }
    options {
        //给日志加上时间错, 需安装 Timestamper 插件
        //mvn test surefire-report:report
        timestamps()
        ansiColor('xterm')
        //丢弃旧的构建前两个为发布包保留天数(比此早的发布包将被删除,但构建的日志、操作历史、报告等将被保留)和构建个数
@@ -29,7 +30,15 @@
            }
        }
        stage('test') {
        stage('testMaven') {
            steps {
                sh 'mvn clean test -U'
                junit allowEmptyResults: true, keepLongStdio: true, skipPublishingChecks: true, testResults: 'target/surefire-reports/*.xml'
            }
        }
        stage('testFunction') {
            steps {
                sh '''
@@ -92,6 +101,7 @@
                echo "todo add version"
            }
        }
        stage('deploy') {
            when { branch 'master' }