Skip to content

Commit

Permalink
added vagrant upload account configuration in builds.yml (#1522)
Browse files Browse the repository at this point in the history
* Added bento upload to use vagrant account configured in builds.yml
* Updated windows vagrant template to default to 4GB of memory
* Default hyper-v to generation 2
* Removed EOL OS builds Windows2012r2, Ubuntu 18.04, Ubuntu 22.10, Debian 10
* Remove use of deprecated chef-solo provisioner and cookbooks for windows builds
* Add boot_wait variables for each provider
* Adjusted default_boot_wait for linux to 5s
* Added --vars and --var_files flags
* Fixed upload description for libvirt to add qemu hv and version
* Updated ubuntu 20.04 boot_command
* Changed workflows to be based on cpu architecture
* Updated Bento to continue builds even if one fails and report all failures at the end and exit with exit code 1
* Added qemu clone of libvirt box when metadata file is created for uploading to vagrant qemu provider
* Made build shell scripts customizable through packer variable
  • Loading branch information
Stromweld committed Sep 15, 2023
1 parent 53d7679 commit e3da652
Show file tree
Hide file tree
Showing 109 changed files with 5,481 additions and 2,918 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
powershell-lint:
uses: chef/github-workflows/.github/workflows/powershell-lint.yml@main

pkr-bld-amazonlinux-x64:
uses: ./.github/workflows/pkr-bld-amazonlinux-x64.yml
secrets: inherit
# pkr-bld-amazonlinux-x64:
# uses: ./.github/workflows/pkr-bld-amazonlinux-x64.yml
# secrets: inherit

pkr-bld-hyperv-x64:
uses: ./.github/workflows/pkr-bld-hyperv-x64.yml
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/pkr-bld-amazonlinux-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ jobs:
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
- name: Packer Validate
run: packer validate -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" packer_templates
- name: Packer build
- name: Bento build
run: |
eval "$(chef shell-init bash)"
./AMZ_build_virtualbox-ovf.sh
bento build -n os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl" >> builds/amazonlinux-2-x86_64.metadata.json
bento build --metadata_only os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl"
ls -alh builds
# - name: Bento Test
# run: |
# eval "$(chef shell-init bash)"
# bento test
- name: Remove VM in case of canceled job
if: cancelled()
run: |
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/pkr-bld-hyperv-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
- centos-7
- centos-stream-8
- centos-stream-9
- debian-10
- debian-11
- debian-12
- fedora-37
Expand All @@ -34,19 +33,9 @@ jobs:
- springdalelinux-7
- springdalelinux-8
- springdalelinux-9
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
# - windows-10
# - windows-10gen2
# - windows-11
# - windows-11gen2
# - windows-2012r2
# - windows-2016
# - windows-2019
# - windows-2022
provider:
- hyperv-iso
steps:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/pkr-bld-parallels-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
- centos-7
- centos-stream-8
- centos-stream-9
- debian-10
- debian-11
- debian-12
- fedora-37
Expand All @@ -30,10 +29,8 @@ jobs:
- oracle-9
- rockylinux-8
- rockylinux-9
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
provider:
- parallels-iso
Expand All @@ -60,6 +57,10 @@ jobs:
eval "$(chef shell-init bash)"
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl"
ls -alh builds
# - name: Bento Test
# run: |
# eval "$(chef shell-init bash)"
# bento test
- name: Remove VM in case of canceled job
if: cancelled()
run: |
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/pkr-bld-parallels-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
- centos-7
- centos-stream-8
- centos-stream-9
- debian-10
- debian-11
- debian-12
- fedora-37
Expand All @@ -34,17 +33,9 @@ jobs:
- springdalelinux-7
- springdalelinux-8
- springdalelinux-9
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
# - windows-10
# - windows-11
# - windows-2012r2
# - windows-2016
# - windows-2019
# - windows-2022
provider:
- parallels-iso
steps:
Expand All @@ -69,6 +60,10 @@ jobs:
eval "$(chef shell-init bash)"
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl"
ls -alh builds
# - name: Bento Test
# run: |
# eval "$(chef shell-init bash)"
# bento test
- name: Remove VM in case of canceled job
if: cancelled()
run: |
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/pkr-bld-qemu-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
- centos-7
- centos-stream-8
- centos-stream-9
- debian-10
- debian-11
- debian-12
- fedora-37
Expand All @@ -30,10 +29,8 @@ jobs:
- oracle-9
- rockylinux-8
- rockylinux-9
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
provider:
- qemu
Expand All @@ -58,8 +55,12 @@ jobs:
# 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
run: |
eval "$(chef shell-init bash)"
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl"
bento build -o ${{ matrix.provider }}.vm --vars "qemu_accelerator=hvf" os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl"
ls -alh builds
# - name: Bento Test
# run: |
# eval "$(chef shell-init bash)"
# bento test
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/pkr-bld-qemu-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
- centos-7
- centos-stream-8
- centos-stream-9
- debian-10
- debian-11
- debian-12
- fedora-37
Expand All @@ -34,17 +33,9 @@ jobs:
- springdalelinux-7
- springdalelinux-8
- springdalelinux-9
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
# - windows-10
# - windows-11
# - windows-2012r2
# - windows-2016
# - windows-2019
# - windows-2022
provider:
- qemu
steps:
Expand All @@ -69,8 +60,12 @@ jobs:
# 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
run: |
eval "$(chef shell-init bash)"
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl"
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"
ls -alh builds
# - name: Bento Test
# run: |
# eval "$(chef shell-init bash)"
# bento test
- name: Upload build artifact
uses: actions/upload-artifact@main
with:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/pkr-bld-virtualbox-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
- centos-7
- centos-stream-8
- centos-stream-9
- debian-10
- debian-11
- debian-12
- fedora-37
Expand All @@ -30,10 +29,8 @@ jobs:
- oracle-9
- rockylinux-8
- rockylinux-9
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
provider:
- virtualbox-iso
Expand All @@ -60,6 +57,10 @@ jobs:
eval "$(chef shell-init bash)"
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl"
ls -alh builds
# - name: Bento Test
# run: |
# eval "$(chef shell-init bash)"
# bento test
- name: Remove VM in case of canceled job
if: cancelled()
run: |
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/pkr-bld-virtualbox-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
- centos-7
- centos-stream-8
- centos-stream-9
- debian-10
- debian-11
- debian-12
- fedora-37
Expand All @@ -34,17 +33,9 @@ jobs:
- springdalelinux-7
- springdalelinux-8
- springdalelinux-9
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
# - windows-10
# - windows-11
# - windows-2012r2
# - windows-2016
# - windows-2019
# - windows-2022
provider:
- virtualbox-iso
steps:
Expand All @@ -69,6 +60,10 @@ jobs:
eval "$(chef shell-init bash)"
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl"
ls -alh builds
# - name: Bento Test
# run: |
# eval "$(chef shell-init bash)"
# bento test
- name: Remove VM in case of canceled job
if: cancelled()
run: |
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/pkr-bld-vmware-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
- centos-7
- centos-stream-8
- centos-stream-9
- debian-10
- debian-11
- debian-12
- fedora-37
Expand All @@ -30,10 +29,8 @@ jobs:
- oracle-9
- rockylinux-8
- rockylinux-9
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
provider:
- vmware-iso
Expand All @@ -60,6 +57,10 @@ jobs:
eval "$(chef shell-init bash)"
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl"
ls -alh builds
# - name: Bento Test
# run: |
# eval "$(chef shell-init bash)"
# bento test
- name: Remove VM in case of canceled job
if: cancelled()
run: |
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/pkr-bld-vmware-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
- centos-7
- centos-stream-8
- centos-stream-9
- debian-10
- debian-11
- debian-12
- fedora-37
Expand All @@ -34,17 +33,9 @@ jobs:
- springdalelinux-7
- springdalelinux-8
- springdalelinux-9
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
# - windows-10
# - windows-11
# - windows-2012r2
# - windows-2016
# - windows-2019
# - windows-2022
provider:
- vmware-iso
steps:
Expand All @@ -69,6 +60,10 @@ jobs:
eval "$(chef shell-init bash)"
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl"
ls -alh builds
# - name: Bento Test
# run: |
# eval "$(chef shell-init bash)"
# bento test
- name: Remove VM in case of canceled job
if: cancelled()
run: |
Expand Down
Loading

0 comments on commit e3da652

Please sign in to comment.