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

Miles/test releases #1

Open
wants to merge 5 commits into
base: mck/release-verification-script
Choose a base branch
from
Open
Changes from 1 commit
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
27 changes: 27 additions & 0 deletions cassandra-release/cassandra-check-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,30 @@ wait "$PID"
if ! $success ; then
echo "Redhat package FAILED"
fi

# Commented this out as it was just for my testing (when we don't have artefacts in staging). Directory structures I get are different to those the script seems to expect (e.g. I have .../redhat/311x/, script seems to expect .../311x/redhat).
# wget -Nqe robots=off --recursive --no-parent https://downloads.apache.org/cassandra/redhat/311x/
# wget https://downloads.apache.org/cassandra/KEYS
# cd downloads.apache.org/cassandra/
# mv redhat/311x/* redhat/
mv KEYS redhat
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cp KEYS redhat/


echo
rm -f procfifo
mkfifo procfifo
docker run -i -v `pwd`/redhat:/redhat centos timeout 180 /bin/bash -c "( rpm --import /redhat/KEYS; rpm -K /redhat/*.rpm);" 2>&1 >procfifo &
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than run the centos container twice, can we add --import /redhat/KEYS to line 103 above? (adding the [[ $LINE =~ ".*digests SIGNATURES NOT OK" ]] conditional block in before the [[ $LINE =~ "Starting listening for CQL clients on" ]] block)

PID=$!
failed=false
while read LINE; do
if [[ $LINE =~ ".*digests SIGNATURES NOT OK" ]] ; then
echo "RPM verification error."
kill "$PID";
failed=true;
break;
fi
done < procfifo
rm -f procfifo
wait "$PID"
if [[ $failed == false ]]; then
echo "RPMs verified correctly."
fi