Skip to content

Commit a4360d0

Browse files
committed
test5
Signed-off-by: Corey Hemminger <[email protected]>
1 parent 3534abf commit a4360d0

11 files changed

+50
-98
lines changed

.github/workflows/ci-build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ jobs:
5454
# pkr-bld-qemu-arm64:
5555
# uses: ./.github/workflows/pkr-bld-qemu-arm64.yml
5656
# secrets: inherit
57-
#
58-
# pkr-bld-qemu-x64:
59-
# uses: ./.github/workflows/pkr-bld-qemu-x64.yml
60-
# secrets: inherit
61-
#
57+
58+
pkr-bld-qemu-x64:
59+
uses: ./.github/workflows/pkr-bld-qemu-x64.yml
60+
secrets: inherit
61+
6262
# pkr-bld-virtualbox-arm64:
6363
# uses: ./.github/workflows/pkr-bld-virtualbox-arm64.yml
6464
# secrets: inherit

.github/workflows/pkr-bld-amazonlinux-x64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
2323
echo "deb [signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
2424
sudo apt-get update
25-
sudo apt-get install -y software-properties-common vagrant virtualbox-7.0
25+
sudo apt-get install -y software-properties-common vagrant virtualbox-7.0 qemu-utils
2626
VBoxManage --version
2727
vagrant --version
2828
- name: Install Chef

.github/workflows/pkr-bld-hyperv-x64.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ jobs:
4444
# uses: hashicorp/setup-packer@main
4545
# with:
4646
# version: latest
47-
- name: Packer Init
48-
run: packer init -upgrade packer_templates
49-
- name: Packer FMT
50-
run: packer fmt -check -recursive .
51-
- name: Packer Validate
52-
run: packer validate -var-file="os_pkrvars/$("${{ matrix.os }}".Split('-')[0])/${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates
5347
- name: Packer build
5448
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
5549
- name: Remove VM in case of canceled job

.github/workflows/pkr-bld-parallels-arm64.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,14 @@ jobs:
4545
# uses: hashicorp/setup-packer@main
4646
# with:
4747
# version: latest
48-
- name: Packer Init
49-
run: packer init -upgrade packer_templates
50-
- name: Packer FMT
51-
run: if packer fmt -check -recursive .; then exit 0; else echo "Some packer files need to be formatted, run 'packer fmt -recursive .' to fix"; exit 1; fi
52-
- name: Packer Validate
53-
run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" packer_templates
5448
- name: Packer build
5549
# run: packer build -timestamp-ui -only=${{ matrix.provider }}.vm -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" packer_templates
5650
run: |
5751
eval "$(chef shell-init bash)"
5852
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl"
5953
ls -alh builds
60-
# - name: Bento Test
61-
# run: |
62-
# eval "$(chef shell-init bash)"
63-
# bento test
54+
- name: Bento Test
55+
run: bento test
6456
- name: Remove VM in case of canceled job
6557
if: cancelled()
6658
run: |

.github/workflows/pkr-bld-parallels-x64.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,14 @@ jobs:
4444
# uses: hashicorp/setup-packer@main
4545
# with:
4646
# version: latest
47-
- name: Packer Init
48-
run: packer init -upgrade packer_templates
49-
- name: Packer FMT
50-
run: if packer fmt -check -recursive .; then exit 0; else echo "Some packer files need to be formatted, run 'packer fmt -recursive .' to fix"; exit 1; fi
51-
- name: Packer Validate
52-
run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates
5347
- name: Packer build
5448
# run: packer build -timestamp-ui -only=${{ matrix.provider }}.vm -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates
5549
run: |
5650
eval "$(chef shell-init bash)"
5751
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl"
5852
ls -alh builds
59-
# - name: Bento Test
60-
# run: |
61-
# eval "$(chef shell-init bash)"
62-
# bento test
53+
- name: Bento Test
54+
run: bento test
6355
- name: Remove VM in case of canceled job
6456
if: cancelled()
6557
run: |

