Commit d65382aa authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmbs: add -a option for add to shared task

parent dedd2761
...@@ -43,21 +43,23 @@ phelp() ...@@ -43,21 +43,23 @@ phelp()
echog "Options:" echog "Options:"
echog " -s - sign package(s) and move it to upload dir" echog " -s - sign package(s) and move it to upload dir"
echog " -c - only sign package(s) with checking" echog " -c - only sign package(s) with checking"
echog " -u - sign package(s) and upload it to Incoming (backports)" echog " -u - sign package(s), upload it and run build"
echog " -U - sign package(s) and upload it to Incoming (updates)" echog " -a TASK - sign package(s), update it and add to task TASK"
echog " -d - remove package(s) from SRPMS and Incoming" # echog " -U - sign package(s) and upload it to Incoming (updates)"
# echog " -d - remove package(s) from SRPMS and Incoming"
echog " -n - do not check with sisyphus_check before upload" echog " -n - do not check with sisyphus_check before upload"
echog " -o - create nosrc.rpm package" echog " -o - create nosrc.rpm package"
echog " -z - create src.rpm with compatible gzip compression" echog " -z - create src.rpm with compatible gzip compression"
} }
while getopts :hscuUdnoz opt; do while getopts :hscuUdnoa:z opt; do
case $opt in case $opt in
h) phelp; exit 0;; h) phelp; exit 0;;
s) SIGN=1 ;; s) SIGN=1 ;;
c) CHECKONLY=1 ; SIGN=1 ;; c) CHECKONLY=1 ; SIGN=1 ;;
u) UPLOADNOW=1 ; SIGN=1 ;; u) UPLOADNOW=1 ; SIGN=1 ;;
U) UPLOADNOW=1 ; SIGN=1 ; UPDATES=1 ;; # U) UPLOADNOW=1 ; SIGN=1 ; UPDATES=1 ;;
a) UPLOADNOW=1 ; SIGN=1 ; TASKNUMBER=$OPTARG ;;
n) NOCHECK=1; ;; n) NOCHECK=1; ;;
o) NOSOURCE=1; ;; o) NOSOURCE=1; ;;
z) export USE_LEGACY_COMPRESSION=1; z) export USE_LEGACY_COMPRESSION=1;
...@@ -151,9 +153,13 @@ if [ -n "$UPLOADNOW" ] && is_gear $SPECDIR ; then ...@@ -151,9 +153,13 @@ if [ -n "$UPLOADNOW" ] && is_gear $SPECDIR ; then
check_gear_and_tag check_gear_and_tag
$ETERBUILDBIN/gpush || fatal "Git push failed. Possibly you need to run ginit for create remote repo." $ETERBUILDBIN/gpush || fatal "Git push failed. Possibly you need to run ginit for create remote repo."
TAG=$VERSION-$RELEASE TAG=$VERSION-$RELEASE
ssh $GIRARHOST task new if [ -n "$TASKNUMBER" ] ; then
ssh $GIRARHOST task add repo $BASENAME $TAG || ssh $GIRARHOST task rm ssh $GIRARHOST task add $TASKNUMBER repo $BASENAME $TAG
ssh $GIRARHOST task run else
ssh $GIRARHOST task new
ssh $GIRARHOST task add repo $BASENAME $TAG || ssh $GIRARHOST task rm
ssh $GIRARHOST task run
fi
echo "run task $BASENAME with tag $TAG at $GIRARHOST ($MENV) at `date "+%c"`" >>$RPMDIR/uploaded.log echo "run task $BASENAME with tag $TAG at $GIRARHOST ($MENV) at `date "+%c"`" >>$RPMDIR/uploaded.log
exit exit
fi fi
...@@ -242,8 +248,13 @@ if [ -n "$SIGN" ]; then ...@@ -242,8 +248,13 @@ if [ -n "$SIGN" ]; then
for i in $LISTBUILT ; do for i in $LISTBUILT ; do
TASKLIST="$TASKLIST srpm $(basename $i)" TASKLIST="$TASKLIST srpm $(basename $i)"
done done
echo "Create task for $TASKLIST" if [ -n "$TASKNUMBER" ] ; then
ssh $GIRARHOST build -b $BINARYREPO $TASKLIST echo "Add $TASKLIST to task $TASKNUMBER"
ssh $GIRARHOST task add $TASKNUMBER srpm $TASKLIST
else
echo "Create task for $TASKLIST"
ssh $GIRARHOST build -b $BINARYREPO $TASKLIST
fi
for i in $LISTBUILT ; do for i in $LISTBUILT ; do
LOGFILE="$LOGDIR/`basename $i .src.rpm`$MENVARG.log" LOGFILE="$LOGDIR/`basename $i .src.rpm`$MENVARG.log"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment