Add octocatalog-diff job
[mirror/dsa-puppet.git] / spec / octocatalog / run-octocatalog
diff --git a/spec/octocatalog/run-octocatalog b/spec/octocatalog/run-octocatalog
new file mode 100755 (executable)
index 0000000..2d08704
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+set -euE
+
+ENV_BASE=$1
+ENV_TEST=$2
+
+for fact in spec/octocatalog/facts/*; do
+  hostname=$(basename $fact .json)
+  bundle exec octocatalog-diff \
+    --no-parallel \
+    --bootstrapped-from-dir environments/$ENV_BASE/ \
+    --bootstrapped-to-dir environments/$ENV_TEST/ \
+    --hostname $hostname \
+    --fact-file $fact \
+    --puppet-binary $CI_PROJECT_DIR/bin/puppet \
+    --display-source || [ $? == 2 ]
+done