Skip to content

Commit

Permalink
main merge (#3)
Browse files Browse the repository at this point in the history
* Add FreeBSD 14.0-RELEASE (chef#1538)

Signed-off-by: Li-Wen Hsu <lwhsu@lwhsu.org>

* Fix os_arch of freebsd-13-aarch64 config (chef#1539)

Signed-off-by: Li-Wen Hsu <lwhsu@lwhsu.org>

* Bump almalinux minor versions (chef#1540)

* - update to rockylinux 9.3 (chef#1542)

* Bump Debian to v12.4, released December 10th, 2023 (chef#1541)

* Update latest OS versions and fix arm64 build list command (chef#1543)

* Update latest OS versions and fix arm64 build list command
---------

* Fix upload public/private flag lookup (chef#1544)

* fix upload public or private flag lookup
* oracle 7 cleanup script error removing linux-firmware
* ubuntu 23.10 post install command on file that doesn't exist

* vagrant cloud cpu architecture support added (chef#1546)

* vagrant cloud cpu architecture support added

* fix metadata basename (chef#1548)

fixed metadata base_boxname
updated debian 11 to 11.9
updated debian 12 to 12.5

* Fix waiting for ssh - ubuntu netplan dhcp-identifer format error (chef#1550)

* bumped iso url versions (chef#1553)

* Update to FreeBSD 13.3 (chef#1556)

* Update (chef#1559)

Add amz Linux 2023 and update testing scripts

* switch to ubuntu-latest runners (chef#1561)

- Add back iso check, packer lint, and amazonlinux builds to build pipeline
- Fix amazonlinux 2 build script
- Added amazonlinux 2023 build scripts
- Migrate Virtualbox and Qemu builds to github hosted runners from self-hosted runners
- Added test-kitchen and kitchen-vagrant dependencies to gemspec
- Added arg for bento test command to specify a specific build to test - this passes the arg to the kitchen test command
- Fix vagrant post-processor to specify custom vagrant file for freebsd builds
- Remove gui true from windows custom vagrant file
- Fix test to skip removing linux-firmware on oraclelinux
- Renamed oracle boxes to oraclelinux for consistency and remove edge cases in code
- Removed unused -c flag for specifying a specific config file for bento build
- Added --on-error flag to bento build command to pass to packer command
- Added cpu architecture support to bento build command, so it'll only test builds that work with the current cpu architecture
- Remove additional Ubuntu user-date last-command that may be locking macaddress
- Add to test to move failed test boxes to builds/failed_testing directory
- Changed ssh_timeout to 15m

* fix typo in README (chef#1554)

* fix typo in README
* fix virtio-win.iso directory in README
* fix mount of downloaded iso in qemu
* Upgrade Windows 11 to 23H2

* add macos build (chef#1566)

- Require ruby >= 3.0.0
- Add parallels-ipsw source
- Added MacOS template for parallels-ipsw
- Created MacOS scripts
- Adjusted build flags to all be lower case for consistency
- Removed extra amazonlinux directories to be more consistent with other builds
- Added build_files directory for all temp files to be stored in during packer building
- Opensuse-leap-15.5 updated to 15.6
- Remove Fedora 38 and add 40 builds
- Remove Ubuntu 23.10 and add 24.04 builds

* Fix qemu_format="raw" causing wrong format for qemu (chef#1568)

* setup workflow for hosted runners (chef#1547)

* setup workflow for hosted runners

* bump AlmaLinux 8 version to 8.10 (chef#1569)

* update OS versions (chef#1570)

* update OS versions

---------

Signed-off-by: Corey Hemminger <hemminger@hotmail.com>

* 🐛 fix shell exec err (chef#1572)

Signed-off-by: acejilam <acejilam@gmail.com>

* Fix a bug in freebsd-14.x due to changes in bsdinstall (chef#1573)

Since FreeBSD 14.0, bsdinstall creates ZFS dataset for `home` rather
than `/usr/home`, see
freebsd/freebsd-src@3bb9230.
This way, the previous workaround was broken, preventing the normal
provisioning of the default Vagrant public keys.

Signed-off-by: Anton Alekseev <anton@alekseev.cc>
Co-authored-by: Corey Hemminger <hemminger@hotmail.com>

* Fix arm64 builds for debian 11 (chef#1571)

* fix open-vm-tools installation in debian11

Signed-off-by: fgierlinger <2966031+fgierlinger@users.noreply.github.com>

* prevent "unknown ioctl 1976" log spam

Signed-off-by: fgierlinger <2966031+fgierlinger@users.noreply.github.com>

---------

Signed-off-by: fgierlinger <2966031+fgierlinger@users.noreply.github.com>
Co-authored-by: Corey Hemminger <hemminger@hotmail.com>

* Update ubuntu-24.04 to latest ISO urls (24.04 to 24.04.1) (chef#1577)

Signed-off-by: Phillip Ross <phillip.w.g.ross@gmail.com>

* update hashicorp/qemu packer plugin to fix QEMU build, supporting efi_drop_efivars variable (chef#1580)

* update Ubuntu Jammy releases (chef#1578)

* update Ubuntu releases

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* 23.10 removed

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

---------

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Co-authored-by: Corey Hemminger <hemminger@hotmail.com>

* Bump Debian from 12.5 to 12.7 (chef#1579)

Signed-off-by: Seth Grover <seth.d.grover@gmail.com>

* add Ubuntu 24.10 (Oracular Oriole) (chef#1583)

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

---------

Signed-off-by: Li-Wen Hsu <lwhsu@lwhsu.org>
Signed-off-by: Corey Hemminger <hemminger@hotmail.com>
Signed-off-by: acejilam <acejilam@gmail.com>
Signed-off-by: Anton Alekseev <anton@alekseev.cc>
Signed-off-by: fgierlinger <2966031+fgierlinger@users.noreply.github.com>
Signed-off-by: Phillip Ross <phillip.w.g.ross@gmail.com>
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Signed-off-by: Seth Grover <seth.d.grover@gmail.com>
Co-authored-by: Li-Wen Hsu <lwhsu@lwhsu.org>
Co-authored-by: Shawn Kelly O'Shea <shawn@eth0.net>
Co-authored-by: Phillip Ross <phillipross@users.noreply.github.com>
Co-authored-by: Seth Grover <13872653+mmguero@users.noreply.github.com>
Co-authored-by: Corey Hemminger <hemminger@hotmail.com>
Co-authored-by: Theo Dickinson <theodson@gmail.com>
Co-authored-by: Jimmy Huang <jimmy.huang@duragility.com>
Co-authored-by: Matthias Blümel <blaimi@blaimi.de>
Co-authored-by: Daniel Widerin <daniel@widerin.net>
Co-authored-by: ls-2018 <m202140037@xs.ustb.edu.cn>
Co-authored-by: Anton Alekseev <anton@alekseev.cc>
Co-authored-by: fgierlinger <2966031+fgierlinger@users.noreply.github.com>
Co-authored-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
  • Loading branch information
14 people authored Oct 24, 2024
1 parent d124207 commit 8e0fe63
Show file tree
Hide file tree
Showing 130 changed files with 2,741 additions and 1,279 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,18 @@ 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
packer-iso-check:
uses: chef/github-workflows/.github/workflows/packer-iso-url-checker.yml@main
with:
EXCLUDE_REGEX: 'amazonlinux-2.*|rhel.*|sles.*|solaris.*|windows-11-aarch64.*,macos-*'

packer-lint:
uses: chef/github-workflows/.github/workflows/packer-lint.yml@main
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 Expand Up @@ -77,6 +86,7 @@ jobs:
- xml-lint
- powershell-lint
- shellcheck-lint
- packer-lint
runs-on: Ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
Expand All @@ -85,3 +95,7 @@ jobs:
allowed-failures:
allowed-skips: ${{ toJSON(needs) }}
jobs: ${{ toJSON(needs) }}

# pkr-bld-parallels-test:
# uses: ./.github/workflows/test-pkr-bld-parallels.yml
# secrets: inherit
68 changes: 41 additions & 27 deletions .github/workflows/pkr-bld-amazonlinux-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,65 @@ on:

env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# PACKER_LOG: "1"

jobs:
x86_64:
runs-on: [self-hosted, X64, virtualbox]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- amazonlinux-2
- amazonlinux-2023
steps:
- name: Install Vagrant and VirtualBox
run: |
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor | sudo tee /usr/share/keyrings/oracle-virtualbox-2016.gpg
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
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
sudo apt-get update
sudo apt-get install -y software-properties-common vagrant virtualbox-7.0 qemu-utils genisoimage
VBoxManage --version
vagrant --version
- name: Install Chef
uses: actionshub/chef-install@3.0.0
with:
version: 24.2.1058
- name: Setup Packer
uses: hashicorp/setup-packer@main
with:
version: latest
- name: Checkout
uses: actions/checkout@main
# - name: Setup Packer
# uses: hashicorp/setup-packer@main
# with:
# version: latest
- name: Packer Init
run: packer init -upgrade packer_templates
- name: Packer FMT
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: Install Bento
run: |
eval "$(chef shell-init bash)"
gem build bento.gemspec
gem install bento-*.gem
- name: Bento build
run: |
rm -rf builds
sudo mkdir -p /mnt/builds/iso
sudo chmod -R 777 /mnt/builds
sudo ln -s /mnt/builds ./
eval "$(chef shell-init bash)"
./AMZ_build_virtualbox-ovf.sh
bento build --metadata_only os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl"
export LOGNAME=$USER
./${{ matrix.os }}-x86_64-virtualbox-build.sh
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: |
echo Powering off and deleting any existing VMs named AmazonLinuxBento
VBoxManage controlvm AmazonLinuxBento poweroff --type headless 2> /dev/null
sleep 1
VBoxManage unregistervm AmazonLinuxBento --delete 2> /dev/null
sleep 2
cat builds/${{ matrix.os }}*-x86_64._metadata.json
- name: Upload build artifact
uses: actions/upload-artifact@main
with:
name: "${{ matrix.os }}-virtualbox-x86_64"
path: |
builds
!builds/uploaded/*
builds/*.box
builds/*.json
retention-days: 10
compression-level: 0 # no compression
- name: Bento Test
run: |
eval "$(chef shell-init bash)"
export LOGNAME=$USER
bento test
64 changes: 32 additions & 32 deletions .github/workflows/pkr-bld-hyperv-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,70 +4,70 @@ on:

env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# PACKER_LOG: "1"

jobs:
x86_64:
runs-on: [self-hosted, X64, hyperv]
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
os:
- almalinux-8
- almalinux-9
- centos-7
- centos-stream-8
- centos-stream-9
- debian-11
- debian-12
- fedora-38
- fedora-39
- freebsd-12
- fedora-40
- freebsd-13
- freebsd-14
- opensuse-leap-15
- oracle-7
- oracle-8
- oracle-9
- oraclelinux-8
- oraclelinux-9
- rockylinux-8
- rockylinux-9
- scientificlinux-7
- springdalelinux-7
- springdalelinux-8
- springdalelinux-9
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-23.04
- ubuntu-24.04
provider:
- hyperv-iso
steps:
- name: Checkout
uses: actions/checkout@main
- name: iso-availability
- name: Install Chef
uses: actionshub/chef-install@3.0.0
with:
version: 24.2.1058
- name: Setup Packer
uses: hashicorp/setup-packer@main
with:
version: latest
- name: Install Bento
run: |
chef shell-init powershell
gem build bento.gemspec
gem install bento-*.gem
- name: Create VM Switch for Hyper-V
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: Setup Packer
# uses: hashicorp/setup-packer@main
# with:
# version: latest
run: |
Get-PsDrive -PsProvider FileSystem
pwd
New-VMSwitch -Name "bento" -NetAdapterName "Ethernet" -AllowManagementOS $true
- 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
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: Upload build artifact
uses: actions/upload-artifact@main
with:
name: "${{ matrix.os }}-hyperv-x86_64"
path: |
builds/*.box
builds/*.json
retention-days: 10
compression-level: 0 # no compression
- name: Bento Test
run: |
chef shell-init powershell
bento test
42 changes: 16 additions & 26 deletions .github/workflows/pkr-bld-parallels-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:

env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# PACKER_LOG: "1"

jobs:
aarch64:
Expand All @@ -14,53 +15,37 @@ jobs:
os:
- almalinux-8
- almalinux-9
- centos-7
- centos-stream-8
- centos-stream-9
- debian-11
- debian-12
- fedora-38
- fedora-39
- freebsd-12
- fedora-40
- freebsd-13
- freebsd-14
- opensuse-leap-15
- oracle-7
- oracle-8
- oracle-9
- oraclelinux-8
- oraclelinux-9
- rockylinux-8
- rockylinux-9
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-23.04
- ubuntu-24.04
provider:
- parallels-iso
steps:
- name: Checkout
uses: actions/checkout@main
- 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: Setup Packer
# if: steps.verify-changed-files.outputs.files_changed == 'true'
# uses: hashicorp/setup-packer@main
# with:
# version: latest
- name: Packer Init
run: packer init -upgrade packer_templates
- name: Packer FMT
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 }}-aarch64.pkrvars.hcl" packer_templates
- name: Packer build
# 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
- name: Bento build
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"
ls -alh builds
# - name: Bento Test
# run: |
# eval "$(chef shell-init bash)"
# bento test
ls -alh builds/
cat builds/${{ matrix.os }}*-aarch64._metadata.json
- name: Remove VM in case of canceled job
if: cancelled()
run: |
Expand All @@ -75,6 +60,11 @@ jobs:
with:
name: "${{ matrix.os }}-parallels-aarch64"
path: |
builds
!builds/uploaded/*
builds/*.box
builds/*.json
retention-days: 10
compression-level: 0 # no compression
- name: Bento Test
run: |
eval "$(chef shell-init bash)"
bento test
Loading

0 comments on commit 8e0fe63

Please sign in to comment.