summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc A. Paradise <marc.paradise@gmail.com>2022-09-22 17:30:57 -0400
committerMarc A. Paradise <marc.paradise@gmail.com>2022-09-28 11:21:29 -0400
commit223f0a5ce02b0add67afd44cbc8356b9ca49925d (patch)
tree98fce365f0955b78a4d651820188ebb7fc291532
parentf0b21e1a7b96a9b4600a65c6a7d44ad90f04f824 (diff)
downloadchef-mp/platform-verification-output.tar.gz
Add OS version/name output to omnibus-pipelinemp/platform-verification-output
This allows us to verify that we are running the OS/version we think we are in our omnibus build and test pipelines - as we have found that every once in a while, these things do not match. Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
-rw-r--r--cspell.json1
-rw-r--r--omnibus/omnibus-test.ps16
-rw-r--r--omnibus/omnibus-test.sh6
-rw-r--r--omnibus/omnibus.rb3
4 files changed, 16 insertions, 0 deletions
diff --git a/cspell.json b/cspell.json
index 3bbdfbc5e1..faeddaec5d 100644
--- a/cspell.json
+++ b/cspell.json
@@ -883,6 +883,7 @@
"oneshot",
"onidle",
"onlogon",
+ "operatingsystem",
"ONPARENT",
"onparent",
"onstart",
diff --git a/omnibus/omnibus-test.ps1 b/omnibus/omnibus-test.ps1
index 2c4331ff2f..e925976995 100644
--- a/omnibus/omnibus-test.ps1
+++ b/omnibus/omnibus-test.ps1
@@ -1,6 +1,12 @@
# Stop script execution when a non-terminating error occurs
$ErrorActionPreference = "Stop"
+# We have seen rare cases where the platform we think we are testing on is not the
+# platform we are really testing on. We're outputting the complete OS name here
+# so that we can confirm the name in the build log when necessary.
+Write-Output "Verifying the Windows version we're running on"
+Write-Output (Get-WMIObject win32_operatingsystem).name
+
# install chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
diff --git a/omnibus/omnibus-test.sh b/omnibus/omnibus-test.sh
index 47b21ae431..1446d0b353 100644
--- a/omnibus/omnibus-test.sh
+++ b/omnibus/omnibus-test.sh
@@ -15,6 +15,12 @@ if [[ -f /etc/redhat-release ]]; then
fi
fi
+# We have seen rare cases where the platform we think we are testing on
+# is not the platform we are really testing on. We're outputting the complete
+# uname string so that we can confirm platform and version in the build log when necessary
+echo "--- Verifying OS"
+uname -a
+
# Set up a custom tmpdir, and clean it up before and after the tests
export TMPDIR="${TMPDIR:-/tmp}/cheftest"
sudo rm -rf "$TMPDIR"
diff --git a/omnibus/omnibus.rb b/omnibus/omnibus.rb
index 99817f7caf..f28f9c9593 100644
--- a/omnibus/omnibus.rb
+++ b/omnibus/omnibus.rb
@@ -31,6 +31,9 @@ env_omnibus_windows_arch = :x86 unless %w{x86 x64}.include?(env_omnibus_windows_
windows_arch env_omnibus_windows_arch
+# Allows us to verify that we're building on the platform we think we are.
+puts "RUBY PLATFORM @ omnibus-load time: #{RUBY_PLATFORM}"
+
use_git_caching true
# Enable S3 asset caching