From 9bebdf9439e087d638cba8f4918de5891d040d8b Mon Sep 17 00:00:00 2001 From: Ivan Dyachkov Date: Mon, 26 Jun 2023 09:10:57 +0200 Subject: [PATCH] ci(jmeter): fix jmeter download url for older versions --- .github/workflows/run_jmeter_tests.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run_jmeter_tests.yaml b/.github/workflows/run_jmeter_tests.yaml index 3f45faaea..a295c47da 100644 --- a/.github/workflows/run_jmeter_tests.yaml +++ b/.github/workflows/run_jmeter_tests.yaml @@ -22,7 +22,15 @@ jobs: env: JMETER_VERSION: 5.4.3 run: | - wget --no-verbose --no-check-certificate -O /tmp/apache-jmeter.tgz https://downloads.apache.org/jmeter/binaries/apache-jmeter-$JMETER_VERSION.tgz + # versions below 5.5 had been moved to the archive area + # latest version is 5.6, the script below should handle both scenarios + URL=https://downloads.apache.org/jmeter/binaries/apache-jmeter-$JMETER_VERSION.tgz + ARCHIVE_URL=https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-$JMETER_VERSION.tgz + if wget -q --method HEAD $URL; then + wget --no-verbose --no-check-certificate -O /tmp/apache-jmeter.tgz $URL + else + wget --no-verbose --no-check-certificate -O /tmp/apache-jmeter.tgz $ARCHIVE_URL + fi - uses: actions/upload-artifact@v3 with: name: apache-jmeter.tgz