X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fnexus-iq-cli.sh;h=b4f8cef5ec8209d8a21cb32ab0e0e6e69f1b025f;hb=refs%2Fchanges%2F59%2F63459%2F1;hp=d12e6700440f709c332c248703665e3971fd206d;hpb=a91e95c9486824aac728653da9c5f04e2a82e201;p=releng%2Fglobal-jjb.git diff --git a/shell/nexus-iq-cli.sh b/shell/nexus-iq-cli.sh index d12e6700..b4f8cef5 100644 --- a/shell/nexus-iq-cli.sh +++ b/shell/nexus-iq-cli.sh @@ -8,14 +8,24 @@ # which accompanies this distribution, and is available at # http://www.eclipse.org/legal/epl-v10.html ############################################################################## +echo "---> nexus-iq-cli.sh" +# This script downloads the specified version of the nexus-iq-cli jar, uses it +# to perform an XC Evaluation or extended report which provides a scan of python +# files within the repo starting at the root, then publishes the result to an LF +# server using the specified credentials. -# This script downloads nexus-iq-cli-1.44.0-01.jar and uses it to perform an -# XC Evaluation or extended report which provides a scan of python files within -# the repo - +# stop on error or unbound variable +set -eu +# do not print commands, credentials should not be logged set +x -wget -nv https://download.sonatype.com/clm/scanner/${NEXUS_IQ_CLI_JAR} -O /tmp/${NEXUS_IQ_CLI_JAR} +CLI_LOCATION="/tmp/nexus-iq-cli-${NEXUS_IQ_CLI_VERSION}.jar" +echo "INFO: downloading nexus-iq-cli version $NEXUS_IQ_CLI_VERSION" +wget -nv "https://download.sonatype.com/clm/scanner/nexus-iq-cli-${NEXUS_IQ_CLI_VERSION}.jar" -O "${CLI_LOCATION}" echo "-a" > cli-auth.txt echo "${CLM_USER}:${CLM_PASSWORD}" >> cli-auth.txt -java -jar /tmp/${NEXUS_IQ_CLI_JAR} @cli-auth.txt -xc -i ${CLM_PROJECT_NAME} -s https://nexus-iq.wl.linuxfoundation.org -t build . +echo "INFO: running nexus-iq-cli scan on project $CLM_PROJECT_NAME" +java -jar "${CLI_LOCATION}" @cli-auth.txt -xc -i "${CLM_PROJECT_NAME}" -s https://nexus-iq.wl.linuxfoundation.org -t build . rm cli-auth.txt +rm "${CLI_LOCATION}" + +echo "---> nexus-iq-cli.sh ends"