c84e4c400407b507dce69fb98a5e7e8804a834b6
[ci-management.git] / akraino-validation-templates.yaml
1 ---
2 - job-template:
3     id: akraino-validation-docker-multiarch
4     name: 'validation-{stream}-docker'
5     project-type: multijob
6     disabled: '{obj:disabled}'
7     node: 'centos7-builder-2c-1g'
8     build-timeout: 90
9
10     parameters:
11       - lf-infra-parameters: &validation_lf_infra_parameters
12           project: '{project}'
13           branch: '{branch}'
14           stream: '{stream}'
15
16     properties:
17       - throttle:
18           max-per-node: 1
19           option: 'project'
20       - build-blocker:
21           use-build-blocker: true
22           blocking-jobs:
23             - 'validation-docker-.*'
24           block-level: 'NODE'
25
26     triggers: '{obj:triggers}'
27
28     builders:
29       - multijob:
30           name: 'build validation images'
31           execution-type: PARALLEL
32           projects:
33             - name: 'validation-docker-build-amd64-{stream}'
34               <<: *docker-build-job-settings
35             - name: 'validation-docker-build-arm64-{stream}'
36               <<: *docker-build-job-settings
37       - multijob:
38           name: 'publish validation manifests'
39           condition: SUCCESSFUL
40           execution-type: PARALLEL
41           projects:
42             - name: 'validation-docker-manifest-{stream}'
43               <<: *docker-build-job-settings
44
45     publishers:
46       - email:
47           recipients: >
48             cristina.pauna@enea.com
49             juha.kosonen@nokia.com
50
51
52 - job-template:
53     id: akraino-validation-docker-specific-arch
54     name: 'validation-docker-build-{arch_tag}-{stream}'
55     disabled: '{obj:disabled}'
56     node: '{slave_label}'
57     build-timeout: 75
58
59     parameters:
60       - lf-infra-parameters: *validation_lf_infra_parameters
61
62     properties:
63       - build-blocker:
64           use-build-blocker: true
65           blocking-jobs:
66             - 'validation-docker-build-.*'
67           block-level: 'NODE'
68     scm: &validation_scm
69       # lf-infra-gerrit-scm hardcodes branch specifier to refs/heads; while
70       # lf-infra-github-scm does not, allowing us to pass a fully custom '{branch}'
71       - lf-infra-github-scm:
72           jenkins-ssh-credential: '{jenkins-ssh-credential}'
73           url: '{git-url}/{project}.git'
74           refspec: '$GERRIT_REFSPEC'
75           branch: '$STREAM'
76           submodule-recursive: false
77           submodule-timeout: '{submodule-timeout}'
78           submodule-disable: false
79           choosing-strategy: default
80
81     builders:
82       - lf-infra-docker-login:
83           global-settings-file: global-settings
84           settings-file: '{mvn-settings}'
85       - shell: |
86           #!/bin/bash -ex
87           if [ "{branch}" != "{stream}" ]; then export TAG_VER=$STREAM; fi
88           make -k -C docker push-all
89           docker system prune -af
90
91 - job-template:
92     id: akraino-validation-docker-manifest
93     name: 'validation-docker-manifest-{stream}'
94     node: 'ubuntu1604-docker-8c-8g'
95     build-timeout: 15
96
97     parameters:
98       - lf-infra-parameters: *validation_lf_infra_parameters
99
100     disabled: '{obj:disabled}'
101
102     scm: *validation_scm
103
104     builders:
105       - lf-infra-docker-login:
106           global-settings-file: global-settings
107           settings-file: '{mvn-settings}'
108       - shell: |
109           #!/bin/bash -ex
110           if [ "{branch}" != "{stream}" ]; then export TAG_VER=$STREAM; fi
111           for sd in docker/*/.; do make -k -C $sd .push_manifest; done
112
113 - job-template:
114     id: akraino-validation-lab-daily
115     name: 'validation-{validation_lab}-daily-{stream}'
116     concurrent: true
117     node: '{build-node}'
118     parameters:
119       - {'lab_params'}
120     builders:
121       - trigger-builds:
122           - project: 'bluval-daily-{stream}'
123             predefined-parameters:
124               LAB_SILO={validation_lab}
125             same-node: true
126             current-parameters: true
127             block: true
128
129 - job-template:
130     id: bluval-run-daily-tests
131     name: 'bluval-daily-{stream}'
132     concurrent: true
133     node: '{build-node}'
134     parameters:
135       - lf-infra-parameters: *validation_lf_infra_parameters
136       - string:
137           name: DEPLOY_SCENARIO
138           default: ''
139       - {'bluval-defaults'}
140
141     scm:
142       - lf-infra-github-scm:
143           jenkins-ssh-credential: '{jenkins-ssh-credential}'
144           url: '{git-url}/{project}.git'
145           refspec: '$GERRIT_REFSPEC'
146           branch: '$GERRIT_BRANCH'
147           submodule-recursive: false
148           submodule-timeout: '{submodule-timeout}'
149           submodule-disable: true
150           choosing-strategy: default
151
152     builders:
153       - description-setter:
154           description: "POD: $NODE_NAME<br/>BLUEPRINT: $BLUEPRINT<br/>LAB: $LAB_SILO<br/>LAYER: $LAYER"
155       - lf-infra-create-netrc:
156           server-id: logs
157       - shell: !include-raw-escape:
158         - ../shell/run_bluval.sh
159
160     publishers:
161       - robot:
162           output-path: 'results'
163           report-html: '**/report.html'
164           log-html: '**/log.html'
165           output-xml: '**/output.xml'
166       - logparser:
167           use-project-rules: true
168           parse-rules: "./bluval/rules.txt"
169           unstable-on-warning: false
170           fail-on-error: true
171           show-graphs: true