Fixes to Synopsis/BlackDuck jobs

Change-Id: I6bdf3ab3e03a0632a26e3822024a34c2688211bf
diff --git a/jjb/pipeline/synopsys-check.groovy b/jjb/pipeline/synopsys-check.groovy
index f454d29..b46e470 100644
--- a/jjb/pipeline/synopsys-check.groovy
+++ b/jjb/pipeline/synopsys-check.groovy
@@ -34,7 +34,10 @@
     stage ("Get repo list") {
       steps {
         script {
-          def repos = sh(
+          /* this defines the variable globally - not ideal, but works - see:
+          https://stackoverflow.com/questions/50571316/strange-variable-scoping-behavior-in-jenkinsfile
+          */
+          repos = sh(
               returnStdout: true,
               script: """
                 #!/usr/bin/env bash
@@ -48,8 +51,9 @@
                   # github org set, assume github organization
                   curl -sS "https://api.github.com/orgs/${github_organization}/repos" | python -c 'import json,sys;obj=json.load(sys.stdin); print ",".join(map(lambda item: item["name"], obj))'
                 fi
-              """
+                """
               ).split(",")
+          echo "repo list: ${repos}"
         }
       }
     }