From 8cf4e56ff990e5d698b9b13aeb02fb7d3219233a Mon Sep 17 00:00:00 2001 From: zhangyihui1 <42208024+zhangyihui1@users.noreply.github.com> Date: Thu, 8 Apr 2021 09:29:03 +0800 Subject: [PATCH] Update jenkins file to 5.0.x (#484) --- jenkins/android.jenkinsfile | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/jenkins/android.jenkinsfile b/jenkins/android.jenkinsfile index 84ab89b23..6e3fd665d 100644 --- a/jenkins/android.jenkinsfile +++ b/jenkins/android.jenkinsfile @@ -15,20 +15,30 @@ pipeline { timeout(time: 40, unit: "MINUTES") } stages { + stage("init parameters"){ + steps { + script { + if (env.CHANGE_TARGET == null){ + env.CHANGE_TARGET = env.GIT_BRANCH + } + } + } + } + stage('Build'){ agent{ node { - label "${env.androidBuldNativeServer}" - customWorkspace "${env.owtClientNativePath}" + label "${env.androidBuildNativeServer}" + customWorkspace "${env.owtClientNativeBasePath}/${env.CHANGE_TARGET}/src" } } steps { script{ sh "gclient sync" - sh "python ${env.androidBuildNativePath}" - sh "cp -r ${env.andoridWebrtcLibSrcPath}/* ${env.remoteDependeceDebugPath}/libwebrtc" + sh "python ${env.owtClientNativeBasePath}/${env.CHANGE_TARGET}/src/scripts/build_android.py" + sh "cp -r ${env.owtClientNativeBasePath}/${env.CHANGE_TARGET}/src/out/dist/release/* ${env.remoteDependeceDebugPath}/libwebrtc" if ("${GIT_BRANCH}" == 'master') { - sh "cp -r ${env.andoridWebrtcLibSrcPath}/* ${env.andoridLibWebrtcPath}" + sh "cp -r ${env.owtClientNativeBasePath}/${env.CHANGE_TARGET}/src/out/dist/release/* ${env.andoridLibWebrtcPath}" } } }