Deploy terragrunt in integration/terraform project template
[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 - builder:
51     name: integration-install-robotframework
52     builders:
53       - shell:
54           !include-raw:
55           - include-raw-integration-install-robotframework.sh
56
57 - builder:
58     name: integration-run-test
59     builders:
60       - shell: "${WORKSPACE}/run-csit.sh ${TESTPLAN} ${TESTOPTIONS}"
61
62 - builder:
63     name: integration-autorelease-fix-relativepaths
64     builders:
65       - shell: "${WORKSPACE}/autorelease/scripts/fix-relativepaths.sh"
66
67 - builder:
68     name: integration-autorelease-set-version
69     builders:
70       - shell: "${WORKSPACE}/autorelease/scripts/set-version.sh"
71
72 - builder:
73     name: integration-install-vagrant
74     builders:
75       - shell: |
76           #!/bin/bash
77           set -ex # Fail build if any setup step fails
78           sudo add-apt-repository --yes ppa:tiagohillebrandt/vagrant
79           sudo apt update
80           sudo apt --yes install libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev vagrant
81           vagrant plugin install vagrant-libvirt
82           vagrant plugin install vagrant-disksize
83           vagrant plugin install vagrant-sshfs
84           vagrant plugin install vagrant-reload
85           mkdir -p ~/.ssh
86
87 - builder:
88    name: integration-install-terraform
89    builders:
90      - shell: |
91          #!/bin/bash
92          set -ex
93          cd /tmp
94          wget -q https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip
95          unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip
96          sudo mv terraform /usr/local/bin/
97          terraform version
98
99 - builder:
100    name: integration-install-terragrunt
101    builders:
102      - shell: |
103          #!/bin/bash
104          set -ex
105          cd /tmp
106          wget -q https://github.com/gruntwork-io/terragrunt/releases/download/v${TERRAGRUNT_VERSION}/terragrunt_linux_amd64
107          sudo mv terragrunt_linux_amd64 /usr/local/bin/terragrunt
108          sudo chmod +x /usr/local/bin/terragrunt
109          terragrunt --version
110
111 - builder:
112     name: integration-docker-compose-logs
113     builders:
114       - shell: !include-raw: shell/docker-compose-logs.sh
115
116 - publisher:
117     name: integration-robot
118     publishers:
119       - robot:
120           output-path: 'archives'
121           other-files: ''
122           unstable-threshold: '{unstable-if}'
123           pass-threshold: '{pass-if}'
124           only-critical: false
125
126 - publisher:
127     name: integration-docker-compose-logs
128     publishers:
129       - postbuildscript:
130           builders:
131             - role: BOTH
132               build-on:
133                 - FAILURE
134                 - SUCCESS
135                 - UNSTABLE
136               build-steps:
137                 - integration-docker-compose-logs