Setup JJB template for terraform modules validation
Change-Id: Ia7125a6cfd73a587d0e387134f326870d3306ccf
Issue-ID: INT-1713
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
diff --git a/jjb/integration/integration-macros.yaml b/jjb/integration/integration-macros.yaml
index 10b0437..89e83c2 100644
--- a/jjb/integration/integration-macros.yaml
+++ b/jjb/integration/integration-macros.yaml
@@ -31,6 +31,14 @@
default: '{html-files}'
description: 'File name to be used by HTML publisher plugin to produce the report'
+- parameter:
+ name: integration-terraform-version
+ parameters:
+ - string:
+ name: TERRAFORM_VERSION
+ default: '{terraform-version}'
+ description: 'Terraform version to install on minion'
+
- builder:
name: integration-install-robotframework
builders:
@@ -69,6 +77,18 @@
mkdir -p ~/.ssh
- builder:
+ name: integration-install-terraform
+ builders:
+ - shell: |
+ #!/bin/bash
+ set -ex
+ cd /tmp
+ wget -q https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip
+ unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip
+ sudo mv terraform /usr/local/bin/
+ terraform version
+
+- builder:
name: integration-docker-compose-logs
builders:
- shell: !include-raw: shell/docker-compose-logs.sh
diff --git a/jjb/integration/integration-templates.yaml b/jjb/integration/integration-templates.yaml
index 622d523..42c0697 100644
--- a/jjb/integration/integration-templates.yaml
+++ b/jjb/integration/integration-templates.yaml
@@ -104,3 +104,29 @@
name: '{project-name}-{stream}-{subproject}-tox-verify'
id: integration-tox-verify
description: 'Job intended for running tox'
+
+- job-template:
+ <<: *tox_verify_boilerplate
+ name: '{project-name}-{stream}-{subproject}-terraform-verify'
+ terraform-version: 0.13.2
+ python-version: python3
+ id: integration-terraform-verify
+ description: 'Job intended for validating terraform modules'
+
+ parameters:
+ - lf-infra-parameters:
+ project: '{project}'
+ stream: '{stream}'
+ branch: '{branch}'
+ - lf-infra-tox-parameters:
+ tox-dir: '{tox-dir}'
+ tox-envs: '{tox-envs}'
+ - integration-terraform-version:
+ terraform-version: '{terraform-version}'
+
+ builders:
+ - integration-install-terraform
+ - lf-infra-tox-install:
+ python-version: '{python-version}'
+ - lf-infra-tox-run:
+ parallel: 'false'