| |
@@ -55,20 +55,15 @@
|
| |
echo "$(date --utc) build${DIST}: ${message}" | tee -a "${logfile}" >&2
|
| |
}
|
| |
|
| |
- function send_fedmsg()
|
| |
- {
|
| |
- local log="${1}"
|
| |
- local topic="${2}"
|
| |
- # Emit a message using bodhi's cert (since we should be running as "masher").
|
| |
- echo "{\"log\": \"${log}\", \"branch\": \"$BRANCHED\", \"arch\": \"$ARCH\"}" | fedmsg-logger \
|
| |
- --cert-prefix bodhi \
|
| |
- --modname compose \
|
| |
- --topic "${DIST}.${topic}" \
|
| |
- --json-input
|
| |
- }
|
| |
+ fedmsg_json_start=$(printf '{"log": "start", "branch": "%s", "arch": "%s"}' "$BRANCHED" "$ARCH")
|
| |
+ fedmsg_json_done=$(printf '{"log": "done", "branch": "%s", "arch": "%s"}' "$BRANCHED" "$ARCH")
|
| |
+
|
| |
+ FEDMSG_MODNAME="compose"
|
| |
+ FEDMSG_CERTPREFIX="bodhi"
|
| |
+ . fedmsg-functions.sh
|
| |
|
| |
log "started"
|
| |
- send_fedmsg start start
|
| |
+ send_fedmsg ${fedmsg_json_start} ${DIST} start
|
| |
|
| |
log "blocking retired packages"
|
| |
if [ "$ENVIRONMENT" == "production" ]; then
|
| |
@@ -111,14 +106,14 @@
|
| |
log "mock setup /etc/hosts"
|
| |
$MOCK -r $MOCKCONFIG --uniqueext=$DATE --copyin /etc/hosts /etc/hosts >/dev/null 2>&1 # this reports to fail, but actually works
|
| |
|
| |
- send_fedmsg start mash.start
|
| |
+ send_fedmsg ${fedmsg_json_start} ${DIST} mash.start
|
| |
|
| |
log "starting mash"
|
| |
# Drop privs here so that we run as the masher UID
|
| |
$MOCK -r $MOCKCONFIG --uniqueext=$DATE --chroot "chown mockbuild:mockbuild /var/cache/mash" || exit 1
|
| |
$MOCK -r $MOCKCONFIG --uniqueext=$DATE --unpriv --chroot "mash $MASHOPTS -p $TREEPREFIX/development/$BRANCHED -o ${MASHDIR} --compsfile $logdir/${COMPSFILE} $BRANCHED$EXPANDARCH > $logdir/mash.log 2>&1" || exit 1
|
| |
|
| |
- send_fedmsg done mash.complete
|
| |
+ send_fedmsg ${fedmsg_json_done} ${DIST} mash.complete
|
| |
|
| |
log "finished mash"
|
| |
log "starting hardlink"
|
| |
@@ -158,7 +153,7 @@
|
| |
log "finished atomic tree creation"
|
| |
}
|
| |
|
| |
- send_fedmsg start pungify.start
|
| |
+ send_fedmsg ${fedmsg_json_start} ${DIST} pungify.start
|
| |
|
| |
log "starting critppath generation"
|
| |
#only run critpath on primary arch
|
| |
@@ -175,7 +170,7 @@
|
| |
wait
|
| |
log "finished pungify"
|
| |
|
| |
- send_fedmsg done pungify.complete
|
| |
+ send_fedmsg ${fedmsg_json_done} ${DIST} pungify.complete
|
| |
|
| |
log "starting build_composeinfo"
|
| |
echo "Running build_composeinfo"
|
| |
@@ -198,7 +193,7 @@
|
| |
echo >> $logdir/finish
|
| |
log "finished compose"
|
| |
|
| |
- send_fedmsg start rsync.start
|
| |
+ send_fedmsg ${fedmsg_json_start} ${DIST} rsync.start
|
| |
|
| |
log "started compose sync"
|
| |
# data
|
| |
@@ -213,7 +208,7 @@
|
| |
export mail=0
|
| |
fi
|
| |
|
| |
- send_fedmsg done rsync.complete
|
| |
+ send_fedmsg ${fedmsg_json_done} ${DIST} rsync.complete
|
| |
|
| |
log "starting sending email report"
|
| |
if [ "$mail" = "0" ]; then
|
| |
@@ -225,7 +220,7 @@
|
| |
log "finished sending email report"
|
| |
|
| |
[ -z "$ARCH" ] && {
|
| |
- send_fedmsg start image.start
|
| |
+ send_fedmsg ${fedmsg_json_start} ${DIST} image.start
|
| |
|
| |
log "started checking out spin-kickstarts"
|
| |
pushd ../
|
| |
@@ -242,7 +237,7 @@
|
| |
popd
|
| |
popd
|
| |
|
| |
- send_fedmsg done image.complete
|
| |
+ send_fedmsg ${fedmsg_json_done} ${DIST} image.complete
|
| |
}
|
| |
|
| |
for koji in arm ppc s390
|
| |
@@ -257,6 +252,6 @@
|
| |
scripts/srpm-excluded-arch.py -a $arches --path ${MASHDIR}/$BRANCHED$EXPANDARCH/source/SRPMS/\*/ >$logdir/excludearch-$koji.log
|
| |
done
|
| |
|
| |
- send_fedmsg done complete
|
| |
+ send_fedmsg ${fedmsg_json_done} ${DIST} complete
|
| |
|
| |
exit 0
|
| |