diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2016-08-02 15:21:06 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-08-02 16:24:25 +0200 |
commit | 011bef2cb827cea35dc851c8da7740b8167571a3 (patch) | |
tree | 3c50a2d49777dbaea6747e64163e86ab084c3e6a /bin | |
parent | 4793e76429c8522c64e5bfe9e6896b96ca964635 (diff) | |
download | jenkins.debian.net-011bef2cb827cea35dc851c8da7740b8167571a3.tar.xz |
reproducible/openwrt|lede: remove openwrt_mktempdir
Use the same directory across multiple nodes
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_lede.sh | 1 | ||||
-rwxr-xr-x | bin/reproducible_openwrt.sh | 1 | ||||
-rw-r--r-- | bin/reproducible_openwrt_common.sh | 28 |
3 files changed, 14 insertions, 16 deletions
diff --git a/bin/reproducible_lede.sh b/bin/reproducible_lede.sh index 6b639ff3..83bc7ed6 100755 --- a/bin/reproducible_lede.sh +++ b/bin/reproducible_lede.sh @@ -25,7 +25,6 @@ case $1 in case $1 in openwrt_build |\ openwrt_get_banner |\ - openwrt_mktempdir |\ openwrt_cleanup_tmpdirs) ;; # this is the allowed list *) echo "Unsupported remote node function $@" diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh index c8e38d56..c4c2096e 100755 --- a/bin/reproducible_openwrt.sh +++ b/bin/reproducible_openwrt.sh @@ -25,7 +25,6 @@ case $1 in case $1 in openwrt_build |\ openwrt_get_banner |\ - openwrt_mktempdir |\ openwrt_cleanup_tmpdirs) ;; # this is the allowed list *) echo "Unsupported remote node function $@" diff --git a/bin/reproducible_openwrt_common.sh b/bin/reproducible_openwrt_common.sh index 64e341c1..5eb3b087 100644 --- a/bin/reproducible_openwrt_common.sh +++ b/bin/reproducible_openwrt_common.sh @@ -9,10 +9,6 @@ GENERIC_NODE1=profitbricks-build3-amd64.debian.net GENERIC_NODE2=profitbricks-build4-amd64.debian.net -openwrt_mktempdir() { - mktemp --tmpdir=/srv/workspace/chroots/ -d -t rbuild-lede-build-XXXXXXXX -} - # only called direct on a remote build node openwrt_cleanup_tmpdirs() { export TMPDIR=$1 @@ -216,6 +212,13 @@ openwrt_build() { local CONFIG=$4 export TMPDIR=$5 export TMPBUILDDIR=$TMPDIR/build/ + + if [ -d $TMPDIR ] ; then + echo "=============================================================================" + echo "TMPDIR already exists! $TMPDIR" + echo "=============================================================================" + exit 1 + fi mkdir -p $TMPBUILDDIR # we have also to set the TMP @@ -261,21 +264,18 @@ build_two_times() { ## first run RUN=b1 - TMPDIR_B1=$(ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_mktempdir) - ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_build $TYPE $RUN $TARGET $CONFIG $TMPDIR_B1 - - ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_get_banner $TMPDIR_B1 $TYPE > $BANNER_HTML + ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_build $TYPE $RUN $TARGET $CONFIG $TMPDIR + ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_get_banner $TMPDIR $TYPE > $BANNER_HTML # rsync back logs and images - rsync -a $GENERIC_NODE1:$TMPDIR_B1/$RUN/ $TMPDIR/$RUN/ - ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_cleanup_tmpdirs $TMPDIR_B1 + rsync -a $GENERIC_NODE1:$TMPDIR/$RUN/ $TMPDIR/$RUN/ + ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_cleanup_tmpdirs $TMPDIR ## second run RUN=b2 - TMPDIR_B2=$(ssh $GENERIC_NODE2 reproducible_$TYPE node openwrt_mktempdir) - ssh $GENERIC_NODE2 reproducible_$TYPE node openwrt_build $TYPE $RUN $TARGET $CONFIG $TMPDIR_B2 + ssh $GENERIC_NODE2 reproducible_$TYPE node openwrt_build $TYPE $RUN $TARGET $CONFIG $TMPDIR # rsync back logs and images - rsync -a $GENERIC_NODE2:$TMPDIR_B2/$RUN/ $TMPDIR/$RUN/ - ssh $GENERIC_NODE2 reproducible_$TYPE node openwrt_cleanup_tmpdirs $TMPDIR_B2 + rsync -a $GENERIC_NODE2:$TMPDIR/$RUN/ $TMPDIR/$RUN/ + ssh $GENERIC_NODE2 reproducible_$TYPE node openwrt_cleanup_tmpdirs $TMPDIR } |