summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn <john.mccrae@progress.com>2023-03-01 07:54:17 -0800
committerJohn <john.mccrae@progress.com>2023-03-01 07:54:17 -0800
commitf4c5ad250fb4b862e9e998f1448e3908ecbab1a5 (patch)
tree1bf0335be9a93d69da268b1d1ed4b78537d5b5fa
parent6662de96def0d1a131d3d0caced6a87e247389fa (diff)
downloadchef-f4c5ad250fb4b862e9e998f1448e3908ecbab1a5.tar.gz
Updating Ruby 3.0 support for Chef-Utils, bk_win_functional.ps1
Signed-off-by: John <john.mccrae@progress.com>
-rw-r--r--.expeditor/scripts/bk_win_functional.ps131
-rw-r--r--.expeditor/verify.pipeline.yml9
2 files changed, 30 insertions, 10 deletions
diff --git a/.expeditor/scripts/bk_win_functional.ps1 b/.expeditor/scripts/bk_win_functional.ps1
index a2f93378dd..0c7ce996d2 100644
--- a/.expeditor/scripts/bk_win_functional.ps1
+++ b/.expeditor/scripts/bk_win_functional.ps1
@@ -7,14 +7,33 @@ Remove-Item -Path C:\ProgramData\chocolatey\bin\choco.exe -ErrorAction SilentlyC
$ErrorActionPreference = 'Stop'
-Write-Output "--- Enable Ruby 2.7"
+Write-Output "--- Enable Ruby 3.0`r"
-Write-Output "Register Installed Ruby Version 2.7 With Uru"
-Start-Process "uru_rt.exe" -ArgumentList 'admin add C:\ruby27\bin' -Wait
-uru 27
-if (-not $?) { throw "Can't Activate Ruby. Did Uru Registration Succeed?" }
+Write-Output "Installing Ruby 3.0 and refreshing the path"
+
+if (-not(Test-Path -Path "C:\ProgramData\chocolatey\bin\choco.exe")){
+ Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
+}
+
+Write-Output "Is fucking Choco installed or Not?"
+Get-Command -Name choco
+Write-Output "`r`n"
+
+Write-Output "here's my path :`r`n"
+Write-Output $env:path
+Write-Output "`r`n"
+
+choco install ruby --version=3.0.5.1 --package-parameters="'/InstallDir:C:\ruby30'" -y
+refreshenv
+$env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User") + ";C:\Ruby30\bin"
ruby -v
-if (-not $?) { throw "Can't run Ruby. Is it installed?" }
+
+# Write-Output "Register Installed Ruby Version 3.0 With Uru"
+# Start-Process "uru_rt.exe" -ArgumentList 'admin add C:\ruby27\bin' -Wait
+# uru 30
+# if (-not $?) { throw "Can't Activate Ruby. Did Uru Registration Succeed?" }
+# ruby -v
+# if (-not $?) { throw "Can't run Ruby. Is it installed?" }
Write-Output "--- configure winrm"
winrm quickconfig -q
diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml
index 4e9abe2b59..cd70f08897 100644
--- a/.expeditor/verify.pipeline.yml
+++ b/.expeditor/verify.pipeline.yml
@@ -15,7 +15,7 @@ steps:
# Tests Ruby 2.6
#########################################################################
-- label: "chef-utils Unit :ruby: 2.6"
+- label: "chef-utils Unit :ruby: 3.0"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- cd chef-utils
@@ -26,9 +26,9 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/ubuntu-18.04:2.6
+ image: rubydistros/ubuntu-18.04:3.0
-- label: "chef-config Unit :ruby: 2.6"
+- label: "chef-config Unit :ruby: 3.0"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- cd chef-config
@@ -39,7 +39,8 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/ubuntu-18.04:2.6
+ image: rubydistros/ubuntu-18.04:3.0
+
#########################################################################
# Tests Ruby 3.0