89e83c26864c03a176f0cd3ae3f0ff64524435d9
[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 - parameter:
35     name: integration-terraform-version
36     parameters:
37       - string:
38           name: TERRAFORM_VERSION
39           default: '{terraform-version}'
40           description: 'Terraform version to install on minion'
41
42 - builder:
43     name: integration-install-robotframework
44     builders:
45       - shell:
46           !include-raw:
47           - include-raw-integration-install-robotframework.sh
48
49 - builder:
50     name: integration-run-test
51     builders:
52       - shell: "${WORKSPACE}/run-csit.sh ${TESTPLAN} ${TESTOPTIONS}"
53
54 - builder:
55     name: integration-autorelease-fix-relativepaths
56     builders:
57       - shell: "${WORKSPACE}/autorelease/scripts/fix-relativepaths.sh"
58
59 - builder:
60     name: integration-autorelease-set-version
61     builders:
62       - shell: "${WORKSPACE}/autorelease/scripts/set-version.sh"
63
64 - builder:
65     name: integration-install-vagrant
66     builders:
67       - shell: |
68           #!/bin/bash
69           set -ex # Fail build if any setup step fails
70           sudo add-apt-repository --yes ppa:tiagohillebrandt/vagrant
71           sudo apt update
72           sudo apt --yes install libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev vagrant
73           vagrant plugin install vagrant-libvirt
74           vagrant plugin install vagrant-disksize
75           vagrant plugin install vagrant-sshfs
76           vagrant plugin install vagrant-reload
77           mkdir -p ~/.ssh
78
79 - builder:
80    name: integration-install-terraform
81    builders:
82      - shell: |
83          #!/bin/bash
84          set -ex
85          cd /tmp
86          wget -q https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip
87          unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip
88          sudo mv terraform /usr/local/bin/
89          terraform version
90
91 - builder:
92     name: integration-docker-compose-logs
93     builders:
94       - shell: !include-raw: shell/docker-compose-logs.sh
95
96 - publisher:
97     name: integration-robot
98     publishers:
99       - robot:
100           output-path: 'archives'
101           other-files: ''
102           unstable-threshold: '{unstable-if}'
103           pass-threshold: '{pass-if}'
104           only-critical: false
105
106 - publisher:
107     name: integration-docker-compose-logs
108     publishers:
109       - postbuildscript:
110           builders:
111             - role: BOTH
112               build-on:
113                 - FAILURE
114                 - SUCCESS
115                 - UNSTABLE
116               build-steps:
117                 - integration-docker-compose-logs