Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Corey Hemminger <hemminger@hotmail.com>
  • Loading branch information
Stromweld committed Apr 26, 2024
1 parent c13030b commit 06528d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-pkr-bld-hyperv-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ jobs:
run: |
packer -v
# DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -NoRestart
# Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -NoRestart
$hyperv = Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online
Write-Host "Hyper-V is $($hyperv.State)"
Write-Host "Hyper-V is $hyperv.State"
# # Check if Hyper-V is enabled
# if($hyperv.State -eq "Enabled") {
# Write-Host "Hyper-V is enabled."
Expand All @@ -54,7 +54,7 @@ jobs:
- name: Packer Init
run: packer init -upgrade packer_templates
- name: Packer build
run: packer build -timestamp-ui -only="${{ matrix.provider }}.vm" -var-file="os_pkrvars/$("${{ matrix.os }}".Split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates
run: packer build -timestamp-ui -only="${{ matrix.provider }}.vm" -var "sources_enabled=hyperv-iso.vm" -var-file="os_pkrvars/$("${{ matrix.os }}".Split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates
- name: Remove VM in case of canceled job
if: cancelled()
run: |
Expand Down
2 changes: 1 addition & 1 deletion lib/bento/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def packer_build_cmd(template, _var_file)
end if var_files
cmd.insert(4, "-only=#{only}") if only
cmd.insert(4, "-except=#{except}") if except
# Build the command line in the correct order and without spaces as future input for the splat operator.
cmd.insert(4, "-var sources_enabled=#{only.split(',')}") if only
cmd.insert(4, "-var cpus=#{cpus}") if cpus
cmd.insert(4, "-var memory=#{mem}") if mem
cmd.insert(4, '-var headless=false') if headed
Expand Down

0 comments on commit 06528d5

Please sign in to comment.