From 5cb5d11c6645a200254dcd9efac6025436d79323 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 23 Dec 2014 16:46:29 +0100 Subject: convert lvc.yaml into lvc.yaml.py --- job-cfg/lvc.yaml | 65 ----------------------------------------- job-cfg/lvc.yaml.py | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 65 deletions(-) delete mode 100644 job-cfg/lvc.yaml create mode 100644 job-cfg/lvc.yaml.py diff --git a/job-cfg/lvc.yaml b/job-cfg/lvc.yaml deleted file mode 100644 index 87ca0fe9..00000000 --- a/job-cfg/lvc.yaml +++ /dev/null @@ -1,65 +0,0 @@ -- defaults: - name: lvc - project-type: freestyle - properties: - - sidebar: - url: https://jenkins.debian.net/userContent/about.html - text: About jenkins.debian.net - icon: /userContent/images/debian-swirl-24x24.png - - sidebar: - url: https://jenkins.debian.net/view/lvc - text: Jobs for libvirt and cucumber based tests - icon: /userContent/images/debian-jenkins-24x24.png - - sidebar: - url: http://www.profitbricks.com - text: Sponsored by Profitbricks - icon: /userContent/images/profitbricks-24x24.png - description: '{my_description}

Job configuration source is lvc.yaml.' - logrotate: - daysToKeep: 90 - numToKeep: 20 - artifactDaysToKeep: -1 - artifactNumToKeep: -1 - publishers: - - email: - recipients: 'holger@layer-acht.org' - - archive: - artifacts: '*.webm, {my_pngs}' - latest_only: false - - imagegallery: - title: '{my_title}' - includes: '{my_pngs}' - image-width: 300 - builders: - - shell: '/srv/jenkins/bin/lvc/run_test_suite {my_params}' - triggers: - - timed: '{my_time}' - -- job-template: - defaults: lvc - name: '{name}_debian-live_wheezy' - -- job-template: - defaults: lvc - name: '{name}_debian-live_standard_wheezy' - -- job-template: - defaults: lvc - name: '{name}_debian-live_gnome_wheezy' - -- project: - name: lvc - jobs: - - '{name}_debian-live_standard_wheezy': - my_title: 'Debian Live 7 standard' - my_time: '23 45 31 12 *' - my_params: '--debug --capture lvc_debian-live_wheezy.webm --temp-dir $WORKSPACE --iso /var/lib/jenkins/debian-live-7.7.0-amd64-standard.iso DebianLive7/apt.feature' - my_pngs: 'apt-*.png' - my_description: 'Work in progress...' - - '{name}_debian-live_gnome_wheezy': - my_title: 'Debian Live 7 GNOME desktop' - my_time: '23 45 31 12 *' - my_params: '--debug --capture lvc_debian-live_wheezy.webm --temp-dir $WORKSPACE --iso /var/lib/jenkins/debian-live-7.7.0-amd64-gnome-desktop.iso DebianLive7/apt.feature' - my_pngs: 'apt-*.png' - my_description: 'Work in progress...' - diff --git a/job-cfg/lvc.yaml.py b/job-cfg/lvc.yaml.py new file mode 100644 index 00000000..9dce44f4 --- /dev/null +++ b/job-cfg/lvc.yaml.py @@ -0,0 +1,83 @@ +#!/usr/bin/python + +images = """ + wheezy_standard + wheezy_gnome-desktop + """.split() + +features = """ + apt + """.split() + +files = { 'wheezy_standard': '/var/lib/jenkins/debian-live-7.7.0-amd64-standard.iso', + 'wheezy_gnome-desktop': '/var/lib/jenkins/debian-live-7.7.0-amd64-gnome-desktop.iso' + } + +titles = { 'wheezy_standard': 'Debian Live 7 standard', + 'wheezy_gnome-desktop': 'Debian Live 7 GNOME desktop' + } + +print(""" +- defaults: + name: lvc + project-type: freestyle + properties: + - sidebar: + url: https://jenkins.debian.net/userContent/about.html + text: About jenkins.debian.net + icon: /userContent/images/debian-swirl-24x24.png + - sidebar: + url: https://jenkins.debian.net/view/lvc + text: Jobs for libvirt and cucumber based tests + icon: /userContent/images/debian-jenkins-24x24.png + - sidebar: + url: http://www.profitbricks.com + text: Sponsored by Profitbricks + icon: /userContent/images/profitbricks-24x24.png + description: '{my_description}

Job configuration source is lvc.yaml.py.' + logrotate: + daysToKeep: 90 + numToKeep: 20 + artifactDaysToKeep: -1 + artifactNumToKeep: -1 + publishers: + - email: + recipients: 'holger@layer-acht.org' + - archive: + artifacts: '*.webm, {my_pngs}' + latest_only: false + - imagegallery: + title: '{my_title}' + includes: '{my_pngs}' + image-width: 300 + builders: + - shell: '/srv/jenkins/bin/lvc/run_test_suite {my_params}' + triggers: + - timed: '{my_time}' +""") + +for image in sorted(images): + for feature in sorted(features): + print("""- job-template: + defaults: lvc + name: '{name}_debian-live_%(image)s_%(feature)s' +""" % dict(image=image, + feature=feature)) + +print(""" +- project: + name: lvc + jobs:""") +for image in sorted(images): + for feature in sorted(features): + print(""" - '{name}_debian-live_%(image)s_%(feature)s': + my_title: '%(title)s' + my_time: '23 45 31 12 *' + my_params: '--debug --capture lvc_debian-live_%(image)s_%(feature)s.webm --temp-dir $WORKSPACE --iso %(iso)s DebianLive7/%(feature)s.feature' + my_pngs: '%(feature)s-*.png' + my_description: 'Work in progress...' +""" % dict(image=image, + feature=feature, + iso=files[image], + title=titles[image])) + -- cgit v1.2.3-54-g00ecf