| |
@@ -303,3 +303,24 @@
|
| |
}
|
| |
archiveArtifacts "logs/**"
|
| |
}
|
| |
+
|
| |
+ /**
|
| |
+ * Check flags on semaphore.
|
| |
+ * @param flags Flags to be checked.
|
| |
+ * @return true when all flags are in 'Up' state
|
| |
+ */
|
| |
+ def checkSemaphore(String ... flags) {
|
| |
+ def failed = false
|
| |
+ flags.each {
|
| |
+ if (failed) {
|
| |
+ return
|
| |
+ }
|
| |
+ def out = sh script: "curl http://internal.status.redhat.com/api/v1/components?name=${it}", returnStdout: true
|
| |
+ def json_out = readJSON(text: out)
|
| |
+ if (json_out.data[0]?.status_name != "Up") {
|
| |
+ echo "${it} is not up"
|
| |
+ failed = true
|
| |
+ }
|
| |
+ }
|
| |
+ return !failed
|
| |
+ }
|
| |
C3I-68