pipeline{agent {label 'master'}stages{stage('安卓程序源码同步') {steps {sh 'mkdir -p AndroidSampleApp'dir("AndroidSampleApp"){git branch:'master', url:'https://gitee.com/sfboy/AndroidSampleApp.git'}}}stage('安卓编译打包') {steps {sh '''. ~/.bash_profilecd AndroidSampleAppsh gradlew clean assembleDebug'''}}stage('安卓部署') {steps {sh '''. ~/.bash_profilecd AndroidSampleAppapk=app/build/outputs/apk/debug/app-debug.apk{#try: 卸载现有的安卓appadb uninstall com.appsflyer.androidsampleapp} || {#catchecho 'no com.appsflyer.androidsampleapp package'}#安装安卓appadb install $apk'''}}stage('自动测试程序源码同步') {steps {sh 'mkdir -p iAppBVT_Python'dir("iAppBVT_Python"){git branch:'master', url:'https://gitee.com/sfboy/iAppBVT_Python.git'}}}stage('运行自动化测试') {steps {sh '''. ~/.bash_profilecd iAppBVT_Python#更新python依赖库pip3 install -r requirements.txt#运行自动化测试pytest -sv test/bvt_test.py --tc-file iAppBVT_Python.json --tc-format json'''}}stage('发布测试包') {steps {archiveArtifacts artifacts: 'AndroidSampleApp/app/build/outputs/apk/debug/app-debug.apk'}}stage('通知邮件') {steps {emailext body: '$DEFAULT_CONTENT', recipientProviders: [[$class: 'RequesterRecipientProvider']], subject: '$DEFAULT_SUBJECT'}}}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。