Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit d6384fd

Browse files
authored
only trigger master branch. (#481)
1 parent c47a43b commit d6384fd

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

jenkins/android.jenkinsfile

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,30 @@ pipeline {
1515
timeout(time: 40, unit: "MINUTES")
1616
}
1717
stages {
18+
stage("init parameters"){
19+
steps {
20+
script {
21+
if (env.CHANGE_TARGET == null){
22+
env.CHANGE_TARGET = env.GIT_BRANCH
23+
}
24+
}
25+
}
26+
}
27+
1828
stage('Build'){
1929
agent{
2030
node {
21-
label "${env.androidBuldNativeServer}"
22-
customWorkspace "${env.owtClientNativePath}"
31+
label "${env.androidBuildNativeServer}"
32+
customWorkspace "${env.owtClientNativeBasePath}/${env.CHANGE_TARGET}/src"
2333
}
2434
}
2535
steps {
2636
script{
2737
sh "gclient sync"
28-
sh "python ${env.androidBuildNativePath}"
29-
sh "cp -r ${env.andoridWebrtcLibSrcPath}/* ${env.remoteDependeceDebugPath}/libwebrtc"
38+
sh "python ${env.owtClientNativeBasePath}/${env.CHANGE_TARGET}/src/scripts/build_android.py"
39+
sh "cp -r ${env.owtClientNativeBasePath}/${env.CHANGE_TARGET}/src/out/dist/release/* ${env.remoteDependeceDebugPath}/libwebrtc"
3040
if ("${GIT_BRANCH}" == 'master') {
31-
sh "cp -r ${env.andoridWebrtcLibSrcPath}/* ${env.andoridLibWebrtcPath}"
41+
sh "cp -r ${env.owtClientNativeBasePath}/${env.CHANGE_TARGET}/src/out/dist/release/* ${env.andoridLibWebrtcPath}"
3242
}
3343
}
3444
}

0 commit comments

Comments
 (0)