Fix OS_CLOUD export for image validation
[releng/global-jjb.git] / shell / nexus-iq-cli.sh
1 #!/bin/bash
2 # SPDX-License-Identifier: EPL-1.0
3 ##############################################################################
4 # Copyright (c) 2018 The Linux Foundation and others.
5 #
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
11 echo "---> nexus-iq-cli.sh"
12 # This script downloads nexus-iq-cli-1.44.0-01.jar and uses it to perform an
13 # XC Evaluation or extended report which provides a scan of python files within
14 # the repo
15
16 set +x
17 CLI_LOCATION="/tmp/nexus-iq-cli-${NEXUS_IQ_CLI_VERSION}.jar"
18 wget -nv "https://download.sonatype.com/clm/scanner/nexus-iq-cli-${NEXUS_IQ_CLI_VERSION}.jar" -O "${CLI_LOCATION}"
19 echo "-a" > cli-auth.txt
20 echo "${CLM_USER}:${CLM_PASSWORD}" >> cli-auth.txt
21 java -jar "${CLI_LOCATION}" @cli-auth.txt -xc -i "${CLM_PROJECT_NAME}" -s https://nexus-iq.wl.linuxfoundation.org -t build .
22 rm cli-auth.txt
23 rm "${CLI_LOCATION}"