X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Frelease-job.sh;h=ee5ab70aab0db14e20b48ed7a8b77eab52edbb2e;hb=9c18e414d756860185cf84ba90a2427dc4a4ab74;hp=220f016c0e5a8cc9d72d388d845d651ad04718df;hpb=be791d789e3e0049575d5e6b4ad1e414b825e1e6;p=releng%2Fglobal-jjb.git diff --git a/shell/release-job.sh b/shell/release-job.sh index 220f016c..ee5ab70a 100644 --- a/shell/release-job.sh +++ b/shell/release-job.sh @@ -240,7 +240,7 @@ verify_packagecloud_match_release(){ echo "INFO: Fetching console log from $logs_url" wget -q -P /tmp "${logs_url}/"console.log.gz echo "INFO: Searching for uploaded step, package name $PACKAGE_NAME and version $VERSION in job log" - if zgrep "Successfully uploaded" /tmp/console.log.gz | grep "$PACKAGE_NAME" | grep "$VERSION"; then + if zgrep -E "Pushing.*$PACKAGE_NAME.*$VERSION.*success\!" /tmp/console.log.gz; then echo "INFO: found expected strings in job log" else echo "ERROR: failed to find expected strings in job log" @@ -313,8 +313,8 @@ container_release_file(){ local lfn_umbrella lfn_umbrella="$(echo "$GERRIT_URL" | awk -F"." '{print $2}')" - for namequoted in $(cat $release_file | yq '.containers[].name'); do - versionquoted=$(cat $release_file | yq ".containers[] |select(.name==$namequoted) |.version") + for namequoted in $(yq '.containers[].name' $release_file); do + versionquoted=$(yq ".containers[] |select(.name==$namequoted) |.version" $release_file) #Remove extra yaml quotes name="${namequoted#\"}" @@ -384,6 +384,7 @@ pypi_release_file(){ echo "WARN: failed to download source distribution" fi echo "INFO: Checking files in $tgtdir" + # shellcheck disable=SC2012 filecount=$(ls $tgtdir | wc -l) if [[ $filecount = 0 ]] ; then echo "ERROR: no files downloaded"