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" \
# Loop through Registry and Ports to concatentate and login to nexus
if [ "${DOCKER_REGISTRY:-none}" != 'none' ]
then
- for PORT in $REGISTRY_PORTS
- do
+ for PORT in $REGISTRY_PORTS; do
REGISTRY="${DOCKER_REGISTRY}:${PORT}"
# docker login requests an email address if nothing is passed to it
isValueInArray () {
local e match="$1"
shift
- for e; do [[ "$e" == "$match" ]] && return 0; done
+ for e; do
+ [[ "$e" == "$match" ]] && return 0
+ done
return 1
}
# Sleep for a little, because sometimes OpenStack has to catch up with itself
sleep 15
-while [ "$(openstack --os-cloud "$os_cloud" coe cluster show "$cluster_uuid" -c status -f value)" == "CREATE_IN_PROGRESS" ]
-do
+while [ "$(openstack --os-cloud "$os_cloud" coe cluster show "$cluster_uuid" -c status -f value)" == "CREATE_IN_PROGRESS" ]; do
# echo "sleeping $(date)"
sleep 2m
done
mapfile -t JENKINS_FILE_LIST < <(grep -lr "^pipeline\s*{" vars src Jenkinsfile*)
exit_code=0
-for JENKINS_FILE in "${JENKINS_FILE_LIST[@]}"
-do
+for JENKINS_FILE in "${JENKINS_FILE_LIST[@]}"; do
ret=$(curl --silent -X POST -H "$JENKINS_CRUMB" -F "jenkinsfile=<$JENKINS_FILE" "$JENKINS_VAL")
if [[ $ret == *"Errors"* ]];then
echo "ERROR: Linting error for $JENKINS_FILE"
mkdir -p "$SAR_DIR"
cp "$SYSSTAT_PATH/"* "$_"
# convert sar data to ascii format
-while IFS="" read -r sarfilenum
-do
+while IFS="" read -r sarfilenum; do
[ -f "$sarfilenum" ] && LC_TIME=POSIX sar -A -f "$sarfilenum" > "$SAR_DIR/sar${sarfilenum//[!0-9]/}"
done < <(find "$SYSSTAT_PATH" -name "sa[0-9]*" || true)