diff --git a/jenkins/ios.jenkinsfile b/jenkins/ios.jenkinsfile index 5c7352e7d..3817673ea 100644 --- a/jenkins/ios.jenkinsfile +++ b/jenkins/ios.jenkinsfile @@ -36,9 +36,13 @@ pipeline { } } steps { - withEnv(["JENKINS_NODE_COOKIE=dontkill"]) { - sh "${env.starMcuScriptPath} --package-url ${env.mcuPackageUrl} --package-name \ - mcu-all-bin-v{data}.tgz --base-dir ${env.mcuServerBasePath} --git-branch ${GIT_BRANCH}" + script{ + withEnv(['JENKINS_NODE_COOKIE=dontkill']) { + sh "python ${env.startServerScriptPath} --package-url ${env.mcuPackageBaseDir} --package-name \ + ${env.mcuPackageName} --base-dir ${env.mcuServerBasePath} --git-branch ${GIT_BRANCH} \ + --owner open-webrtc-toolkit --repo owt-client-android --commit-id ${GIT_COMMIT} \ + --github-script ${env.serverGithubScriptPath} --mode mcu --workspace ${WORKSPACE}" + } } } } @@ -48,9 +52,13 @@ pipeline { label "$env.iosServer" } } - steps { - withEnv(["JENKINS_NODE_COOKIE=dontkill"]) { - sh "${env.startP2PServerScriptPath} --server-path ${env.p2pServerPath}" + steps{ + script{ + withEnv(['JENKINS_NODE_COOKIE=dontkill']) { + sh "python ${env.startServerScriptPath} --p2p-server-path ${env.p2pServerPath} \ + --owner open-webrtc-toolkit --repo owt-client-android --commit-id ${GIT_COMMIT} \ + --git-branch ${GIT_BRANCH} --github-script ${env.serverGithubScriptPath} --mode p2p --workspace ${WORKSPACE}" + } } } } @@ -102,6 +110,12 @@ pipeline { } } post { + always { + script { + echo "I have finished" + sh "curl -H \"Content-Type: application/json\" -X POST --data '{\"commit_id\":\"'$GIT_COMMIT'\",\"job_path\":\"'${env.iosNativeJobName}'\",\"job_name\":\"'$JOB_BASE_NAME'\",\"build_num\":\"'$BUILD_NUMBER'\",\"os_version\":\"'${env.iosVersion}'\"}' '${env.checkServerUrl}'/runClient/IOS_BUILD_NATIVE_STEPS" + } + } success { setBuildStatus("${env.nativeUrl}", "Build succeeded", "SUCCESS"); echo "I succeeeded!" diff --git a/jenkins/windows.jenkinsfile b/jenkins/windows.jenkinsfile index 1d270ee9f..f5e81c8f4 100644 --- a/jenkins/windows.jenkinsfile +++ b/jenkins/windows.jenkinsfile @@ -36,9 +36,13 @@ pipeline { } } steps { - withEnv(["JENKINS_NODE_COOKIE=dontkill"]) { - sh "${env.starMcuScriptPath} --package-url ${env.mcuPackageUrl} --package-name \ - mcu-all-bin-v{data}.tgz --base-dir ${env.mcuServerBasePath} --git-branch ${GIT_BRANCH}" + script{ + withEnv(['JENKINS_NODE_COOKIE=dontkill']) { + sh "python ${env.startServerScriptPath} --package-url ${env.mcuPackageBaseDir} --package-name \ + ${env.mcuPackageName} --base-dir ${env.mcuServerBasePath} --git-branch ${GIT_BRANCH} \ + --owner open-webrtc-toolkit --repo owt-client-android --commit-id ${GIT_COMMIT} \ + --github-script ${env.serverGithubScriptPath} --mode mcu --workspace ${WORKSPACE}" + } } } } @@ -48,9 +52,13 @@ pipeline { label "$env.windowsServer" } } - steps { - withEnv(["JENKINS_NODE_COOKIE=dontkill"]) { - sh "${env.startP2PServerScriptPath} --server-path ${env.p2pServerPath}" + steps{ + script{ + withEnv(['JENKINS_NODE_COOKIE=dontkill']) { + sh "python ${env.startServerScriptPath} --p2p-server-path ${env.p2pServerPath} \ + --owner open-webrtc-toolkit --repo owt-client-android --commit-id ${GIT_COMMIT} \ + --git-branch ${GIT_BRANCH} --github-script ${env.serverGithubScriptPath} --mode p2p --workspace ${WORKSPACE}" + } } } } @@ -102,6 +110,12 @@ pipeline { } } post { + always { + script { + echo "I have finished" + sh "curl -H \"Content-Type: application/json\" -X POST --data '{\"commit_id\":\"'$GIT_COMMIT'\",\"job_path\":\"'${env.windowsNativeJobName}'\",\"job_name\":\"'$JOB_BASE_NAME'\",\"build_num\":\"'$BUILD_NUMBER'\",\"os_version\":\"'${env.windowsVersion}'\"}' '${env.checkServerUrl}'/runClient/WINDOWS_BUILD_NATIVE_STEPS" + } + } success { setBuildStatus("${env.nativeUrl}", "Build succeeded", "SUCCESS"); echo "I succeeeded!"