Merge "Add unified merge PoC job templates"
[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 - parameter:
43     name: integration-terragrunt-version
44     parameters:
45       - string:
46           name: TERRAGRUNT_VERSION
47           default: '{terragrunt-version}'
48           description: 'Terragrunt version to install on minion'
49
50 - parameter:
51     name: integration-unique-docker-tag
52     parameters:
53      - string:
54           name: UNIQUE_DOCKER_TAG
55           default: '{unique-docker-tag}'
56           description: 'Unique docker tag to identify specific version'
57
58 - builder:
59     name: integration-install-robotframework
60     builders:
61       - shell:
62           !include-raw:
63           - include-raw-integration-install-robotframework.sh
64
65 - builder:
66     name: integration-run-test
67     builders:
68       - shell: "${WORKSPACE}/run-csit.sh ${TESTPLAN} ${TESTOPTIONS}"
69
70 - builder:
71     name: integration-run-project-test
72     builders:
73       - shell: "${WORKSPACE}/csit/run-project-csit.sh ${TESTOPTIONS}"
74
75 - builder:
76     name: integration-autorelease-fix-relativepaths
77     builders:
78       - shell: "${WORKSPACE}/autorelease/scripts/fix-relativepaths.sh"
79
80 - builder:
81     name: integration-autorelease-set-version
82     builders:
83       - shell: "${WORKSPACE}/autorelease/scripts/set-version.sh"
84
85 - builder:
86     name: integration-install-vagrant
87     builders:
88       - shell: |
89           #!/bin/bash
90           set -ex # Fail build if any setup step fails
91           sudo add-apt-repository --yes ppa:tiagohillebrandt/vagrant
92           sudo apt update
93           sudo apt --yes install libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev vagrant
94           vagrant plugin install vagrant-libvirt
95           vagrant plugin install vagrant-disksize
96           vagrant plugin install vagrant-sshfs
97           vagrant plugin install vagrant-reload
98           mkdir -p ~/.ssh
99
100 - builder:
101    name: integration-install-terraform
102    builders:
103      - shell: |
104          #!/bin/bash
105          set -ex
106          cd /tmp
107          wget -q https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip
108          unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip
109          sudo mv terraform /usr/local/bin/
110          terraform version
111
112 - builder:
113    name: integration-install-terragrunt
114    builders:
115      - shell: |
116          #!/bin/bash
117          set -ex
118          cd /tmp
119          wget -q https://github.com/gruntwork-io/terragrunt/releases/download/v${TERRAGRUNT_VERSION}/terragrunt_linux_amd64
120          sudo mv terragrunt_linux_amd64 /usr/local/bin/terragrunt
121          sudo chmod +x /usr/local/bin/terragrunt
122          terragrunt --version
123
124 - builder:
125     name: integration-docker-compose-logs
126     builders:
127       - shell: !include-raw: shell/docker-compose-logs.sh
128
129 - publisher:
130     name: integration-robot
131     publishers:
132       - robot:
133           output-path: 'archives'
134           output-xml: '**/output.xml'
135           report-html: '**/report.html'
136           log-html: '**/log.html'
137           other-files: ''
138           unstable-threshold: '{unstable-if}'
139           pass-threshold: '{pass-if}'
140           only-critical: false
141
142 - publisher:
143     name: integration-project-robot
144     publishers:
145       - robot:
146           output-path: 'csit/archives'
147           output-xml: '**/output.xml'
148           report-html: '**/report.html'
149           log-html: '**/log.html'
150           other-files: ''
151           unstable-threshold: '{unstable-if}'
152           pass-threshold: '{pass-if}'
153           only-critical: false
154
155 - publisher:
156     name: integration-docker-compose-logs
157     publishers:
158       - postbuildscript:
159           builders:
160             - role: BOTH
161               build-on:
162                 - FAILURE
163                 - SUCCESS
164                 - UNSTABLE
165               build-steps:
166                 - integration-docker-compose-logs