Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Corey Hemminger <[email protected]>
  • Loading branch information
Stromweld committed Feb 3, 2024
1 parent 70a4a07 commit a3e261c
Showing 1 changed file with 28 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ jobs:
- name: iso-availability
shell: pwsh
run: Invoke-RestMethod -Method Head -Verbose -Uri $(Get-Content os_pkrvars/$('${{ matrix.os }}'.split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl | ConvertFrom-StringData).iso_url.Trim('"')
- name: hyper-v install
shell: pwsh
run: |
Install-WindowsFeature -Name Hyper-V -IncludeAllSubFeature -IncludeManagementTools
Restart-Computer -Force
- name: tests
shell: pwsh
run: |
Expand All @@ -51,26 +56,26 @@ jobs:
} else {
Write-Host "Hyper-V is disabled."
}
- name: Packer Init
run: packer init -upgrade packer_templates
- name: Packer FMT
run: packer fmt -check -recursive .
- name: Packer Validate
run: packer validate -var-file="os_pkrvars/$("${{ matrix.os }}".Split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl" 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
- name: Remove VM in case of canceled job
if: cancelled()
run: |
echo Powering off and deleting any existing VMs named ${{ matrix.os }}*-amd64
Stop-VM -Force ${{ matrix.os }}*-amd64
sleep 1
Remove-VM -Force ${{ matrix.os }}*-amd64
sleep 2
- name: Upload build artifact
uses: actions/upload-artifact@main
with:
name: "${{ matrix.os }}-hyperv-x86_64"
path: |
builds/*.box
retention-days: 10
# - name: Packer Init
# run: packer init -upgrade packer_templates
# - name: Packer FMT
# run: packer fmt -check -recursive .
# - name: Packer Validate
# run: packer validate -var-file="os_pkrvars/$("${{ matrix.os }}".Split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl" 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
# - name: Remove VM in case of canceled job
# if: cancelled()
# run: |
# echo Powering off and deleting any existing VMs named ${{ matrix.os }}*-amd64
# Stop-VM -Force ${{ matrix.os }}*-amd64
# sleep 1
# Remove-VM -Force ${{ matrix.os }}*-amd64
# sleep 2
# - name: Upload build artifact
# uses: actions/upload-artifact@main
# with:
# name: "${{ matrix.os }}-hyperv-x86_64"
# path: |
# builds/*.box
# retention-days: 10

0 comments on commit a3e261c

Please sign in to comment.