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'
}
}
}