From 0256ad65da516b7be3b80350487c7ceb7c38daa8 Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Thu, 1 Aug 2019 10:00:25 -0400 Subject: [PATCH] epel8 playground composes sync Signed-off-by: Mohan Boddu --- epel8-playground-nightly.sh | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/epel8-playground-nightly.sh b/epel8-playground-nightly.sh index eaf5633..6c8568d 100755 --- a/epel8-playground-nightly.sh +++ b/epel8-playground-nightly.sh @@ -5,21 +5,15 @@ export LC_ALL=C CONFIG="epel8-playground.conf" TARGET_DIR="/mnt/koji/compose/epel" -#OLD_COMPOSES_DIR="--old-composes=/mnt/fedora_koji/compose/f23 --old-composes=$TARGET_DIR" NIGHTLY="--nightly" SKIP_PHASES="--skip-phase=productimg" -DEST=$(pwd) DATE=$(date "+%Y%m%d") -SHORT="Epel" -RELEASE="EPEL8-Playground" -RELEASE_TITLE="playground" -COMPSFILE="comps-epel8.xml" +SHORT="Fedora-Epel-Playground" +RELEASE="8" TMPDIR=`mktemp -d /tmp/$RELEASE.$DATE.XXXX` -TOMAIL="devel@lists.fedoraproject.org test@lists.fedoraproject.org" -FROM="Fedora Rawhide Report " -OLDCOMPOSE_ID=$(cat $TARGET_DIR/latest-$SHORT-$RELEASE_TITLE/COMPOSE_ID) -# uncomment and edit for resuming a failed compose -#COMPOSE_ID="Fedora-23-20150530.n.0" +OLDCOMPOSE_ID=$(cat $TARGET_DIR/latest-$SHORT-$RELEASE/COMPOSE_ID) +RSYNCPREFIX="sudo -u ftpsync" +RSYNCTARGET="/pub/epel/playground/$RELEASE" # assume a releng dir is a git checkout of the releng repo # if it does not exist clone it @@ -53,6 +47,22 @@ if [ "$?" != "0" ]; then exit 1 fi +NEWCOMPOSE_ID=$(cat $TARGET_DIR/latest-$SHORT-$RELEASE/COMPOSE_ID) +LOCATION="https://dl.fedoraproject.org$RSYNCTARGET" + +fedmsg_json_start=$(printf '{"log": "start", "branch": "%s", "arch": "%s", "short": "%s", "compose_id": "%s", "location": "%s"}' "$RELEASE" "$ARCH" "$SHORT" "$NEWCOMPOSE_ID", "$LOCATION") +fedmsg_json_done=$(printf '{"log": "done", "branch": "%s", "arch": "%s", "short": "%s", "compose_id": "%s", "location": "%s"}' "$RELEASE" "$ARCH" "$SHORT" "$NEWCOMPOSE_ID", "$LOCATION") + +send_fedmsg "${fedmsg_json_start}" ${RELEASE} rsync.start +if [ ! -d "$RSYNCTARGET" ]; then + mkdir "$RSYNCTARGET" +fi +$RSYNCPREFIX compose-partial-copy --arch=aarch64 --arch=ppc64le --arch=s390x --arch=x86_64 --arch src \ + "$DESTDIR" "$RSYNCTARGET/" \ + --variant Everything + +send_fedmsg "${fedmsg_json_done}" ${RELEASE} rsync.complete + # Tell everyone by fedmsg about the compose send_fedmsg "${fedmsg_json_done}" ${RELEASE} complete