[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: update_jdn: copy the job-cfg yaml as the right user already
Mattia Rizzolo
gitlab at salsa.debian.org
Sat May 19 16:12:42 BST 2018
Mattia Rizzolo pushed to branch master at Debian QA / jenkins.debian.net
Commits:
e6a8df08 by Mattia Rizzolo at 2018-05-19T17:09:59+02:00
update_jdn: copy the job-cfg yaml as the right user already
Signed-off-by: Mattia Rizzolo <mattia at debian.org>
- - - - -
eb769e67 by Mattia Rizzolo at 2018-05-19T17:11:13+02:00
update_jdn: fix logic
Signed-off-by: Mattia Rizzolo <mattia at debian.org>
- - - - -
1 changed file:
- update_jdn.sh
Changes:
=====================================
update_jdn.sh
=====================================
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -621,8 +621,7 @@ for dir in bin logparse live mustache-templates ; do
done
HOST_JOBS="hosts/$HOSTNAME/job-cfg"
if [ -e "$HOST_JOBS" ] ; then
- sudo rsync -rpt --copy-links --delete "$HOST_JOBS/" /srv/jenkins/job-cfg/
- sudo chown -R jenkins-adm.jenkins-adm /srv/jenkins/$dir
+ sudo -u jenkins-adm rsync -rpt --copy-links --delete "$HOST_JOBS/" /srv/jenkins/job-cfg/
else
# tidying up ... assuming that we don't want clutter on peripheral servers
[ -d /srv/jenkins/job-cfg ] && sudo rm -rf /srv/jenkins/job-cfg
@@ -676,7 +675,7 @@ if [ "$HOSTNAME" = "jenkins" ] || [ "$HOSTNAME" = "jenkins-test-vm" ] ; then
cd /srv/jenkins/job-cfg
for metaconfig in *.yaml.py ; do
# regen the file only if the .py is newer than the generated file
- if [ ! -f "${metaconfig%.py}" ] && [ "$metaconfig" -nt "${metaconfig%.py}" ]; then
+ if [ ! -f "${metaconfig%.py}" ] || [ "$metaconfig" -nt "${metaconfig%.py}" ]; then
TMPFILE=$(sudo -u jenkins-adm mktemp)
sudo -u jenkins-adm "./$metaconfig" > "$TMPFILE"
sudo -u jenkins-adm mv "$TMPFILE" "${metaconfig%.py}"
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/a5979cd550dfbd8dae9184bd85825c0eeab4244a...eb769e67ad390a29ba32622116bf29226ae7fa2d
---
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/a5979cd550dfbd8dae9184bd85825c0eeab4244a...eb769e67ad390a29ba32622116bf29226ae7fa2d
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20180519/a6f4f142/attachment.html>
More information about the Qa-jenkins-scm
mailing list