From 36e3b07003dfc0ee41fb8a74197e64a0511eb8ed Mon Sep 17 00:00:00 2001 From: Jessica Wagantall Date: Wed, 10 Apr 2019 17:16:16 -0700 Subject: [PATCH] Hardcode WSS project version Similarly to how is done in CLM, the WhiteSource versions for projects should reflect the branch they are running on. Also fix script variables to be enclosed by "{}". Change-Id: Ica0a52adcc9223e861f213bc53c67ed2102efda5 Signed-off-by: Jessica Wagantall --- .../notes/wss-project-version-51b2cfefe59ff9ae.yaml | 7 +++++++ shell/whitesource-unified-agent-cli.sh | 14 +++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 releasenotes/notes/wss-project-version-51b2cfefe59ff9ae.yaml diff --git a/releasenotes/notes/wss-project-version-51b2cfefe59ff9ae.yaml b/releasenotes/notes/wss-project-version-51b2cfefe59ff9ae.yaml new file mode 100644 index 00000000..740cb774 --- /dev/null +++ b/releasenotes/notes/wss-project-version-51b2cfefe59ff9ae.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Hardcode project version to the "GERRIT_BRANCH". + Follow previous convention from CLM where reports were + versioned after the branch name. + Fix minor nits with bash varaibles. diff --git a/shell/whitesource-unified-agent-cli.sh b/shell/whitesource-unified-agent-cli.sh index 6918f9cb..6cfba812 100644 --- a/shell/whitesource-unified-agent-cli.sh +++ b/shell/whitesource-unified-agent-cli.sh @@ -17,11 +17,11 @@ set -xe -o pipefail set -u echo "---> whitesource-unified-agent-cli.sh" -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 +jar_location="/tmp/wss-unified-agent-${WSS_UNIFIED_AGENT_VERSION}.jar" +wss_unified_agent_url="https://s3.amazonaws.com/unified-agent/wss-unified-agent-${WSS_UNIFIED_AGENT_VERSION}.jar" +wget -nv ${wss_unified_agent_url} -O ${jar_location} echo "---> Running WhiteSource Unified Agent CLI ..." -java -jar $jar_location -c wss-unified-agent.config \ - -product $WSS_PRODUCT_NAME -project $WSS_PROJECT_NAME \ - ${WSS_UNIFIED_AGENT_OPTIONS:-} -rm $jar_location +java -jar ${jar_location} -c wss-unified-agent.config \ + -product ${WSS_PRODUCT_NAME} -project ${WSS_PROJECT_NAME} \ + -projectVersion ${GERRIT_BRANCH} ${WSS_UNIFIED_AGENT_OPTIONS:-} +rm ${jar_location} -- 2.16.6