summaryrefslogtreecommitdiff
path: root/omnibus/jenkins/verify-chef-container.sh
diff options
context:
space:
mode:
Diffstat (limited to 'omnibus/jenkins/verify-chef-container.sh')
-rwxr-xr-xomnibus/jenkins/verify-chef-container.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/omnibus/jenkins/verify-chef-container.sh b/omnibus/jenkins/verify-chef-container.sh
new file mode 100755
index 0000000000..d2eb54fe24
--- /dev/null
+++ b/omnibus/jenkins/verify-chef-container.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+
+export PATH=/opt/chef/bin:$PATH
+
+# Ensure the calling environment (disapproval look Bundler) does not
+# infect our Ruby environment created by the `chef-int` 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-init --verify