From 41d8a7b0d1c1be3e1420b23e33b7be917133f60e Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Apr 13 2017 20:13:31 +0000 Subject: The name of this script has a typo. Signed-off-by: Ralph Bean --- diff --git a/docker-nightly.sh b/docker-nightly.sh new file mode 100755 index 0000000..d94e9b0 --- /dev/null +++ b/docker-nightly.sh @@ -0,0 +1,81 @@ +#!/bin/sh +export LC_ALL=C +LABEL=$1 +CONFIG="fedora-docker.conf" +TARGET_DIR="/mnt/koji/compose/" +#OLD_COMPOSES_DIR="--old-composes=/mnt/fedora_koji/compose/f23 --old-composes=$TARGET_DIR" +NIGHTLY="" +SKIP_PHASES="--skip-phase=productimg --skip-phase=pkgset --skip-phase=gather --skip-phase=extra_files --skip-phase=creatrepo" +DEST=$(pwd) +DATE=$(date "+%Y%m%d") +DIST="26" +BRANCHED="26" +BRANCH="branched" +COMPSFILE="comps-f26.xml" +GIT_BRANCH="f26" +TMPDIR=`mktemp -d /tmp/$DIST.$DATE.XXXX` +TOMAIL="devel@lists.fedoraproject.org test@lists.fedoraproject.org" +FROM="Fedora Branched Report " +RSYNCPREFIX="sudo -u ftpsync" +ATOMIC=$(mktemp -d /tmp/atomic.${DIST}.$DATE.XXXX) +ATOMICREPO="/mnt/koji/compose/atomic/$BRANCHED/" +ATOMICDEST="/pub/fedora/linux/atomic/$BRANCHED/" +OLDCOMPOSE_ID=$(cat $TARGET_DIR/latest-Fedora_Docker-26/COMPOSE_ID) +# uncomment and edit for resuming a failed compose +#COMPOSE_ID="Fedora-23-20150530.n.0" +# assume a releng dir is a git checkout of teh releng repo +# if it does not exist clone it +if [ -d releng ]; then + pushd releng + git pull --rebase + popd +else + git clone https://pagure.io/releng.git +fi +# Set up our fedmsg function, using the releng repo definition +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="releng" +. ./releng/scripts/fedmsg-functions.sh +# Announce that we are starting... +send_fedmsg "${fedmsg_json_start}" ${DIST} start +pushd $TMPDIR +git clone https://pagure.io/fedora-comps.git && { + pushd fedora-comps + make "${COMPSFILE}" + cp "${COMPSFILE}" $DEST/ + popd +} +popd +CMD="pungi-koji --notification-script=/usr/bin/pungi-fedmsg-notification --config=$CONFIG --old-composes=$TARGET_DIR $OLD_COMPOSES_DIR $NIGHTLY $SKIP_PHASES --label=$LABEL" +if [ -z "$COMPOSE_ID" ]; then + CMD="$CMD --target-dir=$TARGET_DIR" +else + CMD="$CMD --debug-mode --compose-dir=$TARGET_DIR/$COMPOSE_ID" +fi +time $CMD "$@" +if [ "$?" = "0" ]; then + export mail=0 +fi +NEWCOMPOSE_ID=$(cat $TARGET_DIR/latest-Fedora_Docker-26/COMPOSE_ID) +SHORTCOMPOSE_ID=$(echo $NEWCOMPOSE_ID|sed -e 's|Fedora-.*-||g') +DESTDIR=$TARGET_DIR/$NEWCOMPOSE_ID +$RSYNCPREFIX mkdir -p $DESTDIR +# Tell interested persons that the rsync is starting (zomg!) +send_fedmsg "${fedmsg_json_start}" ${DIST} rsync.start +#for dir in Docker metadata ; +# do +# $RSYNCPREFIX rsync -avhH $TARGET_DIR/$NEWCOMPOSE_ID/compose/$dir/ /pub/alt/atomic/testing/$SHORTCOMPOSE_ID/$dir/ ; +# done +# Tell interested persons that the rsync is done. +#send_fedmsg "${fedmsg_json_done}" ${DIST} rsync.complete +# Tell everyone by fedmsg about the compose +send_fedmsg "${fedmsg_json_done}" ${DIST} complete +SUBJECT='Fedora '$DIST' compose report: '$SHORTCOMPOSE_ID' changes' +#if [ "$mail" = "0" ]; then +# for tomail in $TOMAIL ; do +# cat $TARGET_DIR/$NEWCOMPOSE_ID/logs/*verbose $DESTDIR/logs/depcheck | \ +# mutt -e "set from=\"$FROM\"" -e 'set envelope_from=yes' -s "$SUBJECT" $tomail +# done +#fi diff --git a/docker-nigthly.sh b/docker-nigthly.sh deleted file mode 100755 index d94e9b0..0000000 --- a/docker-nigthly.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/sh -export LC_ALL=C -LABEL=$1 -CONFIG="fedora-docker.conf" -TARGET_DIR="/mnt/koji/compose/" -#OLD_COMPOSES_DIR="--old-composes=/mnt/fedora_koji/compose/f23 --old-composes=$TARGET_DIR" -NIGHTLY="" -SKIP_PHASES="--skip-phase=productimg --skip-phase=pkgset --skip-phase=gather --skip-phase=extra_files --skip-phase=creatrepo" -DEST=$(pwd) -DATE=$(date "+%Y%m%d") -DIST="26" -BRANCHED="26" -BRANCH="branched" -COMPSFILE="comps-f26.xml" -GIT_BRANCH="f26" -TMPDIR=`mktemp -d /tmp/$DIST.$DATE.XXXX` -TOMAIL="devel@lists.fedoraproject.org test@lists.fedoraproject.org" -FROM="Fedora Branched Report " -RSYNCPREFIX="sudo -u ftpsync" -ATOMIC=$(mktemp -d /tmp/atomic.${DIST}.$DATE.XXXX) -ATOMICREPO="/mnt/koji/compose/atomic/$BRANCHED/" -ATOMICDEST="/pub/fedora/linux/atomic/$BRANCHED/" -OLDCOMPOSE_ID=$(cat $TARGET_DIR/latest-Fedora_Docker-26/COMPOSE_ID) -# uncomment and edit for resuming a failed compose -#COMPOSE_ID="Fedora-23-20150530.n.0" -# assume a releng dir is a git checkout of teh releng repo -# if it does not exist clone it -if [ -d releng ]; then - pushd releng - git pull --rebase - popd -else - git clone https://pagure.io/releng.git -fi -# Set up our fedmsg function, using the releng repo definition -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="releng" -. ./releng/scripts/fedmsg-functions.sh -# Announce that we are starting... -send_fedmsg "${fedmsg_json_start}" ${DIST} start -pushd $TMPDIR -git clone https://pagure.io/fedora-comps.git && { - pushd fedora-comps - make "${COMPSFILE}" - cp "${COMPSFILE}" $DEST/ - popd -} -popd -CMD="pungi-koji --notification-script=/usr/bin/pungi-fedmsg-notification --config=$CONFIG --old-composes=$TARGET_DIR $OLD_COMPOSES_DIR $NIGHTLY $SKIP_PHASES --label=$LABEL" -if [ -z "$COMPOSE_ID" ]; then - CMD="$CMD --target-dir=$TARGET_DIR" -else - CMD="$CMD --debug-mode --compose-dir=$TARGET_DIR/$COMPOSE_ID" -fi -time $CMD "$@" -if [ "$?" = "0" ]; then - export mail=0 -fi -NEWCOMPOSE_ID=$(cat $TARGET_DIR/latest-Fedora_Docker-26/COMPOSE_ID) -SHORTCOMPOSE_ID=$(echo $NEWCOMPOSE_ID|sed -e 's|Fedora-.*-||g') -DESTDIR=$TARGET_DIR/$NEWCOMPOSE_ID -$RSYNCPREFIX mkdir -p $DESTDIR -# Tell interested persons that the rsync is starting (zomg!) -send_fedmsg "${fedmsg_json_start}" ${DIST} rsync.start -#for dir in Docker metadata ; -# do -# $RSYNCPREFIX rsync -avhH $TARGET_DIR/$NEWCOMPOSE_ID/compose/$dir/ /pub/alt/atomic/testing/$SHORTCOMPOSE_ID/$dir/ ; -# done -# Tell interested persons that the rsync is done. -#send_fedmsg "${fedmsg_json_done}" ${DIST} rsync.complete -# Tell everyone by fedmsg about the compose -send_fedmsg "${fedmsg_json_done}" ${DIST} complete -SUBJECT='Fedora '$DIST' compose report: '$SHORTCOMPOSE_ID' changes' -#if [ "$mail" = "0" ]; then -# for tomail in $TOMAIL ; do -# cat $TARGET_DIR/$NEWCOMPOSE_ID/logs/*verbose $DESTDIR/logs/depcheck | \ -# mutt -e "set from=\"$FROM\"" -e 'set envelope_from=yes' -s "$SUBJECT" $tomail -# done -#fi