Skip to content

Commit

Permalink
ensure things are properly signed before uploading to stage
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Sep 9, 2024
1 parent 22b9bc0 commit 72ee6e0
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
4 changes: 4 additions & 0 deletions upload_stage_rpms
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
USER='yumrepostage'
HOST='web01.osuosl.theforeman.org'

if [[ "${VERSION}" != "nightly" ]]; then
./verify_stage_sigs
fi

rsync --checksum --times --perms --recursive --links --verbose --partial --one-file-system --delete-after "tmp/$PROJECT/$VERSION/" "$USER@$HOST:rsync_cache/$PROJECT/$VERSION/"
28 changes: 28 additions & 0 deletions verify_stage_sigs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

set -e

. settings

ARCHES="x86_64 source"

EXIT_CODE=0

for os in $OSES; do
BASE="tmp/$PROJECT/$VERSION/$os"

for arch in $ARCHES; do
UNSIGNED_RPMS=$(./list_unsigned_rpms "$BASE/$arch" "$HALFGPGKEY")

if [[ -n "$UNSIGNED_RPMS" ]]; then
echo "$UNSIGNED_RPMS"
EXIT_CODE=1
fi
done
done

if [[ "${EXIT_CODE}" != "0" ]]; then
echo "RPMs not signed with ${HALFGPGKEY} found, aborting"
fi

exit ${EXIT_CODE}

0 comments on commit 72ee6e0

Please sign in to comment.