rebootstrap.yaml.py 5.35 KB
Newer Older
1 2 3
#!/usr/bin/python

architectures = """
4 5
   kfreebsd-amd64
   i386 kfreebsd-i386
6
   mips mips64el mipsel
7
   powerpc ppc64
8
   s390x
9
   sparc sparc64
10 11 12 13
   x32
   """.split()

mono_architectures = """
14 15
    armel armhf kfreebsd-armhf arm64 arm64ilp32 hurd-amd64
    musl-linux-armhf musl-linux-arm64
16
    alpha
17
    hppa
18
    hurd-i386 musl-linux-i386
Helmut Grohne's avatar
Helmut Grohne committed
19
    ia64
20
    m68k
21
    mips64 mips64r6el mipsr6el
22
    musl-linux-mips musl-linux-mipsel
23
    nios2
24
    powerpcspe ppc64el
25
    riscv64
26
    sh3 sh4
27 28
    """.split()

29 30 31
release_architectures = """
    armel armhf arm64
    i386
32
    mips mips64el mipsel
33
    ppc64el
34 35 36
    s390x
    """.split()

37 38
architectures += mono_architectures

39 40
gcc_versions = ("8",)
diffoscope_gcc_versions = ("8",)
41

42
# repository url doubly maintained in bin/rebootstrap.sh
43 44 45 46 47 48 49
print("""
- defaults:
    name: rebootstrap
    project-type: freestyle
    properties:
      - sidebar:
          url: https://jenkins.debian.net/userContent/about.html
50
          text: About jenkins.debian.net
51 52 53 54 55 56
          icon: /userContent/images/debian-swirl-24x24.png
      - sidebar:
          url: https://jenkins.debian.net/view/rebootstrap/
          text: All rebootstrap jobs
          icon: /userContent/images/debian-jenkins-24x24.png
      - sidebar:
57
          url: http://www.profitbricks.co.uk
58 59
          text: Sponsored by Profitbricks
          icon: /userContent/images/profitbricks-24x24.png
60 61
      - priority-sorter:
          priority: '150'
62
      - throttle:
63 64
          max-total: 5
          max-per-node: 5
65
          enabled: true
66 67 68 69 70
          option: category
          categories:
            - rebootstrap
    description: '{my_description}{do_not_edit}'
    logrotate:
71
      daysToKeep: 90
72
      numToKeep: 10
73 74
      artifactDaysToKeep: -1
      artifactNumToKeep: -1
75 76
    scm:
      - git:
77
          url: 'https://salsa.debian.org/helmutg/rebootstrap.git'
78 79 80
          branches:
            - '{my_branchname}'
    builders:
81
      - shell: '{my_wrapper} {my_branchname} HOST_ARCH={my_arch} {my_params}'
82
    publishers:
83 84
      - email:
          recipients: 'jenkins+debian-bootstrap helmutg@debian.org'
85 86 87 88 89
      - naginator:
          progressive-delay-increment: 5
          progressive-delay-maximum: 15
          max-failed-builds: 5
          regular-expression: 'Caused by: hudson.plugins.git.GitException: Command "git fetch'
90
    triggers:
91
      - pollscm:
92
          cron: 'H H * * *'
93
    node: '{my_node}'
94 95
""")

96 97
for arch in sorted(architectures):
    for gccver in sorted(gcc_versions):
98
        for nobiarch in ["", "_nobiarch"]:
99 100 101
            if nobiarch and arch in mono_architectures:
                continue
            for supported in ["", "_supported"]:
102
                if (nobiarch or arch.startswith("musl-linux-") or arch.startswith("hurd-") or arch.startswith("kfreebsd-")) and supported:
103
                    continue
104 105
                for diffoscope in ["", "_diffoscope"]:
                    if diffoscope and (arch not in release_architectures or gccver not in diffoscope_gcc_versions):
106 107
                        continue
                    print("""
108 109
- job-template:
    defaults: rebootstrap
110 111
    name: '{name}_%(arch)s_gcc%(gccshortver)s%(nobiarch)s%(supported)s%(diffoscope)s'""" %
    dict(arch=arch, gccshortver=gccver.replace(".", ""), nobiarch=nobiarch, supported=supported, diffoscope=diffoscope))
112 113 114 115

print("""
- project:
    name: rebootstrap
116
    do_not_edit: '<br><br>Job configuration source is <a href="https://salsa.debian.org/qa/jenkins.debian.net/blob/master/job-cfg/rebootstrap.yaml.py">rebootstrap.yaml.py</a>.'
117
    jobs:""")
118 119
for arch in sorted(architectures):
    for gccver in sorted(gcc_versions):
120 121 122 123
        for nobiarch in (False, True):
            if nobiarch and arch in mono_architectures:
                continue
            for supported in (False, True):
124
                if (nobiarch or arch.startswith("musl-linux-") or arch.startswith("hurd-") or arch.startswith("kfreebsd-")) and supported:
125
                    continue
126 127
                for diffoscope in (False, True):
                    if diffoscope and (arch not in release_architectures or gccver not in diffoscope_gcc_versions):
128 129
                        continue
                    print(
130 131
"""        - '{name}_%(suffix)s':
            my_arch: '%(arch)s'
132
            my_params: 'GCC_VER=%(gccver)s ENABLE_MULTILIB=%(multilib_value)s ENABLE_MULTIARCH_GCC=%(multiarch_gcc_value)s ENABLE_DIFFOSCOPE=%(diffoscope_value)s'
133
            my_description: 'Verify bootstrappability of Debian using gcc-%(gccver)s%(nobiarch_comment)s for %(arch)s%(supported_comment)s%(diffoscope_comment)s'
134
            my_branchname: 'jenkins_%(suffix)s'
135 136
            my_node: '%(node)s'
            my_wrapper: '/srv/jenkins/bin/jenkins_master_wrapper.sh'""" %
137
                dict(arch=arch,
138
                     suffix=arch + "_gcc" + gccver.replace(".", "") + ("_nobiarch" if nobiarch else "") + ("_supported" if supported else "") + ("_diffoscope" if diffoscope else ""),
139 140
                     gccver=gccver,
                     multilib_value="no" if nobiarch else "yes",
141 142 143
                     nobiarch_comment=" without multilib" if nobiarch else "",
                     multiarch_gcc_value="no" if supported else "yes",
                     supported_comment=" using the supported method" if supported else "",
144 145
                     diffoscope_value="yes" if diffoscope else "no",
                     diffoscope_comment=" showing diffoscopes" if diffoscope else "",
146
                     node="profitbricks9"))
147