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

Commit 6e32db7

Browse files
zhangyihui1jianjunz
authored andcommitted
Enable js ci report to github checks. (#81)
* Enable js ci report to github checks. * Enable js ci and report and change js report address * Enable js ci and report and change js report address * Enable js ci and report and change js report address * Enable js ci and report and change js report address
1 parent d58368e commit 6e32db7

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

test/p2p.jenkinsfile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
void setBuildStatus(String message, String state) {
1+
void setBuildStatus(String jsUrl, String message, String state) {
22
step([
33
$class: "GitHubCommitStatusSetter",
4-
reposSource: [$class: "ManuallyEnteredRepositorySource", url: "https://github.com/open-media-streamer/oms-client-javascript"],
4+
reposSource: [$class: "ManuallyEnteredRepositorySource", url: jsUrl],
55
contextSource: [$class: "ManuallyEnteredCommitContextSource", context: "ci/jenkins/p2p"],
66
errorHandlers: [[$class: "ChangingBuildStatusErrorHandler", result: "UNSTABLE"]],
77
statusResultSource: [ $class: "ConditionalStatusResultSource", results: [[$class: "AnyBuildResult", message: message, state: state]] ]
@@ -25,7 +25,9 @@ pipeline {
2525
steps{
2626
script{
2727
withEnv(['JENKINS_NODE_COOKIE=dontkill']) {
28-
sh "${env.startP2PServerScriptPath} --server-path ${env.p2pServerPath}"
28+
sh "python ${env.startServerScript} --p2p-server-path ${env.p2pServerPath} \
29+
--owner open-webrtc-toolkit --repo owt-client-android --commit-id ${GIT_COMMIT} \
30+
--github-script ${env.serverGithubScriptPath} --mode p2p"
2931
}
3032
}
3133
}
@@ -39,17 +41,19 @@ pipeline {
3941
}
4042
}
4143
steps {
42-
sh "python ${env.jsCiScriptPath}/runTest.py --mode ci --source-path ${env.jsSourcePath} --browsers chrome"
44+
sh "python ${env.jsCiScriptPath}/runTest.py --mode ci --source-path ${env.jsSourcePath} \
45+
--browsers chrome --mode ci --owner open-webrtc-toolkit --repo owt-client-javascript \
46+
--commit-id ${GIT_COMMIT} --github-script ${env.jsP2PTestGithubScriptPath}"
4347
}
4448
}
4549
}
4650

4751
post {
4852
success {
49-
setBuildStatus("Build succeeded", "SUCCESS");
53+
setBuildStatus("${env.jsUrl}", "Build succeeded", "SUCCESS");
5054
}
5155
failure {
52-
setBuildStatus("Build failed", "FAILURE");
56+
setBuildStatus("${env.jsUrl}", "Build failed", "FAILURE");
5357
}
5458
}
55-
}
59+
}

0 commit comments

Comments
 (0)