Porting the nightly.sh script to fedora messaging
Signed-off-by: Mohan Boddu <mboddu@bhujji.com>
This commit is contained in:
parent
599e543773
commit
f30d917d18
26
nightly.sh
26
nightly.sh
@ -37,14 +37,14 @@ else
|
||||
git clone https://pagure.io/releng.git
|
||||
fi
|
||||
|
||||
# Set up our fedmsg function, using the releng repo definition
|
||||
# Set up our fedora messaging function, using the releng repo definition
|
||||
FEDMSG_MODNAME="compose"
|
||||
FEDMSG_CERTPREFIX="releng"
|
||||
. ./releng/scripts/fedmsg-functions.sh
|
||||
. ./releng/scripts/fedora-messaging.sh
|
||||
|
||||
# Announce that we are starting, even though we don't know the compose_id yet..
|
||||
fedmsg_json_start=$(printf '{"log": "start", "branch": "%s", "arch": "%s", "short": "%s"}' "$RELEASE" "$ARCH" "$SHORT")
|
||||
send_fedmsg "${fedmsg_json_start}" ${RELEASE} start
|
||||
fedora_message_json_start=$(printf '{"log": "start", "branch": "%s", "arch": "%s", "short": "%s"}' "$RELEASE" "$ARCH" "$SHORT")
|
||||
send_fedora_message "${fedora_message_json_start}" ${RELEASE} start
|
||||
|
||||
#pushd $TMPDIR
|
||||
#git clone https://pagure.io/fedora-comps.git && {
|
||||
@ -76,13 +76,13 @@ SHORTCOMPOSE_ID=$(echo $NEWCOMPOSE_ID|sed -e 's|Fedora-.*-||g')
|
||||
|
||||
# Set this to use later for a few items include depcheck
|
||||
DESTDIR=$TARGET_DIR/$NEWCOMPOSE_ID
|
||||
# Public URLs the synced compose will wind up at, we put them in fedmsgs
|
||||
# Public URLs the synced compose will wind up at, we put them in fedora-messaging
|
||||
LOCATION="https://dl.fedoraproject.org$RSYNCTARGET"
|
||||
ALT_LOCATION="https://dl.fedoraproject.org$RSYNCALTTARGET"
|
||||
SECONDARY_LOCATION="https://dl.fedoraproject.org$RSYNCSECTARGET"
|
||||
# Update fedmsg template
|
||||
fedmsg_json_start=$(printf '{"log": "start", "branch": "%s", "arch": "%s", "short": "%s", "compose_id": "%s", "location": "%s", "alt_location": "%s", "secondary_location": "%s"}' "$RELEASE" "$ARCH" "$SHORT" "$NEWCOMPOSE_ID", "$LOCATION", "$ALT_LOCATION", "$SECONDARY_LOCATION")
|
||||
fedmsg_json_done=$(printf '{"log": "done", "branch": "%s", "arch": "%s", "short": "%s", "compose_id": "%s", "location": "%s", "alt_location": "%s", "secondary_location": "%s"}' "$RELEASE" "$ARCH" "$SHORT" "$NEWCOMPOSE_ID", "$LOCATION", "$ALT_LOCATION", "$SECONDARY_LOCATION")
|
||||
# Update fedora_message template
|
||||
fedora_message_json_start=$(printf '{"log": "start", "branch": "%s", "arch": "%s", "short": "%s", "compose_id": "%s", "location": "%s", "alt_location": "%s", "secondary_location": "%s"}' "$RELEASE" "$ARCH" "$SHORT" "$NEWCOMPOSE_ID", "$LOCATION", "$ALT_LOCATION", "$SECONDARY_LOCATION")
|
||||
fedora_message_json_done=$(printf '{"log": "done", "branch": "%s", "arch": "%s", "short": "%s", "compose_id": "%s", "location": "%s", "alt_location": "%s", "secondary_location": "%s"}' "$RELEASE" "$ARCH" "$SHORT" "$NEWCOMPOSE_ID", "$LOCATION", "$ALT_LOCATION", "$SECONDARY_LOCATION")
|
||||
|
||||
# Fix permissions on the grub efi files and fonts (they're 0600)
|
||||
chmod -R go+r $DESTDIR/compose/*/*/os/EFI/
|
||||
@ -115,7 +115,7 @@ fi
|
||||
}
|
||||
|
||||
# Tell interested persons that the rsync is starting (zomg!)
|
||||
send_fedmsg "${fedmsg_json_start}" ${RELEASE} rsync.start
|
||||
send_fedora_message "${fedora_message_json_start}" ${RELEASE} rsync.start
|
||||
|
||||
# Sync the content to /pub/fedora
|
||||
if [ ! -d "$RSYNCTARGET" ]; then
|
||||
@ -209,10 +209,10 @@ popd
|
||||
popd
|
||||
|
||||
# Tell interested persons that the rsync is done.
|
||||
send_fedmsg "${fedmsg_json_done}" ${RELEASE} rsync.complete
|
||||
send_fedora_message "${fedora_message_json_done}" ${RELEASE} rsync.complete
|
||||
|
||||
# Tell everyone by fedmsg about the compose
|
||||
send_fedmsg "${fedmsg_json_done}" ${RELEASE} complete
|
||||
# Tell everyone by fedora_message about the compose
|
||||
send_fedora_message "${fedora_message_json_done}" ${RELEASE} complete
|
||||
|
||||
# Tell everyone by email about the compose
|
||||
# "$DESTDIR/logs/depcheck" lets not cat out depcheck for now as it does
|
||||
@ -225,4 +225,4 @@ done
|
||||
|
||||
# Removed all the older than 14 days composes
|
||||
find $TARGET_DIR -xdev -depth -maxdepth 2 -mtime +14 -exec rm -rf {} \;
|
||||
send_fedmsg "${fedmsg_json_done}" ${RELEASE} cleanup.complete
|
||||
send_fedora_message "${fedora_message_json_done}" ${RELEASE} cleanup.complete
|
||||
|
Loading…
Reference in New Issue
Block a user