Use WS Agent config file internally 58/15258/3
authorJessica Wagantall <jwagantall@linuxfoundation.org>
Wed, 10 Apr 2019 23:37:51 +0000 (16:37 -0700)
committerJessica Wagantall <jwagantall@linuxfoundation.org>
Wed, 10 Apr 2019 23:44:54 +0000 (16:44 -0700)
After checking with legal, it was agreed to not
allow tech teams to provide their own
wss-unified-agent.config file for WhiteSource scans.
Instead, this file should be managed in Jenkins Settings
Files

Change-Id: I20e330794ba28cb4c0f5206c290a734c1794b00e
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
jjb/lf-whitesource-jobs.yaml
releasenotes/notes/wss-unified-agent-config-592baf00daee99e9.yaml [new file with mode: 0644]
shell/whitesource-unified-agent-cli.sh

index 8967374..7dc5d50 100644 (file)
@@ -7,6 +7,10 @@
 - builder:
     name: lf-infra-wss-unified-agent-scan
     builders:
+      - config-file-provider:
+          files:
+            - file-id: wss-unified-agent.config
+              target: $WORKSPACE/wss-unified-agent.config
       - shell: !include-raw:
           - ../shell/whitesource-unified-agent-cli.sh
 
           name: WSS_PRODUCT_NAME
           default: '{wss-product-name}'
           description: Product to asociate the WhiteSource report in the dashboard.
-      - string:
-          name: WSS_UNIFIED_AGENT_CONFIG
-          default: '{wss-unified-agent-config}'
-          description: Path to wss-unifed-agent.config
       - string:
           name: WSS_UNIFIED_AGENT_OPTIONS
           default: '{wss-unified-agent-opts}'
diff --git a/releasenotes/notes/wss-unified-agent-config-592baf00daee99e9.yaml b/releasenotes/notes/wss-unified-agent-config-592baf00daee99e9.yaml
new file mode 100644 (file)
index 0000000..c722cfa
--- /dev/null
@@ -0,0 +1,8 @@
+---
+fixes:
+  - wss-unified-agent.config file should not be opened
+    for configuration to tech teams. The config file should
+    be part of Jenkins Settings Files and called via Managed
+    Files.
+    wss-unified-agent.config must be created in Jenkins config
+    files based on wss-unified-agent.config.example.
index 750a152..6918f9c 100644 (file)
@@ -21,7 +21,7 @@ jar_location="/tmp/wss-unified-agent-$WSS_UNIFIED_AGENT_VERSION.jar"
 wget -nv https://s3.amazonaws.com/unified-agent/wss-unified-agent-$WSS_UNIFIED_AGENT_VERSION.jar \
     -O $jar_location
 echo "---> Running WhiteSource Unified Agent CLI ..."
-java -jar $jar_location -c $WSS_UNIFIED_AGENT_CONFIG \
+java -jar $jar_location -c wss-unified-agent.config \
     -product $WSS_PRODUCT_NAME -project $WSS_PROJECT_NAME \
     ${WSS_UNIFIED_AGENT_OPTIONS:-}
 rm $jar_location