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
80d5f143
Unverified
Commit
80d5f143
authored
Jul 14, 2016
by
Philip Hands
Committed by
Holger Levsen
Jul 14, 2016
Browse files
update_jdn: spaces to TABs
Signed-off-by:
Holger Levsen
<
holger@layer-acht.org
>
parent
9a1438dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
update_jdn.sh
View file @
80d5f143
...
@@ -497,8 +497,8 @@ if [ -e "$HOST_JOBS" ] ; then
...
@@ -497,8 +497,8 @@ if [ -e "$HOST_JOBS" ] ; then
sudo
rsync
-rpt
--copy-links
--delete
"
$HOST_JOBS
/"
/srv/jenkins/job-cfg/
sudo
rsync
-rpt
--copy-links
--delete
"
$HOST_JOBS
/"
/srv/jenkins/job-cfg/
sudo chown
-R
jenkins-adm.jenkins-adm /srv/jenkins/
$dir
sudo chown
-R
jenkins-adm.jenkins-adm /srv/jenkins/
$dir
else
else
# tidying up ... assuming that we don't want clutter on peripheral servers
# tidying up ... assuming that we don't want clutter on peripheral servers
[
-d
/srv/jenkins/job-cfg
]
&&
sudo rm
-rf
/srv/jenkins/job-cfg
[
-d
/srv/jenkins/job-cfg
]
&&
sudo rm
-rf
/srv/jenkins/job-cfg
fi
fi
...
@@ -548,7 +548,7 @@ if [ "$HOSTNAME" = "jenkins" ] || [ "$HOSTNAME" = "jenkins-test-vm" ] ; then
...
@@ -548,7 +548,7 @@ if [ "$HOSTNAME" = "jenkins" ] || [ "$HOSTNAME" = "jenkins-test-vm" ] ; then
cd
/srv/jenkins/job-cfg
cd
/srv/jenkins/job-cfg
for
metaconfig
in
*
.yaml.py
;
do
for
metaconfig
in
*
.yaml.py
;
do
# there are both python2 and python3 scripts here
# there are both python2 and python3 scripts here
[
-e
./
$metaconfig
]
||
continue
[
-e
./
$metaconfig
]
||
continue
./
$metaconfig
>
$TMPFILE
./
$metaconfig
>
$TMPFILE
if
!
sudo
-u
jenkins-adm cmp
-s
${
metaconfig
%.py
}
- <
$TMPFILE
;
then
if
!
sudo
-u
jenkins-adm cmp
-s
${
metaconfig
%.py
}
- <
$TMPFILE
;
then
sudo
-u
jenkins-adm
tee
${
metaconfig
%.py
}
>
/dev/null <
$TMPFILE
sudo
-u
jenkins-adm
tee
${
metaconfig
%.py
}
>
/dev/null <
$TMPFILE
...
@@ -584,16 +584,16 @@ if [ "$HOSTNAME" = "jenkins" ] ; then
...
@@ -584,16 +584,16 @@ if [ "$HOSTNAME" = "jenkins" ] ; then
# creating LVM volume group for jobs
# creating LVM volume group for jobs
#
#
if
[
"
$PVNAME
"
=
""
]
;
then
if
[
"
$PVNAME
"
=
""
]
;
then
figlet
-f
banner Error
figlet
-f
banner Error
explain
"you must set
\$
PVNAME to physical volume pathname, exiting."
explain
"you must set
\$
PVNAME to physical volume pathname, exiting."
exit
1
exit
1
elif
!
$UP2DATE
;
then
elif
!
$UP2DATE
;
then
if
!
sudo
pvs
$PVNAME
>
/dev/null 2>&1
;
then
if
!
sudo
pvs
$PVNAME
>
/dev/null 2>&1
;
then
sudo
pvcreate
$PVNAME
sudo
pvcreate
$PVNAME
fi
fi
if
!
sudo
vgs
$VGNAME
>
/dev/null 2>&1
;
then
if
!
sudo
vgs
$VGNAME
>
/dev/null 2>&1
;
then
sudo
vgcreate
$VGNAME
$PVNAME
sudo
vgcreate
$VGNAME
$PVNAME
fi
fi
fi
fi
fi
fi
...
@@ -604,18 +604,18 @@ if [ "$HOSTNAME" = "jenkins" ] || [ "$HOSTNAME" = "profitbricks-build3-amd64" ]
...
@@ -604,18 +604,18 @@ if [ "$HOSTNAME" = "jenkins" ] || [ "$HOSTNAME" = "profitbricks-build3-amd64" ]
cd
$BASEDIR
cd
$BASEDIR
KGB_SECRETS
=
"/srv/jenkins/kgb/secrets.yml"
KGB_SECRETS
=
"/srv/jenkins/kgb/secrets.yml"
if
[
-f
"
$KGB_SECRETS
"
]
&&
[
$(
stat
-c
"%a:%U:%G"
"
$KGB_SECRETS
"
)
=
"640:jenkins-adm:jenkins-adm"
]
;
then
if
[
-f
"
$KGB_SECRETS
"
]
&&
[
$(
stat
-c
"%a:%U:%G"
"
$KGB_SECRETS
"
)
=
"640:jenkins-adm:jenkins-adm"
]
;
then
# the last condition is to assure the files are owned by the right user/team
# the last condition is to assure the files are owned by the right user/team
if
[
"
$KGB_SECRETS
"
-nt
$STAMP
]
||
[
!
-f
$STAMP
]
;
then
if
[
"
$KGB_SECRETS
"
-nt
$STAMP
]
||
[
!
-f
$STAMP
]
;
then
sudo
-u
jenkins-adm
"./deploy_kgb.py"
sudo
-u
jenkins-adm
"./deploy_kgb.py"
else
else
explain
"kgb-client configuration unchanged, nothing to do."
explain
"kgb-client configuration unchanged, nothing to do."
fi
fi
else
else
figlet
-f
banner Warning
figlet
-f
banner Warning
echo
"Warning:
$KGB_SECRETS
either does not exist or has bad permissions. Please fix. KGB configs not generated"
echo
"Warning:
$KGB_SECRETS
either does not exist or has bad permissions. Please fix. KGB configs not generated"
echo
"We expect the secrets file to be mode 640 and owned by jenkins-adm:jenkins-adm."
echo
"We expect the secrets file to be mode 640 and owned by jenkins-adm:jenkins-adm."
echo
"/srv/jenkins/kbg should be mode 755 and owned by jenkins-adm:root."
echo
"/srv/jenkins/kbg should be mode 755 and owned by jenkins-adm:root."
echo
"/srv/jenkins/kbg/client-status should be mode 755 and owned by jenkins:jenkins."
echo
"/srv/jenkins/kbg/client-status should be mode 755 and owned by jenkins:jenkins."
fi
fi
fi
fi
...
...
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