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
0e6b358c
Unverified
Commit
0e6b358c
authored
Jun 20, 2016
by
Holger Levsen
Browse files
only run apt-get install if update_jdn.sh has changed
parent
c9771141
Changes
1
Hide whitespace changes
Inline
Side-by-side
update_jdn.sh
View file @
0e6b358c
...
@@ -14,10 +14,20 @@ TMPFILE=$(mktemp)
...
@@ -14,10 +14,20 @@ TMPFILE=$(mktemp)
# which allows one to specify --flush-cache or --ignore-cache
# which allows one to specify --flush-cache or --ignore-cache
JJB
=
"jenkins-job-builder
$@
"
JJB
=
"jenkins-job-builder
$@
"
# so we can later run some commands only if $0 has been updated…
if
[
!
-f
$STAMP
]
&&
[
$BASEDIR
/
$0
-nt
$STAMP
]
;
UPTODATE
=
false
else
UPTODATE
=
true
fi
explain
()
{
explain
()
{
echo
"
$HOSTNAME
:
$1
"
echo
"
$HOSTNAME
:
$1
"
}
}
echo
"--------------------------------------------"
echo
"--------------------------------------------"
explain
"
$(
date
)
- begin deployment update."
explain
"
$(
date
)
- begin deployment update."
...
@@ -363,25 +373,25 @@ if [ -f /etc/debian_version ] ; then
...
@@ -363,25 +373,25 @@ if [ -f /etc/debian_version ] ; then
MASTERDEBS
=
""
MASTERDEBS
=
""
fi
fi
sudo
apt-get update
sudo
apt-get update
sudo
apt-get
install
$DEBS
$MASTERDEBS
$UP2DATE
||
sudo
apt-get
install
$DEBS
$MASTERDEBS
sudo
apt-get
install
-t
jessie-backports
\
$UP2DATE
||
sudo
apt-get
install
-t
jessie-backports
\
pbuilder lintian
||
echo
"this should only fail on the first install"
pbuilder lintian
||
echo
"this should only fail on the first install"
# botch
# botch
# we need mock from bpo to build current fedora
# we need mock from bpo to build current fedora
if
[
"
$HOSTNAME
"
=
"profitbricks-build3-amd64"
]
||
[
"
$HOSTNAME
"
=
"profitbricks-build4-amd64"
]
||
[
"
$HOSTNAME
"
=
"jenkins"
]
;
then
if
[
"
$HOSTNAME
"
=
"profitbricks-build3-amd64"
]
||
[
"
$HOSTNAME
"
=
"profitbricks-build4-amd64"
]
||
[
"
$HOSTNAME
"
=
"jenkins"
]
;
then
sudo
apt-get
install
-t
jessie-backports mock
\
$UP2DATE
||
sudo
apt-get
install
-t
jessie-backports mock
\
||
echo
"this should only fail on the first install"
||
echo
"this should only fail on the first install"
fi
fi
# for varying kernels
# for varying kernels
# we use bpo kernels on pb-build5+6 (and i386 kernel on pb-build2-i386)
# we use bpo kernels on pb-build5+6 (and i386 kernel on pb-build2-i386)
if
[
"
$HOSTNAME
"
=
"profitbricks-build5-amd64"
]
||
[
"
$HOSTNAME
"
=
"profitbricks-build6-i386"
]
;
then
if
[
"
$HOSTNAME
"
=
"profitbricks-build5-amd64"
]
||
[
"
$HOSTNAME
"
=
"profitbricks-build6-i386"
]
;
then
sudo
apt-get
install
-t
jessie-backports linux-image-amd64
||
echo
"this should only fail on the first install"
$UP2DATE
||
sudo
apt-get
install
-t
jessie-backports linux-image-amd64
||
echo
"this should only fail on the first install"
fi
fi
# only needed on the main node
# only needed on the main node
if
[
"
$HOSTNAME
"
=
"jenkins-test-vm"
]
;
then
if
[
"
$HOSTNAME
"
=
"jenkins-test-vm"
]
;
then
sudo
apt-get
install
-t
jessie-backports jenkins-job-builder
||
echo
"this should only fail on the first install"
$UP2DATE
||
sudo
apt-get
install
-t
jessie-backports jenkins-job-builder
||
echo
"this should only fail on the first install"
elif
[
"
$HOSTNAME
"
=
"jenkins"
]
;
then
elif
[
"
$HOSTNAME
"
=
"jenkins"
]
;
then
sudo
apt-get
install
-t
jessie-backports ffmpeg libav-tools python3-popcon jenkins-job-builder
$UP2DATE
||
sudo
apt-get
install
-t
jessie-backports ffmpeg libav-tools python3-popcon jenkins-job-builder
fi
fi
explain
"packages installed."
explain
"packages installed."
else
else
...
...
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