jenkins构建失败


Started by user hogwarts [Pipeline] Start of Pipeline [Pipeline] node Running on salve in /users/gpj/workspace/522_AndriodSampleApi [Pipeline] { [Pipeline] stage [Pipeline] { (安卓程序源码同步) [Pipeline] sh

process apparently never started in /users/gpj/workspace/522_AndriodSampleApi@tmp/durable-2e4fc640 (running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer)

[Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (安卓编译打包) Stage “安卓编译打包” skipped due to earlier failure(s)

pipeline脚本:
pipeline{
agent {
label ‘slave’
}

stages{
    stage('安卓程序源码同步') {
        steps {
            sh 'mkdir -p AndroidSampleApp'
            dir("AndroidSampleApp"){
                git branch:'master', url:'git@github.com:princeqjzh/AndroidSampleApp.git'
            }
        }
    }

    stage('安卓编译打包') {
        steps {
            sh '''
                . ~/.bash_profile
                cd AndroidSampleApp
                sh gradlew clean assembleDebug
            '''
        }
    }


    stage('安卓部署') {
        steps {
            sh '''
                . ~/.bash_profile
                cd AndroidSampleApp
                apk=app/build/outputs/apk/debug/app-debug.apk
                {
                    #try: 卸载现有的安卓app
                    adb uninstall com.appsflyer.androidsampleapp
                } || {
                    #catch
                    echo 'no com.appsflyer.androidsampleapp package'
                }
                sleep 5

                #安装安卓app
                adb install $apk
            '''
        }
    }

    stage('自动测试程序源码同步') {
        steps {
            sh 'mkdir -p iAppBVT'
            dir("iAppBVT"){
                git branch:'master', url:'git@github.com:princeqjzh/iAppBVT.git'
            }
        }
    }

    stage('运行自动化测试') {
        steps {
            sh '''
                . ~/.bash_profile

                cd iAppBVT
                mvn clean install
            '''
        }
    }
}

post {
    success {
        archiveArtifacts artifacts: 'AndroidSampleApp/app/build/outputs/apk/debug/app-debug.apk'
    }
    always {
        emailext body: '$DEFAULT_CONTENT', recipientProviders: [[$class: 'RequesterRecipientProvider']], subject: '$DEFAULT_SUBJECT'
    }
}

}

错误看不全 把完整的日志贴出来看看

Started by user hogwarts
[Pipeline] Start of Pipeline
[Pipeline] node
Running on salve in /users/gpj/workspace/522_AndriodSampleApi
[Pipeline] {
[Pipeline] stage
[Pipeline] { (安卓程序源码同步)
[Pipeline] sh
process apparently never started in /users/gpj/workspace/522_AndriodSampleApi@tmp/durable-2e4fc640
(running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (安卓编译打包)
Stage “安卓编译打包” skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (安卓部署)
Stage “安卓部署” skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (自动测试程序源码同步)
Stage “自动测试程序源码同步” skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (运行自动化测试)
Stage “运行自动化测试” skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Declarative: Post Actions)
[Pipeline] emailext
Sending email to: gengpingjie@163.com
Connection error sending email, retrying once more in 10 seconds…
Connection error sending email, retrying once more in 10 seconds…
Failed after second try sending email
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code -2
Finished: FAILURE

你这看起来完全没构建成功过,有远程吗我看看

我的识别码:636793584
使用向日葵即可对我发起远程协助
向日葵下载地址:向日葵远程控制app官方下载 - 贝锐向日葵官网

你需要在你的Ubuntu上配置好 Android打包的环境sdk、gradlew 、java等
运行case 还需要有maven的环境等

关闭