.github/workflows/pkr-bld-qemu-arm64.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,14 @@ jobs:
4545
# uses: hashicorp/setup-packer@main
4646
# with:
4747
# version: latest
48-
- name: Packer Init
49-
run: packer init -upgrade packer_templates
50-
- name: Packer FMT
51-
run: if packer fmt -check -recursive .; then exit 0; else echo "Some packer files need to be formatted, run 'packer fmt -recursive .' to fix"; exit 1; fi
52-
- name: Packer Validate
53-
run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" packer_templates
5448
- name: Packer build
5549
# run: packer build -timestamp-ui -only=${{ matrix.provider }}.vm -var "qemu_accelerator=hvf" -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" packer_templates
5650
run: |
5751
eval "$(chef shell-init bash)"
5852
bento build -o ${{ matrix.provider }}.vm --vars "qemu_accelerator=hvf" os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl"
5953
ls -alh builds
60-
# - name: Bento Test
61-
# run: |
62-
# eval "$(chef shell-init bash)"
63-
# bento test
54+
- name: Bento Test
55+
run: bento test
6456
- name: Upload build artifact
6557
uses: actions/upload-artifact@v3
6658
with:

.github/workflows/pkr-bld-qemu-x64.yml

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ env:
77

88
jobs:
99
x86_64:
10-
runs-on: [self-hosted, X64, qemu]
10+
runs-on: ubuntu-latest
1111
strategy:
1212
fail-fast: false
1313
matrix:
@@ -35,37 +35,46 @@ jobs:
3535
provider:
3636
- qemu
3737
steps:
38+
- name: Install Vagrant and VirtualBox
39+
run: |
40+
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
41+
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
42+
sudo apt-get update
43+
sudo apt-get install -y software-properties-common vagrant libvirt kvm qemu qemu-kvm qemu-utils
44+
VBoxManage --version
45+
vagrant --version
46+
- name: Install Chef
47+
uses: actionshub/[email protected]
48+
- name: Setup Packer
49+
uses: hashicorp/setup-packer@main
50+
with:
51+
version: latest
3852
- name: Checkout
3953
uses: actions/checkout@main
40-
- name: iso-availability
41-
shell: pwsh
42-
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('"')
43-
- name: Download virtio-win.iso
44-
run: curl https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.229-1/virtio-win.iso -o packer_templates/win_answer_files/virtio-win.iso
45-
# - name: Setup Packer
46-
# uses: hashicorp/setup-packer@main
47-
# with:
48-
# version: latest
49-
- name: Packer Init
50-
run: packer init -upgrade packer_templates
51-
- name: Packer FMT
52-
run: if packer fmt -check -recursive .; then exit 0; else echo "Some packer files need to be formatted, run 'packer fmt -recursive .' to fix"; exit 1; fi
53-
- name: Packer Validate
54-
run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates
55-
- name: Packer build
56-
# run: packer build -timestamp-ui -only=${{ matrix.provider }}.vm -var "qemu_accelerator=hvf" -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates
54+
- name: Install Bento
55+
run: |
56+
eval "$(chef shell-init bash)"
57+
gem build bento.gemspec
58+
gem install bento-*.gem
59+
- name: Bento build
5760
run: |
5861
eval "$(chef shell-init bash)"
5962
bento build -o ${{ matrix.provider }}.vm --vars "qemu_accelerator=hvf" os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl"
6063
ls -alh builds
61-
# - name: Bento Test
62-
# run: |
63-
# eval "$(chef shell-init bash)"
64-
# bento test
64+
- name: Bento Test
65+
run: bento test
66+
# - name: Remove VM in case of canceled job
67+
# if: cancelled()
68+
# run: |
69+
# echo Powering off and deleting any existing VMs named AmazonLinuxBento
70+
# VBoxManage controlvm AmazonLinuxBento poweroff --type headless 2> /dev/null
71+
# sleep 1
72+
# VBoxManage unregistervm AmazonLinuxBento --delete 2> /dev/null
73+
# sleep 2
6574
- name: Upload build artifact
6675
uses: actions/upload-artifact@main
6776
with:
68-
name: "${{ matrix.os }}-qemu-x86_64"
77+
name: "${{ matrix.os }}-virtualbox-x86_64"
6978
path: |
7079
builds
7180
!builds/uploaded/*

.github/workflows/pkr-bld-virtualbox-arm64.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,14 @@ jobs:
4545
# uses: hashicorp/setup-packer@main
4646
# with:
4747
# version: latest
48-
- name: Packer Init
49-
run: packer init -upgrade packer_templates
50-
- name: Packer FMT
51-
run: if packer fmt -check -recursive .; then exit 0; else echo "Some packer files need to be formatted, run 'packer fmt -recursive .' to fix"; exit 1; fi
52-
- name: Packer Validate
53-
run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" packer_templates
5448
- name: Packer build
5549
# run: packer build -timestamp-ui -only=${{ matrix.provider }}.vm -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" packer_templates
5650
run: |
5751
eval "$(chef shell-init bash)"
5852
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl"
5953
ls -alh builds
60-
# - name: Bento Test
61-
# run: |
62-
# eval "$(chef shell-init bash)"
63-
# bento test
54+
- name: Bento Test
55+
run: bento test
6456
- name: Remove VM in case of canceled job
6557
if: cancelled()
6658
run: |

.github/workflows/pkr-bld-virtualbox-x64.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ jobs:
6060
gem install bento-*.gem
6161
- name: Bento build
6262
run: |
63-
eval "$(chef shell-init bash)"
6463
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl"
6564
ls -alh builds
6665
- name: Bento Test

.github/workflows/pkr-bld-vmware-arm64.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,13 @@ jobs:
4545
# uses: hashicorp/setup-packer@main
4646
# with:
4747
# version: latest
48-
- name: Packer Init
49-
run: packer init -upgrade packer_templates
50-
- name: Packer FMT
51-
run: if packer fmt -check -recursive .; then exit 0; else echo "Some packer files need to be formatted, run 'packer fmt -recursive .' to fix"; exit 1; fi
52-
- name: Packer Validate
53-
run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" packer_templates
5448
- name: Packer build
5549
# run: packer build -timestamp-ui -only=${{ matrix.provider }}.vm -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" packer_templates
5650
run: |
57-
eval "$(chef shell-init bash)"
5851
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl"
5952
ls -alh builds
60-
# - name: Bento Test
61-
# run: |
62-
# eval "$(chef shell-init bash)"
63-
# bento test
53+
- name: Bento Test
54+
run: bento test
6455
- name: Remove VM in case of canceled job
6556
if: cancelled()
6657
run: |

.github/workflows/pkr-bld-vmware-x64.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,13 @@ jobs:
4444
# uses: hashicorp/setup-packer@main
4545
# with:
4646
# version: latest
47-
- name: Packer Init
48-
run: packer init -upgrade packer_templates
49-
- name: Packer FMT
50-
run: if packer fmt -check -recursive .; then exit 0; else echo "Some packer files need to be formatted, run 'packer fmt -recursive .' to fix"; exit 1; fi
51-
- name: Packer Validate
52-
run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates
5347
- name: Packer build
54-
# run: packer build -timestamp-ui -only=${{ matrix.provider }}.vm -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates
5548
run: |
5649
eval "$(chef shell-init bash)"
5750
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl"
5851
ls -alh builds
59-
# - name: Bento Test
60-
# run: |
61-
# eval "$(chef shell-init bash)"
62-
# bento test
52+
- name: Bento Test
53+
run: bento test
6354
- name: Remove VM in case of canceled job
6455
if: cancelled()
6556
run: |

0 commit comments

Comments
 (0)