X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fdeploy-maven-file.sh;h=a057fe1958026b19858016cc4f3f347d78c83916;hb=4867c0799530acf13f7527c6a026879bdfb34e06;hp=dfb9a5aa4732d34c21646652901fde0d081c2d6f;hpb=9c21e30e990dbbf75458c5a0d4d95ef6f6b97a1b;p=releng%2Fglobal-jjb.git diff --git a/shell/deploy-maven-file.sh b/shell/deploy-maven-file.sh index dfb9a5aa..a057fe19 100644 --- a/shell/deploy-maven-file.sh +++ b/shell/deploy-maven-file.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -l # SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2017 The Linux Foundation and others. @@ -31,19 +31,25 @@ echo "---> deploy-maven-file.sh" set -e -o pipefail set +u +# shellcheck disable=SC1090 +. ~/lf-env.sh + +lf-activate-venv --python python3 lftools + export MAVEN_OPTIONS export MAVEN_PARAMS DEPLOY_LOG="$WORKSPACE/archives/deploy-maven-file.log" mkdir -p "$WORKSPACE/archives" -while IFS="" read -r file -do +while IFS="" read -r file; do + file_size=$(stat --printf="%s" "${file}") + echo "Deploy ${file##*/} with ${file_size} bytes." lftools deploy maven-file "$MAVEN_REPO_URL" \ - "$REPO_ID" \ - "$file" \ - -b "$MVN" \ - -g "$GROUP_ID" \ - -p "$MAVEN_PARAMS $MAVEN_OPTIONS" \ - |& tee "$DEPLOY_LOG" -done < <(find "$UPLOAD_FILES_PATH" -type f -name "*") + "$REPO_ID" \ + "$file" \ + -b "$MVN" \ + -g "$GROUP_ID" \ + -p "$MAVEN_OPTIONS $MAVEN_PARAMS" \ + |& tee "$DEPLOY_LOG" +done < <(find "$UPLOAD_FILES_PATH" -xtype f -name "*")