Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Debian QA
jenkins.debian.net
Commits
a2873a51
Commit
a2873a51
authored
Dec 21, 2015
by
Holger Levsen
Browse files
reproducible: s#ssh#ssh -o 'Batchmode = yes'#g
parent
baafa49f
Changes
5
Hide whitespace changes
Inline
Side-by-side
bin/reproducible_build.sh
View file @
a2873a51
...
@@ -623,7 +623,7 @@ remote_build() {
...
@@ -623,7 +623,7 @@ remote_build() {
local
NODE
=
$2
local
NODE
=
$2
local
PORT
=
$3
local
PORT
=
$3
set
+e
set
+e
ssh
-p
$PORT
$NODE
/bin/true
ssh
-o
"BatchMode = yes"
-p
$PORT
$NODE
/bin/true
RESULT
=
$?
RESULT
=
$?
# abort job if host is down
# abort job if host is down
if
[
$RESULT
-ne
0
]
;
then
if
[
$RESULT
-ne
0
]
;
then
...
@@ -633,7 +633,7 @@ remote_build() {
...
@@ -633,7 +633,7 @@ remote_build() {
sleep
${
SLEEPTIME
}
m
sleep
${
SLEEPTIME
}
m
exec
/srv/jenkins/bin/abort.sh
exec
/srv/jenkins/bin/abort.sh
fi
fi
ssh
-p
$PORT
$NODE
/srv/jenkins/bin/reproducible_build.sh
$BUILDNR
${
SRCPACKAGE
}
${
SUITE
}
${
TMPDIR
}
ssh
-o
"BatchMode = yes"
-p
$PORT
$NODE
/srv/jenkins/bin/reproducible_build.sh
$BUILDNR
${
SRCPACKAGE
}
${
SUITE
}
${
TMPDIR
}
RESULT
=
$?
RESULT
=
$?
# 404-256=148... (ssh 'really' only 'supports' exit codes below 255...)
# 404-256=148... (ssh 'really' only 'supports' exit codes below 255...)
if
[
$RESULT
-eq
148
]
;
then
if
[
$RESULT
-eq
148
]
;
then
...
@@ -641,19 +641,19 @@ remote_build() {
...
@@ -641,19 +641,19 @@ remote_build() {
elif
[
$RESULT
-ne
0
]
;
then
elif
[
$RESULT
-ne
0
]
;
then
handle_remote_error
"with exit code
$RESULT
from
$NODE
for build #
$BUILDNR
for
${
SRCPACKAGE
}
on
${
SUITE
}
/
${
ARCH
}
"
handle_remote_error
"with exit code
$RESULT
from
$NODE
for build #
$BUILDNR
for
${
SRCPACKAGE
}
on
${
SUITE
}
/
${
ARCH
}
"
fi
fi
rsync
-e
"ssh -p
$PORT
"
-r
$NODE
:
$TMPDIR
/b
$BUILDNR
$TMPDIR
/
rsync
-e
"ssh
-o 'BatchMode = yes'
-p
$PORT
"
-r
$NODE
:
$TMPDIR
/b
$BUILDNR
$TMPDIR
/
RESULT
=
$?
RESULT
=
$?
if
[
$RESULT
-ne
0
]
;
then
if
[
$RESULT
-ne
0
]
;
then
echo
"
$(
date
-u
)
- rsync from
$NODE
failed, sleeping 2m before re-trying..."
|
tee
-a
${
RBUILDLOG
}
echo
"
$(
date
-u
)
- rsync from
$NODE
failed, sleeping 2m before re-trying..."
|
tee
-a
${
RBUILDLOG
}
sleep
2m
sleep
2m
rsync
-e
"ssh -p
$PORT
"
-r
$NODE
:
$TMPDIR
/b
$BUILDNR
$TMPDIR
/
rsync
-e
"ssh
-o 'BatchMode = yes'
-p
$PORT
"
-r
$NODE
:
$TMPDIR
/b
$BUILDNR
$TMPDIR
/
RESULT
=
$?
RESULT
=
$?
if
[
$RESULT
-ne
0
]
;
then
if
[
$RESULT
-ne
0
]
;
then
handle_remote_error
"when rsyncing remote build #
$BUILDNR
results from
$NODE
"
handle_remote_error
"when rsyncing remote build #
$BUILDNR
results from
$NODE
"
fi
fi
fi
fi
ls
-lR
$TMPDIR
ls
-lR
$TMPDIR
ssh
-p
$PORT
$NODE
"rm -r
$TMPDIR
"
ssh
-o
"BatchMode = yes"
-p
$PORT
$NODE
"rm -r
$TMPDIR
"
set
-e
set
-e
if
[
$BUILDNR
-eq
1
]
;
then
if
[
$BUILDNR
-eq
1
]
;
then
cat
$TMPDIR
/b1/build.log
>>
${
RBUILDLOG
}
cat
$TMPDIR
/b1/build.log
>>
${
RBUILDLOG
}
...
...
bin/reproducible_build_archlinux_pkg.sh
View file @
a2873a51
...
@@ -220,7 +220,7 @@ remote_build() {
...
@@ -220,7 +220,7 @@ remote_build() {
local
FQDN
=
$NODE
.debian.net
local
FQDN
=
$NODE
.debian.net
local
PORT
=
22
local
PORT
=
22
set
+e
set
+e
ssh
-p
$PORT
$FQDN
/bin/true
ssh
-o
"Batchmode = yes"
-p
$PORT
$FQDN
/bin/true
RESULT
=
$?
RESULT
=
$?
# abort job if host is down
# abort job if host is down
if
[
$RESULT
-ne
0
]
;
then
if
[
$RESULT
-ne
0
]
;
then
...
@@ -229,10 +229,10 @@ remote_build() {
...
@@ -229,10 +229,10 @@ remote_build() {
sleep
${
SLEEPTIME
}
m
sleep
${
SLEEPTIME
}
m
exec
/srv/jenkins/bin/abort.sh
exec
/srv/jenkins/bin/abort.sh
fi
fi
ssh
-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
$REPOSITORY
${
SRCPACKAGE
}
${
TMPDIR
}
RESULT
=
$?
RESULT
=
$?
if
[
$RESULT
-ne
0
]
;
then
if
[
$RESULT
-ne
0
]
;
then
ssh
-p
$PORT
$FQDN
"rm -r
$TMPDIR
"
||
true
ssh
-o
"Batchmode = yes"
-p
$PORT
$FQDN
"rm -r
$TMPDIR
"
||
true
if
[
$RESULT
-eq
23
]
;
then
if
[
$RESULT
-eq
23
]
;
then
echo
"
$(
date
-u
)
- remote job could not end schroot session properly and sent error 23 so we could abort silently."
echo
"
$(
date
-u
)
- remote job could not end schroot session properly and sent error 23 so we could abort silently."
exec
/srv/jenkins/bin/abort.sh
exec
/srv/jenkins/bin/abort.sh
...
@@ -243,19 +243,19 @@ remote_build() {
...
@@ -243,19 +243,19 @@ remote_build() {
handle_remote_error
"with exit code
$RESULT
from
$NODE
for build #
$BUILDNR
for
${
SRCPACKAGE
}
from
$REPOSITORY
"
handle_remote_error
"with exit code
$RESULT
from
$NODE
for build #
$BUILDNR
for
${
SRCPACKAGE
}
from
$REPOSITORY
"
fi
fi
fi
fi
rsync
-e
"ssh -p
$PORT
"
-r
$FQDN
:
$TMPDIR
/b
$BUILDNR
$TMPDIR
/
rsync
-e
"ssh
-o 'Batchmode = yes'
-p
$PORT
"
-r
$FQDN
:
$TMPDIR
/b
$BUILDNR
$TMPDIR
/
RESULT
=
$?
RESULT
=
$?
if
[
$RESULT
-ne
0
]
;
then
if
[
$RESULT
-ne
0
]
;
then
echo
"
$(
date
-u
)
- rsync from
$NODE
failed, sleeping 2m before re-trying..."
echo
"
$(
date
-u
)
- rsync from
$NODE
failed, sleeping 2m before re-trying..."
sleep
2m
sleep
2m
rsync
-e
"ssh -p
$PORT
"
-r
$FQDN
:
$TMPDIR
/b
$BUILDNR
$TMPDIR
/
rsync
-e
"ssh
-o 'Batchmode = yes'
-p
$PORT
"
-r
$FQDN
:
$TMPDIR
/b
$BUILDNR
$TMPDIR
/
RESULT
=
$?
RESULT
=
$?
if
[
$RESULT
-ne
0
]
;
then
if
[
$RESULT
-ne
0
]
;
then
handle_remote_error
"when rsyncing remote build #
$BUILDNR
results from
$NODE
"
handle_remote_error
"when rsyncing remote build #
$BUILDNR
results from
$NODE
"
fi
fi
fi
fi
ls
-lR
$TMPDIR
ls
-lR
$TMPDIR
ssh
-p
$PORT
$FQDN
"rm -r
$TMPDIR
"
ssh
-o
"Batchmode = yes"
-p
$PORT
$FQDN
"rm -r
$TMPDIR
"
set
-e
set
-e
}
}
...
...
bin/reproducible_build_rpm.sh
View file @
a2873a51
...
@@ -148,7 +148,7 @@ remote_build() {
...
@@ -148,7 +148,7 @@ remote_build() {
local
FQDN
=
$NODE
.debian.net
local
FQDN
=
$NODE
.debian.net
local
PORT
=
22
local
PORT
=
22
set
+e
set
+e
ssh
-p
$PORT
$FQDN
/bin/true
ssh
-o
"Batchmode = yes"
-p
$PORT
$FQDN
/bin/true
RESULT
=
$?
RESULT
=
$?
# abort job if host is down
# abort job if host is down
if
[
$RESULT
-ne
0
]
;
then
if
[
$RESULT
-ne
0
]
;
then
...
@@ -157,25 +157,25 @@ remote_build() {
...
@@ -157,25 +157,25 @@ remote_build() {
sleep
${
SLEEPTIME
}
m
sleep
${
SLEEPTIME
}
m
exec
/srv/jenkins/bin/abort.sh
exec
/srv/jenkins/bin/abort.sh
fi
fi
ssh
-p
$PORT
$FQDN
/srv/jenkins/bin/reproducible_build_rpm.sh
$BUILDNR
$RELEASE
$ARCH
$UNIQUEEXT
${
SRCPACKAGE
}
${
TMPDIR
}
ssh
-o
"Batchmode = yes"
-p
$PORT
$FQDN
/srv/jenkins/bin/reproducible_build_rpm.sh
$BUILDNR
$RELEASE
$ARCH
$UNIQUEEXT
${
SRCPACKAGE
}
${
TMPDIR
}
RESULT
=
$?
RESULT
=
$?
if
[
$RESULT
-ne
0
]
;
then
if
[
$RESULT
-ne
0
]
;
then
ssh
-p
$PORT
$FQDN
"rm -r
$TMPDIR
"
||
true
ssh
-o
"Batchmode = yes"
-p
$PORT
$FQDN
"rm -r
$TMPDIR
"
||
true
handle_remote_error
"with exit code
$RESULT
from
$NODE
for build #
$BUILDNR
for
${
SRCPACKAGE
}
from
$RELEASE
(
$ARCH
)"
handle_remote_error
"with exit code
$RESULT
from
$NODE
for build #
$BUILDNR
for
${
SRCPACKAGE
}
from
$RELEASE
(
$ARCH
)"
fi
fi
rsync
-e
"ssh -p
$PORT
"
-r
$FQDN
:
$TMPDIR
/b
$BUILDNR
$TMPDIR
/
rsync
-e
"ssh
-o 'Batchmode = yes'
-p
$PORT
"
-r
$FQDN
:
$TMPDIR
/b
$BUILDNR
$TMPDIR
/
RESULT
=
$?
RESULT
=
$?
if
[
$RESULT
-ne
0
]
;
then
if
[
$RESULT
-ne
0
]
;
then
echo
"
$(
date
-u
)
- rsync from
$NODE
failed, sleeping 2m before re-trying..."
echo
"
$(
date
-u
)
- rsync from
$NODE
failed, sleeping 2m before re-trying..."
sleep
2m
sleep
2m
rsync
-e
"ssh -p
$PORT
"
-r
$FQDN
:
$TMPDIR
/b
$BUILDNR
$TMPDIR
/
rsync
-e
"ssh
-o 'Batchmode = yes'
-p
$PORT
"
-r
$FQDN
:
$TMPDIR
/b
$BUILDNR
$TMPDIR
/
RESULT
=
$?
RESULT
=
$?
if
[
$RESULT
-ne
0
]
;
then
if
[
$RESULT
-ne
0
]
;
then
handle_remote_error
"when rsyncing remote build #
$BUILDNR
results from
$NODE
"
handle_remote_error
"when rsyncing remote build #
$BUILDNR
results from
$NODE
"
fi
fi
fi
fi
ls
-lR
$TMPDIR
ls
-lR
$TMPDIR
ssh
-p
$PORT
$FQDN
"rm -r
$TMPDIR
"
ssh
-o
"Batchmode = yes"
-p
$PORT
$FQDN
"rm -r
$TMPDIR
"
set
-e
set
-e
}
}
...
...
bin/reproducible_freebsd.sh
View file @
a2873a51
...
@@ -92,7 +92,7 @@ declare -A FREEBSD_VERSION
...
@@ -92,7 +92,7 @@ declare -A FREEBSD_VERSION
declare
-A
FILES_HTML
declare
-A
FILES_HTML
for
FREEBSD_TARGET
in
${
FREEBSD_TARGETS
}
;
do
for
FREEBSD_TARGET
in
${
FREEBSD_TARGETS
}
;
do
set
-e
set
-e
RSSH
=
"ssh freebsd-jenkins.debian.net"
RSSH
=
"ssh
-o 'Batchmode = yes'
freebsd-jenkins.debian.net"
RSCP
=
"scp -r freebsd-jenkins.debian.net"
RSCP
=
"scp -r freebsd-jenkins.debian.net"
TMPBUILDDIR
=
/usr/src
TMPBUILDDIR
=
/usr/src
$RSSH
'sudo rm -rf /usr/src ; sudo mkdir /usr/src ; sudo chown jenkins /usr/src'
### this is tmpfs on linux, we should move this to tmpfs on FreeBSD too
$RSSH
'sudo rm -rf /usr/src ; sudo mkdir /usr/src ; sudo chown jenkins /usr/src'
### this is tmpfs on linux, we should move this to tmpfs on FreeBSD too
...
...
bin/reproducible_html_rsync_remote_results.sh
View file @
a2873a51
...
@@ -16,7 +16,7 @@ rsync_remote_results() {
...
@@ -16,7 +16,7 @@ rsync_remote_results() {
echo
"
$(
date
-u
)
- Starting to rsync results for '
$PROJECT
'."
echo
"
$(
date
-u
)
- Starting to rsync results for '
$PROJECT
'."
local
RESULTS
=
$(
mktemp
--tmpdir
=
$TEMPDIR
-d
reproducible-rsync-XXXXXXXXX
)
local
RESULTS
=
$(
mktemp
--tmpdir
=
$TEMPDIR
-d
reproducible-rsync-XXXXXXXXX
)
# copy the new results from build node to webserver node
# copy the new results from build node to webserver node
rsync
-r
-v
-e
ssh profitbricks-build3-amd64.debian.net:
$BASE
/
$PROJECT
/
$RESULTS
rsync
-r
-v
-e
"
ssh
-o 'Batchmode = yes'"
profitbricks-build3-amd64.debian.net:
$BASE
/
$PROJECT
/
$RESULTS
chmod
775
$RESULTS
chmod
775
$RESULTS
# move old results out of the way
# move old results out of the way
mv
$BASE
/
$PROJECT
${
RESULTS
}
.tmp
mv
$BASE
/
$PROJECT
${
RESULTS
}
.tmp
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment