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 191a3ff
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packaging/test-release-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,20 @@ do
echo "Testing $IMAGE"
LOG_FILE=$(mktemp)

REPO_SCRIPT=""
# Fix to use Vault on CentOS 7
case ${IMAGE} in
centos:7)
REPO_SCRIPT=$(cat <<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
)
;;
*)
;;
esac

# We do want word splitting for EXTRA_MOUNTS
# shellcheck disable=SC2086
$CONTAINER_RUNTIME run --rm -t \
Expand All @@ -65,7 +79,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 "$REPO_SCRIPT" ] then; sh $REPO_SCRIPT; fi || true && /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 191a3ff

Please sign in to comment.