Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packaing: test: centos7: Fix packaging test #9076

Merged
merged 2 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packaging/centos7-repo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

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
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)

VAULT=0
# Fix to use Vault on CentOS 7
case ${IMAGE} in
centos:7)
VAULT=1
REPO_SCRIPT=$SCRIPT_DIR/centos7-repo.sh
REPO_SCRIPT_PATH=$(realpath "$REPO_SCRIPT")
EXTRA_MOUNTS="-v $REPO_SCRIPT_PATH:/centos7-repo.sh:ro $EXTRA_MOUNTS"
;;
*)
;;
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 "[ $VAULT -eq 1 ] && sh /centos7-repo.sh || true && $INSTALL_CMD && /opt/fluent-bit/bin/fluent-bit --version" | tee "$LOG_FILE"
check_version "$LOG_FILE"
rm -f "$LOG_FILE"
done
Expand Down
Loading