summaryrefslogtreecommitdiffstats
path: root/jjb/apex/apex-project-jobs.yaml
blob: 540b1ac79f4889dbefaf7e7557847f8e978f1c3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
---
- project:
    name: 'apex-project-jobs'
    project: 'apex'

    stream:
      - master: &master
          branch: 'master'
          gs-pathname: ''
          concurrent-builds: 3
          disabled: false
      - gambia: &gambia
          branch: 'stable/{stream}'
          gs-pathname: '/{stream}'
          concurrent-builds: 3
          disabled: false
      - fraser: &fraser
          branch: 'stable/{stream}'
          gs-pathname: '/{stream}'
          concurrent-builds: 3
          disabled: false
      - euphrates: &euphrates
          branch: 'stable/euphrates'
          gs-pathname: '/euphrates'
          concurrent-builds: 3
          disabled: true
      - danube: &danube
          branch: 'stable/danube'
          gs-pathname: '/danube'
          concurrent-builds: 1
          disabled: true

    jobs:
      - 'apex-build-{stream}'
      - 'apex-verify-iso-{stream}'

# Build phase
- job-template:
    name: 'apex-build-{stream}'

    # Job template for builds
    #
    # Required Variables:
    #     stream:    branch with - in place of / (eg. stable)
    #     branch:    branch (eg. stable)
    node: 'apex-build-master'

    disabled: false

    concurrent: true

    parameters:
      - '{project}-defaults'
      - project-parameter:
          project: '{project}'
          branch: '{branch}'
      - apex-parameter:
          gs-pathname: '{gs-pathname}'

    scm:
      - git-scm-gerrit

    wrappers:
      - timeout:
          timeout: 150
          fail: true

    properties:
      - logrotate-default
      - throttle:
          max-per-node: '{concurrent-builds}'
          max-total: 10
          option: 'project'
      - build-blocker:
          use-build-blocker: true
          block-level: 'NODE'
          blocking-jobs:
            - 'apex-verify-iso-{stream}'

    builders:
      - 'apex-build'
      - inject:
          properties-content: ARTIFACT_TYPE=rpm
      - 'apex-upload-artifact'

# ISO verify job
- job-template:
    name: 'apex-verify-iso-{stream}'

    # Job template for builds
    #
    # Required Variables:
    #     stream:    branch with - in place of / (eg. stable)
    #     branch:    branch (eg. stable)
    node: 'apex-virtual-master'

    disabled: false

    concurrent: true

    parameters:
      - project-parameter:
          project: '{project}'
          branch: '{branch}'
      - apex-parameter:
          gs-pathname: '{gs-pathname}'
      - string:
          name: GIT_BASE
          default: https://gerrit.opnfv.org/gerrit/$PROJECT
          description: "Used for overriding the GIT URL coming from parameters macro."

    scm:
      - git-scm

    properties:
      - logrotate-default
      - throttle:
          max-per-node: 1
          max-total: 10
          option: 'project'

    builders:
      - 'apex-iso-verify'
      - inject:
          properties-content: ARTIFACT_TYPE=iso
      - 'apex-upload-artifact'

########################
# builder macros
########################
- builder:
    name: 'apex-build'
    builders:
      - shell:
          !include-raw: ./apex-build.sh

- builder:
    name: 'apex-iso-verify'
    builders:
      - shell:
          !include-raw: ./apex-iso-verify.sh