aboutsummaryrefslogtreecommitdiffstats
path: root/openlab
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-09-07 16:42:04 +0200
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-09-10 06:39:36 +0000
commit58e7339a10e4f69792d30ddfc69624fe66a9fa09 (patch)
tree7b471af4333a58785bcd775a04d8c3f72f5e2f18 /openlab
parentbc47c630d9fdc0e0e75b64a0c3d2311df28cfeaa (diff)
Setup tox runner for terraform modules validation
Change-Id: Idec1f69dfc952de6b1b1dfc79d7363a39f40d04f Issue-ID: INT-1713 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'openlab')
-rw-r--r--openlab/tox.ini16
1 files changed, 16 insertions, 0 deletions
diff --git a/openlab/tox.ini b/openlab/tox.ini
new file mode 100644
index 0000000..e9bf1ed
--- /dev/null
+++ b/openlab/tox.ini
@@ -0,0 +1,16 @@
+[tox]
+minversion = 3.2.0
+envlist = terraform
+skipsdist = true
+requires = pip >= 8
+
+[testenv]
+basepython = python3
+whitelist_externals = bash
+
+[testenv:terraform]
+commands = /bin/bash -e -c "for module in $(find -type f -name main.tf | sed s/main.tf//g | sed 's/\.\///g'); \
+ do \
+ terraform init -no-color $\{module\}; \
+ terraform validate -no-color $\{module\}; \
+ done"