summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TODO14
-rw-r--r--job-cfg/d-i.yaml52
-rw-r--r--job-cfg/general.yaml9
-rwxr-xr-xupdate_jdn.sh11
4 files changed, 83 insertions, 3 deletions
diff --git a/TODO b/TODO
index 1530214f..7272d10f 100644
--- a/TODO
+++ b/TODO
@@ -18,10 +18,10 @@ About jenkins.debian.net
== General todo
+* use https://github.com/openstack*ci/jenkins*job*builder to create _all_ job configurations (if possible, else mix with job*dsl*plugin or https://github.com/JoelJ/Templating.git
* mail notifications (to where?)
* proper backup (=daily), see bottom of this document for what to backup
* more tests (see below)
-* use https://github.com/openstack*ci/jenkins*job*builder to create _all_ job configurations (if possible, else mix with job*dsl*plugin or https://github.com/JoelJ/Templating.git
=== Minor stuff
@@ -60,7 +60,19 @@ About jenkins.debian.net
** update_jdn.sh is available in the git repo
* package configuration is kept in git and deployed by update_jdn.sh as well
+=== installing jenkins-job-builder
+* rebuild python-jenkinsapi from sid for wheezy
+* pip install python-jenkins
+* git clone https://github.com/openstack-ci/jenkins-job-builder ; cd jenkins-job-builder ; python setup.py install
+
+=== using jenkins-job-builder
+
+* then run 'cd /srv/jenkins/job-cfg ; jenkins-jobs update .' to update jobs
+
+* testing: 'cd /srv/jenkins/job-cfg ; rm test-output/ -r ; mkdir test-output ; jenkins-jobs test . -o test-output/ ; ls test-output/'
+
== To backup
+
* /etc/.git
* /var/lib/jenkins/job/*/config.xml
* /var/lib/jenkins/config.xml as well as its plugins etc
diff --git a/job-cfg/d-i.yaml b/job-cfg/d-i.yaml
new file mode 100644
index 00000000..5e8fc182
--- /dev/null
+++ b/job-cfg/d-i.yaml
@@ -0,0 +1,52 @@
+- job-template:
+ name: '{name}-manual'
+
+ scm:
+ - svn:
+ url: svn://svn.debian.org/svn/d-i/trunk
+ basedir: .
+ workspaceupdater: update
+ # repositorybrowser missing:
+ # <browser class="hudson.scm.browsers.ViewSVN">
+ # <url # http://anonscm.debian.org/viewvc/</url #
+ # </browser #
+ # <excludedRegions # </excludedRegions #
+ # <includedRegions # trunk/manual/.*</includedRegions #
+ # <excludedUsers # </excludedUsers #
+ # <excludedRevprop # </excludedRevprop #
+ # <excludedCommitMessages # </excludedCommitMessages #
+
+ builders:
+ - shell: 'ls'
+
+ triggers:
+ - pollscm: "*/30 * * * *"
+ # publisher: logparse missing
+ # <publishers>
+ # <hudson.plugins.logparser.LogParserPublisher>
+ # <unstableOnWarning>true</unstableOnWarning>
+ # <failBuildOnError>true</failBuildOnError>
+ # <parsingRulesPath>/srv/jenkins/logparse/debian.rules</parsingRulesPath>
+ # </hudson.plugins.logparser.LogParserPublisher>
+ # </publishers>
+
+- job-template:
+ name: '{name}-parse-build-logs'
+
+ builders:
+ - shell: '/srv/jenkins/bin/parse_d-i_logs.sh http://d-i.debian.org/daily-images/build-logs.html'
+
+ triggers:
+ - timed: "0 5 * * *"
+ # publisher: logparse also missing
+ # publisher: build-logs.html "daily d-i build logs"
+
+- project:
+ name: testjob_d-i
+
+ jobs:
+ - '{name}-manual'
+ - '{name}-parse-build-logs'
+
+
+
diff --git a/job-cfg/general.yaml b/job-cfg/general.yaml
new file mode 100644
index 00000000..1d70c158
--- /dev/null
+++ b/job-cfg/general.yaml
@@ -0,0 +1,9 @@
+- defaults:
+ name: global
+ description: 'configured by jenkins-job-builder, do not edit this job through the web UI.'
+ project-type: freestyle
+ logrotate:
+ daysToKeep: 90
+ numToKeep: 25
+ artifactDaysToKeep: -1
+ artifactNumToKeep: -1
diff --git a/update_jdn.sh b/update_jdn.sh
index c15a19c0..79ee43c5 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -14,7 +14,7 @@ done
#
# install the heart of jenkins.debian.net
#
-cp -r bin logparse /srv/jenkins/
+cp -r bin logparse job-cfg /srv/jenkins/
cp -r userContent/* /var/lib/jenkins/userContent/
asciidoc -a numbered -a data-uri -a iconsdir=/etc/asciidoc/images/icons -a scriptsdir=/etc/asciidoc/javascripts -a imagesdir=./ -b html5 -a toc -a toclevels=4 -a icons -o about.html TODO && cp about.html /var/lib/jenkins/userContent/
@@ -24,7 +24,7 @@ asciidoc -a numbered -a data-uri -a iconsdir=/etc/asciidoc/images/icons -a scrip
#
sudo apt-get install vim screen less etckeeper curl mtr-tiny dstat devscripts bash-completion shorewall shorewall6 cron-apt apt-listchanges \
build-essential python-setuptools \
- debootstrap sudo figlet graphviz apache2 python-yaml
+ debootstrap sudo figlet graphviz apache2 python-yaml python-pip mr subversion subversion-tools
#
# deploy package configuration in /etc
@@ -42,3 +42,10 @@ sudo chown root.root /etc/sudoers.d/jenkins ; sudo chmod 700 /etc/sudoers.d/jenk
sudo ln -sf /etc/apache2/sites-available/jenkins.debian.net /etc/apache2/sites-enabled/000-default
sudo service apache2 reload
+#
+# run jenkins-job-builder to update jobs if needed
+# (using sudo because /etc/jenkins_jobs is root:root 700)
+#
+cd /srv/jenkins/job-cfg
+sudo jenkins-jobs update .
+