Skip to content

Commit

Permalink
packaing: test: Fix packaging test
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 committed Jul 11, 2024
1 parent c71cad2 commit 6777d4a
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packaging/test-release-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ do
echo "Testing $IMAGE"
LOG_FILE=$(mktemp)

# Fix to use Vault on CentOS 7
case ${IMAGE} in
centos:7)
REPO_SCRIPT=<<SCRIPT
sed -i -e "s/^mirrorlist=http:\/\/mirrorlist.centos.org/#mirrorlist=http:\/\/mirrorlist.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo && \
sed -i -e "s/^#baseurl=http:\/\/mirror.centos.org/baseurl=http:\/\/vault.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo
SCRIPT
;;
*)
REPO_SCRIPT=""
;;
esac

# We do want word splitting for EXTRA_MOUNTS
# shellcheck disable=SC2086
$CONTAINER_RUNTIME run --rm -t \
Expand All @@ -65,7 +78,7 @@ do
-e FLUENT_BIT_INSTALL_YUM_PARAMETERS="${FLUENT_BIT_INSTALL_YUM_PARAMETERS:-}" \
$EXTRA_MOUNTS \
"$IMAGE" \
sh -c "$INSTALL_CMD && /opt/fluent-bit/bin/fluent-bit --version" | tee "$LOG_FILE"
sh -c "$INSTALL_CMD && if [ ! -z $SCRIPT ] then; sh $SCRIPT; fi && /opt/fluent-bit/bin/fluent-bit --version" | tee "$LOG_FILE"
check_version "$LOG_FILE"
rm -f "$LOG_FILE"
done
Expand Down

0 comments on commit 6777d4a

Please sign in to comment.