From 223f0a5ce02b0add67afd44cbc8356b9ca49925d Mon Sep 17 00:00:00 2001 From: "Marc A. Paradise" Date: Thu, 22 Sep 2022 17:30:57 -0400 Subject: Add OS version/name output to omnibus-pipeline 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 --- cspell.json | 1 + omnibus/omnibus-test.ps1 | 6 ++++++ omnibus/omnibus-test.sh | 6 ++++++ omnibus/omnibus.rb | 3 +++ 4 files changed, 16 insertions(+) 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 -- cgit v1.2.1