Skip to content

ruby(deps-dev): bump puppet-strings from 4.1.3 to 5.0.0 #333

ruby(deps-dev): bump puppet-strings from 4.1.3 to 5.0.0

ruby(deps-dev): bump puppet-strings from 4.1.3 to 5.0.0 #333

name: Kitchen Windows
on:
workflow_dispatch:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
windows:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
name: ${{ matrix.role }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- role: win116425h2azure
worker_pool_id: win11-64-25h2-alpha
kitchen_instance: windows-win11-64-25h2
- role: win116424h2azure
worker_pool_id: win11-64-24h2-alpha
kitchen_instance: windows-win11-64-24h2
- role: win11a6425h2azurebuilder
worker_pool_id: win11-a64-25h2-builder
kitchen_instance: windows-win11-a64-25h2-builder
- role: win11a6425h2azuretester
worker_pool_id: win11-a64-25h2-tester
kitchen_instance: windows-win11-a64-25h2-tester
- role: win2022642009azure
worker_pool_id: b-win2022
kitchen_instance: windows-win2022-64-2009
- role: win10642009azure
worker_pool_id: win10-64-2009
kitchen_instance: windows-win10-64-2009
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Azure login
uses: azure/login@532459ea530d8321f2fb9bb10d1e0bcf23869a43
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
- name: Set up Ruby
uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f
with:
ruby-version: '3.2'
bundler-cache: false
- name: Cache gems
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7
with:
path: ~/.gem
key: v1-gems-${{ runner.os }}-${{ hashFiles('Gemfile.lock') }}
- name: Bundle install
run: |
bundle install
- name: Generate ephemeral Windows admin password
shell: bash
run: |
password="Tk$(openssl rand -hex 24)!a9"
echo "::add-mask::$password"
echo "KITCHEN_ADMIN_PASSWORD=$password" >> "$GITHUB_ENV"
- name: Kitchen test
timeout-minutes: 120
env:
KITCHEN_YAML: .kitchen_configs/kitchen.windows.yml
AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
KITCHEN_ADMIN_PASSWORD: ${{ env.KITCHEN_ADMIN_PASSWORD }}
PUPPET_ROLE: ${{ matrix.role }}
WORKER_POOL_ID: ${{ matrix.worker_pool_id }}
RONIN_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
run: |
max_attempts=3
for attempt in $(seq 1 $max_attempts); do
echo "=== Attempt $attempt of $max_attempts ==="
if bundle exec kitchen test ${{ matrix.kitchen_instance }} -l debug; then
exit 0
fi
echo "::warning::Attempt $attempt failed (likely spot VM eviction)"
if [ "$attempt" -lt "$max_attempts" ]; then
echo "Destroying failed instance before retry..."
bundle exec kitchen destroy ${{ matrix.kitchen_instance }} -l debug || true
fi
done
echo "::error::All $max_attempts attempts failed"
exit 1
- name: Kitchen destroy
if: always()
env:
KITCHEN_YAML: .kitchen_configs/kitchen.windows.yml
AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
KITCHEN_ADMIN_PASSWORD: ${{ env.KITCHEN_ADMIN_PASSWORD }}
PUPPET_ROLE: ${{ matrix.role }}
WORKER_POOL_ID: ${{ matrix.worker_pool_id }}
RONIN_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
run: bundle exec kitchen destroy ${{ matrix.kitchen_instance }} -l debug