Skip to content

Commit 6db2c09

Browse files
ci: fix download url for Splunk >= 9.4 (#329)
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 86ef93a commit 6db2c09

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
@@ -144,8 +144,20 @@ jobs:
144144
export SPLUNK_VERSION=${{ matrix.splunk.version }}
145145
export SPLUNK_BUILD=${{ matrix.splunk.build }}
146146
export SPLUNK_SLUG=$SPLUNK_VERSION-$SPLUNK_BUILD
147-
export SPLUNK_ARCH=x86_64
148-
export SPLUNK_LINUX_FILENAME=splunk-${SPLUNK_VERSION}-${SPLUNK_BUILD}-Linux-${SPLUNK_ARCH}.tgz
147+
export SPLUNK_ARCH=amd64
148+
export SPLUNK_LINUX_FILENAME=splunk-${SPLUNK_VERSION}-${SPLUNK_BUILD}-linux-${SPLUNK_ARCH}.tgz
149+
150+
# Before 9.4, the filename was splunk-<version>-<build>-Linux-x86_64.tgz
151+
if [[ $(echo $SPLUNK_VERSION | cut -d. -f1) -le 8 ]] || \
152+
[[ $SPLUNK_VERSION == 9.0.* ]] || \
153+
[[ $SPLUNK_VERSION == 9.1.* ]] || \
154+
[[ $SPLUNK_VERSION == 9.2.* ]] || \
155+
[[ $SPLUNK_VERSION == 9.3.* ]]
156+
then
157+
export SPLUNK_ARCH=x86_64
158+
export SPLUNK_LINUX_FILENAME=splunk-${SPLUNK_VERSION}-${SPLUNK_BUILD}-Linux-${SPLUNK_ARCH}.tgz
159+
fi
160+
149161
export SPLUNK_BUILD_URL=https://download.splunk.com/products/${SPLUNK_PRODUCT}/releases/${SPLUNK_VERSION}/linux/${SPLUNK_LINUX_FILENAME}
150162
echo "$SPLUNK_BUILD_URL"
151163
export SPLUNK_HOME=/opt/splunk

0 commit comments

Comments
 (0)