Skip to content

Commit

Permalink
Parallelize check_version.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
fredg02 committed Jan 29, 2024
1 parent 789e8fc commit 71a133d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions incubation/check_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ if [[ "${#}" -eq 0 ]]; then
exit 1
fi

curl_command() {
local url="${1:-}"
echo "${project_name} ${url} $(curl -sLI -m 10 "${url}" | grep -i 'x-jenkins' | grep -v 'x-jenkins-session' | awk '{print $2}')"
}

for instance in "${@}"; do
project_name="$(basename "${instance}")"
url="$(jq -r '.deployment.url' "${instance}/target/config.json")"
# version="$(curl -sLI "${url}" | grep -i 'x-jenkins' | grep -v 'x-jenkins-session' | awk '{print $2}')"
echo "${project_name} ${url} $(curl -sLI "${url}" | grep -i 'x-jenkins' | grep -v 'x-jenkins-session' | awk '{print $2}')"
done | column -t
curl_command "${url}" &
done | sort | column -t

0 comments on commit 71a133d

Please sign in to comment.