Skip to content

Commit

Permalink
Integrate ruby 3.1 into builds
Browse files Browse the repository at this point in the history
This is a combination of 64 commits, the originals were mostly
repeating one-line messages so that history has not been kept here.

Signed-off-by: Thomas Powell <[email protected]>
Signed-off-by: Marc Paradise <[email protected]>
Signed-off-by: John McCrae <[email protected]>
  • Loading branch information
johnmccrae authored and tpowell-progress committed Aug 23, 2022
1 parent 9642369 commit 2f5dbd1
Show file tree
Hide file tree
Showing 40 changed files with 348 additions and 338 deletions.
2 changes: 0 additions & 2 deletions .expeditor/adhoc-canary.omnibus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ builder-to-testers-map:
- ubuntu-18.04-x86_64
- ubuntu-20.04-x86_64
- ubuntu-22.04-x86_64
windows-2012r2-i386:
- windows-2012r2-i386
windows-2012r2-x86_64:
- windows-2012-x86_64
- windows-2012r2-x86_64
Expand Down
3 changes: 1 addition & 2 deletions .expeditor/release.omnibus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ fips-platforms:
- windows-*
skip-artifactory-platforms:
- freebsd-13-amd64
windows-64-msystem: UCRT64
builder-to-testers-map:
aix-7.1-powerpc:
- aix-7.1-powerpc
Expand Down Expand Up @@ -80,8 +81,6 @@ builder-to-testers-map:
- ubuntu-18.04-x86_64
- ubuntu-20.04-x86_64
- ubuntu-22.04-x86_64
windows-2012r2-i386:
- windows-2012r2-i386
windows-2012r2-x86_64:
- windows-2012-x86_64
- windows-2012r2-x86_64
Expand Down
8 changes: 4 additions & 4 deletions .expeditor/scripts/bk_win_functional.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Remove-Item -Path C:\ProgramData\chocolatey\bin\choco.exe -ErrorAction SilentlyC

$ErrorActionPreference = 'Stop'

Write-Output "--- Enable Ruby 2.7"
Write-Output "--- Enable Ruby 3.1"

Write-Output "Register Installed Ruby Version 2.7 With Uru"
Start-Process "uru_rt.exe" -ArgumentList 'admin add C:\ruby27\bin' -Wait
uru 271
Write-Output "Register Installed Ruby Version 3.1 With Uru"
Start-Process "uru_rt.exe" -ArgumentList 'admin add C:\ruby31\bin' -Wait
uru 312
if (-not $?) { throw "Can't Activate Ruby. Did Uru Registration Succeed?" }
ruby -v
if (-not $?) { throw "Can't run Ruby. Is it installed?" }
Expand Down
3 changes: 2 additions & 1 deletion .expeditor/scripts/ensure-minimum-viable-hab.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[Version]$hab_version = (hab --version).split(" ")[1].split("/")[0]
if ($hab_version -lt [Version]"0.85.0" ) {
Write-Host "--- :habicat: Installing the version of Habitat required"
install-habitat --version 0.85.0.20190916
Set-ExecutionPolicy Bypass -Scope Process -Force
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.ps1'))
if (-not $?) { throw "Hab version is older than 0.85 and could not update it." }
} else {
Write-Host "--- :habicat: :thumbsup: Minimum required version of Habitat already installed"
Expand Down
10 changes: 10 additions & 0 deletions .expeditor/scripts/verify-plan.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ Write-Host "--- :8ball: :windows: Verifying $Plan"

powershell -File "./.expeditor/scripts/ensure-minimum-viable-hab.ps1"
if (-not $?) { throw "Could not ensure the minimum hab version required is installed." }
$env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")

Write-Host "--- :construction: Verifying Git is Installed"
$source = Get-Command -Name Git -Verbose
Write-Host "Which version of Git is installed? - " $source.version
if (-not ($source.name -match "git.exe")) {
choco install git -y
# gotta refresh the path so you can actually use Git now
$env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
}

Write-Host "--- :key: Generating fake origin key"
hab origin key generate $env:HAB_ORIGIN
Expand Down
44 changes: 7 additions & 37 deletions .expeditor/verify.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,10 @@ expeditor:
retry:
automatic:
limit: 1
timeout_in_minutes: 45
timeout_in_minutes: 60

steps:

#########################################################################
# Tests Ruby 2.6
#########################################################################

- label: "chef-utils Unit :ruby: 2.6"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- cd chef-utils
- bundle config set --local without omnibus_package
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec
expeditor:
executor:
docker:
image: rubydistros/ubuntu-18.04:2.6

- label: "chef-config Unit :ruby: 2.6"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- cd chef-config
- bundle config set --local without omnibus_package
- bundle config set --local path 'vendor/bundle'
- bundle install --jobs=3 --retry=3
- bundle exec rake spec
expeditor:
executor:
docker:
image: rubydistros/ubuntu-18.04:2.6

#########################################################################
# Tests Ruby 3.1
#########################################################################
Expand Down Expand Up @@ -264,7 +234,7 @@ steps:
docker:
image: rubydistros/almalinux-8:3.1

- label: "Functional Windows :ruby: 2.7"
- label: "Functional Windows :ruby: 3.1"
commands:
- .expeditor/scripts/bk_win_functional.ps1
expeditor:
Expand All @@ -274,27 +244,27 @@ steps:
single-use: true
shell: ["powershell", "-Command"]

- label: "Integration Windows :ruby: 3.0"
- label: "Integration Windows :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_win_integration.ps1
expeditor:
executor:
docker:
host_os: windows
image: rubydistros/windows-2019:3.0
image: rubydistros/windows-2019:3.1
environment:
- FORCE_FFI_YAJL=ext
- CHEF_LICENSE=accept-no-persist
shell: ["powershell", "-Command"]

- label: "Unit Windows :ruby: 3.0"
- label: "Unit Windows :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_win_unit.ps1
expeditor:
executor:
docker:
host_os: windows
image: rubydistros/windows-2019:3.0
image: rubydistros/windows-2019:3.1
environment:
- FORCE_FFI_YAJL=ext
- CHEF_LICENSE=accept-no-persist
Expand Down Expand Up @@ -393,7 +363,7 @@ steps:
- label: ":habicat: Windows plan"
commands:
- ./.expeditor/scripts/verify-plan.ps1
timeout_in_minutes: 60
timeout_in_minutes: 0
expeditor:
executor:
windows:
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/func_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,30 @@ jobs:
matrix:
os: [windows-2019, windows-2022]
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
ruby: [2.7, '3.0']
ruby: ['3.1']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rspec spec/functional/resource/chocolatey_package_spec.rb
bundler-cache: false
- run: |
bundle install
bundle exec rspec spec/functional/resource/chocolatey_package_spec.rb
userdefaults:
strategy:
fail-fast: false
matrix:
os: [macos-10.15, macos-11]
os: [macos-11, macos-12]
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
ruby: [2.7, '3.0']
ruby: ['3.1']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
bundler-cache: false
- run: bundle install
- run: bundle exec rspec spec/functional/resource/macos_userdefaults_spec.rb
Loading

0 comments on commit 2f5dbd1

Please sign in to comment.