Commit 3f25e84e authored by Holger Levsen's avatar Holger Levsen
Browse files

reproducible archlinux: the job name/number should be part of the session name...

reproducible archlinux: the job name/number should be part of the session name so we can kill all previous sessions from that job easily
parent 899adbcf
...@@ -110,7 +110,7 @@ elif [[ "$*" =~ reproducible_setup_schroot_archlinux ]] ; then ...@@ -110,7 +110,7 @@ elif [[ "$*" =~ reproducible_setup_schroot_archlinux ]] ; then
elif [[ "$*" =~ reproducible_setup_mock_fedora-23_x86_64 ]] ; then elif [[ "$*" =~ reproducible_setup_mock_fedora-23_x86_64 ]] ; then
exec /srv/jenkins/bin/reproducible_setup_mock.sh fedora-23 x86_64 ; croak "Exec failed"; exec /srv/jenkins/bin/reproducible_setup_mock.sh fedora-23 x86_64 ; croak "Exec failed";
elif [ "$1" = "/srv/jenkins/bin/reproducible_build_archlinux_pkg.sh" ] && ( [ "$2" = "1" ] || [ "$2" = "2" ] ) ; then elif [ "$1" = "/srv/jenkins/bin/reproducible_build_archlinux_pkg.sh" ] && ( [ "$2" = "1" ] || [ "$2" = "2" ] ) ; then
exec /srv/jenkins/bin/reproducible_build_archlinux_pkg.sh "$2" "$3" "$4" "$5" ; croak "Exec failed"; exec /srv/jenkins/bin/reproducible_build_archlinux_pkg.sh "$2" "$3" "$4" "$5" "$6" ; croak "Exec failed";
elif [ "$1" = "/srv/jenkins/bin/reproducible_build_rpm.sh" ] && ( [ "$2" = "1" ] || [ "$2" = "2" ] ) ; then elif [ "$1" = "/srv/jenkins/bin/reproducible_build_rpm.sh" ] && ( [ "$2" = "1" ] || [ "$2" = "2" ] ) ; then
exec /srv/jenkins/bin/reproducible_build_rpm.sh "$2" "$3" "$4" "$5" "$6" "$7" ; croak "Exec failed"; exec /srv/jenkins/bin/reproducible_build_rpm.sh "$2" "$3" "$4" "$5" "$6" "$7" ; croak "Exec failed";
elif [ "$*" = "some_jenkins_job_name" ] ; then elif [ "$*" = "some_jenkins_job_name" ] ; then
......
...@@ -229,7 +229,7 @@ remote_build() { ...@@ -229,7 +229,7 @@ remote_build() {
sleep ${SLEEPTIME}m sleep ${SLEEPTIME}m
exec /srv/jenkins/bin/abort.sh exec /srv/jenkins/bin/abort.sh
fi fi
ssh -o "Batchmode = yes" -p $PORT $FQDN /srv/jenkins/bin/reproducible_build_archlinux_pkg.sh $BUILDNR $REPOSITORY ${SRCPACKAGE} ${TMPDIR} ssh -o "Batchmode = yes" -p $PORT $FQDN /srv/jenkins/bin/reproducible_build_archlinux_pkg.sh $BUILDNR $BUILDER_JOB $REPOSITORY ${SRCPACKAGE} ${TMPDIR}
RESULT=$? RESULT=$?
if [ $RESULT -ne 0 ] ; then if [ $RESULT -ne 0 ] ; then
ssh -o "Batchmode = yes" -p $PORT $FQDN "rm -r $TMPDIR" || true ssh -o "Batchmode = yes" -p $PORT $FQDN "rm -r $TMPDIR" || true
...@@ -274,13 +274,15 @@ trap cleanup_all INT TERM EXIT ...@@ -274,13 +274,15 @@ trap cleanup_all INT TERM EXIT
# #
if [ "$1" = "" ] ; then if [ "$1" = "" ] ; then
MODE="master" MODE="master"
TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t rbuild-archlinux-XXXXXXXX) # where everything actually happens BUILDER_JOB="${JOB_NAME#reproducible_builder_archlinux}"
TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t rbuild-archlinux$BUILDER_JOB-XXXXXXXX) # where everything actually happens
cd $TMPDIR cd $TMPDIR
elif [ "$1" = "1" ] || [ "$1" = "2" ] ; then elif [ "$1" = "1" ] || [ "$1" = "2" ] ; then
MODE="$1" MODE="$1"
REPOSITORY="$2" BUILDER_JOB="$2"
SRCPACKAGE="$3" REPOSITORY="$3"
TMPDIR="$4" SRCPACKAGE="$4"
TMPDIR="$5"
[ -d $TMPDIR ] || mkdir -p $TMPDIR [ -d $TMPDIR ] || mkdir -p $TMPDIR
cd $TMPDIR cd $TMPDIR
mkdir -p b$MODE/$SRCPACKAGE mkdir -p b$MODE/$SRCPACKAGE
......
Supports Markdown
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