Add jenkins jobs for policy CSIT in Kubernetes
[ci-management.git] / jjb / integration / integration-macros.yaml
1 ---
2 - parameter:
3     name: integration-test-plan
4     parameters:
5       - string:
6           name: TESTPLAN
7           default: '{test-plan}'
8           description: 'General test plan we will run unless stream-specific one is found'
9
10 - parameter:
11     name: integration-test-options
12     parameters:
13       - string:
14           name: TESTOPTIONS
15           default: '{test-options}'
16           description: 'Robot command options'
17
18 - parameter:
19     name: html-publisher-dir
20     parameters:
21       - string:
22           name: HTMLDIR
23           default: '{html-dir}'
24           description: 'Directory location to be used by HTML publisher plugin'
25
26 - parameter:
27     name: html-publisher-files
28     parameters:
29       - string:
30           name: HTMLFILES
31           default: '{html-files}'
32           description: 'File name to be used by HTML publisher plugin to produce the report'
33
34 - builder:
35     name: integration-install-robotframework
36     builders:
37       - shell:
38           !include-raw:
39           - include-raw-integration-install-robotframework.sh
40
41 - builder:
42     name: integration-install-robotframework-py3
43     builders:
44       - shell:
45           !include-raw:
46           - include-raw-integration-install-robotframework-py3.sh
47
48 - builder:
49     name: integration-run-test
50     builders:
51       - shell: "${WORKSPACE}/run-csit.sh ${TESTPLAN} ${TESTOPTIONS}"
52
53 - builder:
54     name: integration-run-project-test
55     builders:
56       - shell: "${WORKSPACE}/csit/run-project-csit.sh ${TESTOPTIONS}"
57
58
59 - builder:
60       name: integration-run-project-k8s-test
61       builders:
62           - shell: "${WORKSPACE}/csit/run-k8s-csit.sh install ${TESTOPTIONS}"
63
64 - builder:
65     name: integration-autorelease-fix-relativepaths
66     builders:
67       - shell: "${WORKSPACE}/autorelease/scripts/fix-relativepaths.sh"
68
69 - builder:
70     name: integration-autorelease-set-version
71     builders:
72       - shell: "${WORKSPACE}/autorelease/scripts/set-version.sh"
73
74 - builder:
75     name: integration-install-vagrant
76     builders:
77       - shell: |
78           #!/bin/bash
79           set -ex # Fail build if any setup step fails
80           sudo add-apt-repository --yes ppa:tiagohillebrandt/vagrant
81           sudo apt update
82           sudo apt --yes install libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev vagrant
83           vagrant plugin install vagrant-libvirt
84           vagrant plugin install vagrant-disksize
85           vagrant plugin install vagrant-sshfs
86           vagrant plugin install vagrant-reload
87           mkdir -p ~/.ssh
88
89 - builder:
90     name: integration-docker-compose-logs
91     builders:
92       - shell: !include-raw: shell/docker-compose-logs.sh
93
94 - publisher:
95     name: integration-robot
96     publishers:
97       - robot:
98           output-path: 'archives'
99           output-xml: '**/output.xml'
100           report-html: '**/report.html'
101           log-html: '**/log.html'
102           other-files: ''
103           unstable-threshold: '{unstable-if}'
104           pass-threshold: '{pass-if}'
105           only-critical: false
106
107 - publisher:
108     name: integration-project-robot
109     publishers:
110       - robot:
111           output-path: 'csit/archives'
112           output-xml: '**/output.xml'
113           report-html: '**/report.html'
114           log-html: '**/log.html'
115           other-files: ''
116           unstable-threshold: '{unstable-if}'
117           pass-threshold: '{pass-if}'
118           only-critical: false
119
120 - publisher:
121     name: integration-docker-compose-logs
122     publishers:
123       - postbuildscript:
124           builders:
125             - role: BOTH
126               build-on:
127                 - FAILURE
128                 - SUCCESS
129                 - UNSTABLE
130               build-steps:
131                 - integration-docker-compose-logs