Fixes to Synopsis/BlackDuck jobs
Change-Id: I6bdf3ab3e03a0632a26e3822024a34c2688211bf
diff --git a/jjb/omec-ci.yaml b/jjb/omec-ci.yaml
index 1af8803..6540486 100644
--- a/jjb/omec-ci.yaml
+++ b/jjb/omec-ci.yaml
@@ -14,7 +14,7 @@
build-node: "ubuntu16.04-basebuild-2c-4g"
blackduck-project: omec
github-organization: omec-project
- git-server-url: "https://github.com"
+ git-server-url: "https://github.com/omec-project"
# generic OMEC test-case jobs, shared by other projects and triggered within pipelines
- project:
diff --git a/jjb/opencord.yaml b/jjb/opencord.yaml
index b9505bd..7b41d59 100644
--- a/jjb/opencord.yaml
+++ b/jjb/opencord.yaml
@@ -11,3 +11,4 @@
- 'synopsys-check':
build-node: "ubuntu16.04-basebuild-2c-4g"
blackduck-project: opencord
+ git-server-url: "{gerrit-server-url}"
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}"
}
}
}
diff --git a/jjb/synopsys-check.yaml b/jjb/synopsys-check.yaml
index 2688ae4..979554a 100644
--- a/jjb/synopsys-check.yaml
+++ b/jjb/synopsys-check.yaml
@@ -33,7 +33,7 @@
- string:
name: git_server_url
- default: '{gerrit-server-url}'
+ default: '{git-server-url}'
description: 'Git Server URL'
- string: