Skip to content

Commit 936572f

Browse files
ci: fix download url for Splunk >= 9.4 (#425)
Splunk 9.4 introduced a change in package name (see [Slack thread](https://splunk.slack.com/archives/C9YN6R66A/p1736523466831319)), from: `splunk-${SPLUNK_VERSION}-${SPLUNK_BUILD}-Linux-x86_64.tgz` to `splunk-${SPLUNK_VERSION}-${SPLUNK_BUILD}-linux-amd64.tgz`
1 parent 70102a9 commit 936572f

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/build-test-release.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,20 @@ jobs:
108108
export SPLUNK_VERSION=${{ matrix.splunk.version }}
109109
export SPLUNK_BUILD=${{ matrix.splunk.build }}
110110
export SPLUNK_SLUG=$SPLUNK_VERSION-$SPLUNK_BUILD
111-
export SPLUNK_ARCH=x86_64
112-
export SPLUNK_LINUX_FILENAME=splunk-${SPLUNK_VERSION}-${SPLUNK_BUILD}-Linux-${SPLUNK_ARCH}.tgz
111+
export SPLUNK_ARCH=amd64
112+
export SPLUNK_LINUX_FILENAME=splunk-${SPLUNK_VERSION}-${SPLUNK_BUILD}-linux-${SPLUNK_ARCH}.tgz
113+
114+
# Before 9.4, the filename was splunk-<version>-<build>-Linux-x86_64.tgz
115+
if [[ $(echo $SPLUNK_VERSION | cut -d. -f1) -le 8 ]] || \
116+
[[ $SPLUNK_VERSION == 9.0.* ]] || \
117+
[[ $SPLUNK_VERSION == 9.1.* ]] || \
118+
[[ $SPLUNK_VERSION == 9.2.* ]] || \
119+
[[ $SPLUNK_VERSION == 9.3.* ]]
120+
then
121+
export SPLUNK_ARCH=x86_64
122+
export SPLUNK_LINUX_FILENAME=splunk-${SPLUNK_VERSION}-${SPLUNK_BUILD}-Linux-${SPLUNK_ARCH}.tgz
123+
fi
124+
113125
export SPLUNK_BUILD_URL=https://download.splunk.com/products/${SPLUNK_PRODUCT}/releases/${SPLUNK_VERSION}/linux/${SPLUNK_LINUX_FILENAME}
114126
echo "$SPLUNK_BUILD_URL"
115127
export SPLUNK_HOME=/opt/splunk

0 commit comments

Comments
 (0)