Skip to content

Commit

Permalink
CHEF-11226: Upgrade Ruby and Ruby Dev Kit to 3.1.6 due to outdated em…
Browse files Browse the repository at this point in the history
…bedded Perl version in 3.1.2 (inspec#7174)

* chore: Update Ruby and Ruby Dev Kit to 3.1.6 to address outdated Perl version

Signed-off-by: Sonu Saha <[email protected]>

* chore: update omnibus-software to fetch from latest main

Signed-off-by: Sonu Saha <[email protected]>

* check if openssl is installed

Signed-off-by: Sonu Saha <[email protected]>

* Revert "check if openssl is installed"

This reverts commit f6460a3.

* chore: use 3.1.4 ruby-msys2-devkit for testing

Signed-off-by: Sonu Saha <[email protected]>

* test: attempt to build inspec without ruby msys2 devkit

Signed-off-by: Sonu Saha <[email protected]>

* Revert "test: attempt to build inspec without ruby msys2 devkit"

This reverts commit 697a7af.

* Revert "chore: use 3.1.4 ruby-msys2-devkit for testing"

This reverts commit 1221038.

* test: add openssl in gemfile

Signed-off-by: Sonu Saha <[email protected]>

* test: use different version of openssl for windows

Signed-off-by: Sonu Saha <[email protected]>

* test with openssl_gem

Signed-off-by: Sonu Saha <[email protected]>

* chore: remove with_openssl; it didnt help

Signed-off-by: Sonu Saha <[email protected]>

* test: use 1.1.1w openssl for windows

Signed-off-by: Sonu Saha <[email protected]>

* undo changes to openssl version

Signed-off-by: Sonu Saha <[email protected]>

* install openssl 3.x for windows systems

Signed-off-by: Sonu Saha <[email protected]>

* skip certification check:

Signed-off-by: Sonu Saha <[email protected]>

* allow insecure SSL connections

Signed-off-by: Sonu Saha <[email protected]>

* undo changes to omnibus test script

Signed-off-by: Sonu Saha <[email protected]>

* Add debugging statement

Signed-off-by: poorndm <[email protected]>

* syntax correction

Signed-off-by: poorndm <[email protected]>

* correction...

Signed-off-by: poorndm <[email protected]>

* add winwods-2019 as builder

Signed-off-by: poorndm <[email protected]>

* update openssl

Signed-off-by: poorndm <[email protected]>

* with openssl-3.0.9

Signed-off-by: poorndm <[email protected]>

* Enable FIPS builds for windows

Signed-off-by: poorndm <[email protected]>

* chore: bundle update --source omnibus-software --conservative

Signed-off-by: Sonu Saha <[email protected]>

* chore: update comment for tools verification

Signed-off-by: Sonu Saha <[email protected]>

---------

Signed-off-by: Sonu Saha <[email protected]>
Signed-off-by: Sonu Saha <[email protected]>
Signed-off-by: Sonu Saha <[email protected]>
Signed-off-by: poorndm <[email protected]>
Co-authored-by: poorndm <[email protected]>
  • Loading branch information
ahasunos and poorndm authored Nov 22, 2024
1 parent e52ecca commit 72e7441
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .expeditor/release.omnibus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ builder-to-testers-map:
- ubuntu-16.04-x86_64
- ubuntu-18.04-x86_64
- ubuntu-20.04-x86_64
windows-2019-x86_64:
- windows-2019-x86_64
windows-2012r2-x86_64:
- windows-2012-x86_64
- windows-2012r2-x86_64
- windows-2016-x86_64
- windows-2019-x86_64
- windows-2022-x86_64
- windows-8-x86_64
- windows-10-x86_64
Expand Down
2 changes: 1 addition & 1 deletion omnibus/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/chef/omnibus-software.git
revision: b73b772fe13500f546cc992a963aeba71d68991a
revision: b97bb4e3e1319ca1c06b1a06f1f6354d3514ff51
branch: main
specs:
omnibus-software (24.6.323)
Expand Down
29 changes: 25 additions & 4 deletions omnibus/omnibus-test.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
# Stop script execution when a non-terminating error occurs
$ErrorActionPreference = "Stop"

# reload Env:PATH to ensure it gets any changes that the install made (e.g. C:\opscode\inspec\bin\ )
# Reload Env:PATH to ensure it gets any changes that the install made (e.g. C:\opscode\inspec\bin\ )
$Env:PATH = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")

$Env:Path = "C:\opscode\inspec\bin;C:\opscode\inspec\embedded\bin;$Env:PATH"
Write-Host "+++ Testing $Plan"

Set-Location test/artifact
rake
If ($lastexitcode -ne 0) { Throw $lastexitcode }
# ********* Verifying Tools/Applications ***************
$embedded_bin_dir = "C:\opscode\inspec\embedded\bin"
Write-Host "The value of embedded_bin_dir is: $embedded_bin_dir"

Write-Host ":ruby: Validating Ruby can run"
& "$embedded_bin_dir\ruby.exe" --version
if ($LASTEXITCODE -ne 0) { Throw "Ruby validation failed with exit code $LASTEXITCODE" }

Write-Host ":bundler: Validating Bundler can run"
& "$embedded_bin_dir\bundle.bat" --version
if ($LASTEXITCODE -ne 0) { Throw "Bundler validation failed with exit code $LASTEXITCODE" }

Write-Host ":lock: Validating OpenSSL can run"
& "$embedded_bin_dir\openssl.exe" version
if ($LASTEXITCODE -ne 0) { Throw "OpenSSL validation failed with exit code $LASTEXITCODE" }

# Check if directory exists before changing location
if (Test-Path test/artifact) {
Set-Location test/artifact
rake
if ($LASTEXITCODE -ne 0) { Throw "Rake command failed with exit code $LASTEXITCODE" }
} else {
Write-Host "Directory test/artifact does not exist."
}
4 changes: 4 additions & 0 deletions omnibus/omnibus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@
:x86
end
windows_arch arch

# Build in FIPS compatability mode
# ------------------------------
fips_mode (ENV["OMNIBUS_FIPS_MODE"] || "").casecmp("true") >= 0
6 changes: 3 additions & 3 deletions omnibus_overrides.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# grab the current train release from rubygems.org
train_stable = /^train \((.*)\)/.match(`gem list ^train$ --remote`)[1]
override "train", version: "v#{train_stable}"
override "ruby", version: "3.1.2"
override "ruby", version: "3.1.6"

override :openssl, version: "3.0.11"
override :openssl, version: "3.0.9"

override "ruby-msys2-devkit", version: "3.1.2-1"
override "ruby-msys2-devkit", version: "3.1.6-1"

0 comments on commit 72e7441

Please sign in to comment.