This is an automated email from the ASF dual-hosted git repository.
marcoabreu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 733e54c Added repeats for github status updates (#14530)
733e54c is described below
commit 733e54cd9d411b3eb0052cf5ffe210645b4c6e2e
Author: Anton Chernov <[email protected]>
AuthorDate: Tue Apr 9 15:45:59 2019 +0200
Added repeats for github status updates (#14530)
* Added retries to GitHub status update
* Update Jenkinsfile_utils.groovy
* Update Jenkinsfile_utils.groovy
---
ci/Jenkinsfile_utils.groovy | 33 +++++++++++++++++++++------------
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/ci/Jenkinsfile_utils.groovy b/ci/Jenkinsfile_utils.groovy
index 054deb5..38cc0b9 100644
--- a/ci/Jenkinsfile_utils.groovy
+++ b/ci/Jenkinsfile_utils.groovy
@@ -186,18 +186,27 @@ def update_github_commit_status(state, message) {
context = get_github_context()
echo "context=${context}"
- step([
- $class: 'GitHubCommitStatusSetter',
- reposSource: [$class: "ManuallyEnteredRepositorySource", url: repoUrl],
- contextSource: [$class: "ManuallyEnteredCommitContextSource", context:
context],
- commitShaSource: [$class: "ManuallyEnteredShaSource", sha: commitSha],
- statusBackrefSource: [$class: "ManuallyEnteredBackrefSource", backref:
"${env.RUN_DISPLAY_URL}"],
- errorHandlers: [[$class: 'ShallowAnyErrorHandler']],
- statusResultSource: [
- $class: 'ConditionalStatusResultSource',
- results: [[$class: "AnyBuildResult", message: message, state: state]]
- ]
- ])
+ // a few attempts need to be made:
https://github.com/apache/incubator-mxnet/issues/11654
+ for (int attempt = 1; attempt <= 3; attempt++) {
+ echo "Sending GitHub status attempt ${attempt}..."
+
+ step([
+ $class: 'GitHubCommitStatusSetter',
+ reposSource: [$class: "ManuallyEnteredRepositorySource", url: repoUrl],
+ contextSource: [$class: "ManuallyEnteredCommitContextSource", context:
context],
+ commitShaSource: [$class: "ManuallyEnteredShaSource", sha: commitSha],
+ statusBackrefSource: [$class: "ManuallyEnteredBackrefSource", backref:
"${env.RUN_DISPLAY_URL}"],
+ errorHandlers: [[$class: 'ShallowAnyErrorHandler']],
+ statusResultSource: [
+ $class: 'ConditionalStatusResultSource',
+ results: [[$class: "AnyBuildResult", message: message, state: state]]
+ ]
+ ])
+
+ if (attempt <= 2) {
+ sleep 1
+ }
+ }
echo "Publishing commit status done."