summaryrefslogtreecommitdiff
path: root/omnibus/jenkins/verify-chefdk.sh
diff options
context:
space:
mode:
Diffstat (limited to 'omnibus/jenkins/verify-chefdk.sh')
-rwxr-xr-xomnibus/jenkins/verify-chefdk.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/omnibus/jenkins/verify-chefdk.sh b/omnibus/jenkins/verify-chefdk.sh
new file mode 100755
index 0000000000..1860f554cc
--- /dev/null
+++ b/omnibus/jenkins/verify-chefdk.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+
+export PATH=/opt/chefdk/bin:$PATH
+
+# Ensure the calling environment (disapproval look Bundler) does not
+# infect our Ruby environment created by the `chef` cli.
+for ruby_env_var in _ORIGINAL_GEM_PATH \
+ BUNDLE_BIN_PATH \
+ BUNDLE_GEMFILE \
+ GEM_HOME \
+ GEM_PATH \
+ GEM_ROOT \
+ RUBYLIB \
+ RUBYOPT \
+ RUBY_ENGINE \
+ RUBY_ROOT \
+ RUBY_VERSION
+do
+ unset $ruby_env_var
+done
+
+sudo chef verify --unit