Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 50 additions & 35 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
on:
pull_request:

permissions:
contents: read

concurrency:
group: ci-build-${{ github.ref }}
cancel-in-progress: true

jobs:
markdown-lint:
uses: chef/github-workflows/.github/workflows/markdown-lint.yml@main

markdown-link-checker:
uses: chef/github-workflows/.github/workflows/markdown-link-checker.yml@main
# markdown-lint:
# uses: chef/github-workflows/.github/workflows/markdown-lint.yml@main
#
# markdown-link-checker:
# uses: chef/github-workflows/.github/workflows/markdown-link-checker.yml@main

yaml-lint:
uses: chef/github-workflows/.github/workflows/yaml-lint.yml@main
Expand All @@ -37,56 +40,68 @@ jobs:
uses: chef/github-workflows/.github/workflows/packer-lint.yml@main
secrets: inherit

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

pkr-bld-parallels-arm64:
uses: ./.github/workflows/pkr-bld-parallels-arm64.yml
secrets: inherit
pkr-bld-parallels-arm64:
uses: ./.github/workflows/pkr-bld-parallels-arm64.yml
secrets: inherit

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

pkr-bld-qemu-arm64:
uses: ./.github/workflows/pkr-bld-qemu-arm64.yml
secrets: inherit
pkr-bld-qemu-arm64:
uses: ./.github/workflows/pkr-bld-qemu-arm64.yml
secrets: inherit

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

pkr-bld-virtualbox-arm64:
uses: ./.github/workflows/pkr-bld-virtualbox-arm64.yml
secrets: inherit
pkr-bld-virtualbox-arm64:
uses: ./.github/workflows/pkr-bld-virtualbox-arm64.yml
secrets: inherit

pkr-bld-virtualbox-x64:
uses: ./.github/workflows/pkr-bld-virtualbox-x64.yml
secrets: inherit
pkr-bld-utm-arm64:
uses: ./.github/workflows/pkr-bld-utm-arm64.yml
secrets: inherit

pkr-bld-vmware-arm64:
uses: ./.github/workflows/pkr-bld-vmware-arm64.yml
secrets: inherit
pkr-bld-utm-x64:
uses: ./.github/workflows/pkr-bld-utm-x64.yml
secrets: inherit

pkr-bld-virtualbox-arm64:
uses: ./.github/workflows/pkr-bld-virtualbox-arm64.yml
secrets: inherit

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

pkr-bld-vmware-arm64:
uses: ./.github/workflows/pkr-bld-vmware-arm64.yml
secrets: inherit

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

check_jobs_pass:
if: always()
needs:
- markdown-lint
# - markdown-lint
- yaml-lint
- json-lint
- xml-lint
- powershell-lint
- shellcheck-lint
# - packer-lint
# - packer-lint
runs-on: Ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@main
uses: re-actors/alls-green@release/v1
with:
allowed-failures:
allowed-skips: ${{ toJSON(needs) }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
schedule:
- cron: '0 0 * * 0'

permissions:
contents: read

jobs:
markdown-lint:
uses: chef/github-workflows/.github/workflows/markdown-lint.yml@main
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/pkr-bld-amazonlinux-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
on:
workflow_call:

permissions:
contents: read

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

jobs:
aarch64:
runs-on: [self-hosted, ARM64, virtualbox]
strategy:
fail-fast: false
matrix:
os:
- amazonlinux-2023
steps:
- name: Checkout
uses: actions/checkout@main
# - name: Setup Packer
# if: steps.verify-changed-files.outputs.files_changed == 'true'
# uses: hashicorp/setup-packer@main
# with:
# version: latest
- name: Bento build
run: |
eval "$(chef shell-init bash)"
./${{ matrix.os }}-aarch64-virtualbox-build.sh
ls -alh builds/build_complete
cat builds/build_complete/${{ matrix.os }}*-aarch64._metadata.json

- name: Remove VM in case of canceled job
if: cancelled()
run: |
VM="$(VBoxManage list vms | grep ${{ matrix.os }} | cut -d " " -f 1)"
echo "VM Name: $VM"
echo Powering off and deleting any existing VMs named ${{ matrix.os }}*-aarch64
VBoxManage controlvm $VM poweroff
sleep 1
vboxmanage unregistervm $VM --delete
sleep 2
- name: Bento Test
run: |
eval "$(chef shell-init bash)"
bento test
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: "${{ matrix.os }}-virtualbox-aarch64"
path: |
builds/testing_passed/aarch64/*.box
builds/testing_passed/aarch64/*.json
overwrite: true
retention-days: 10
compression-level: 0 # no compression
68 changes: 68 additions & 0 deletions .github/workflows/pkr-bld-amazonlinux-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
on:
workflow_call:

permissions:
contents: read

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

jobs:
x86_64:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- 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.1 qemu-utils genisoimage
VBoxManage --version
vagrant --version
- name: Install Chef
uses: actionshub/chef-install@3.0.0
- name: Setup Packer
uses: hashicorp/setup-packer@main
with:
version: latest
- name: Checkout
uses: actions/checkout@main
- 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 mkdir -p /mnt/builds/build_complete
sudo chmod -R 777 /mnt/builds
sudo ln -s /mnt/builds ./
eval "$(chef shell-init bash)"
./${{ matrix.os }}-x86_64-virtualbox-build.sh
ls -alh builds/build_complete
cat builds/build_complete/${{ matrix.os }}*-x86_64._metadata.json
- name: Bento Test
run: |
eval "$(chef shell-init bash)"
bento test
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: "${{ matrix.os }}-virtualbox-x86_64"
path: |
builds/testing_passed/x86_64/*.box
builds/testing_passed/x86_64/*.json
overwrite: true
retention-days: 10
compression-level: 0 # no compression
9 changes: 6 additions & 3 deletions .github/workflows/pkr-bld-hyperv-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
on:
workflow_call:

permissions:
contents: read

env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# PACKER_LOG: "1"
Expand Down Expand Up @@ -44,7 +47,7 @@ jobs:
- name: Packer Init
run: packer init -upgrade packer_templates
- name: Packer build
run: packer build -timestamp-ui -only="${{ matrix.provider }}.vm" -var 'ssh_timeout=30m' -var 'sources_enabled=["hyperv-iso.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: Bento Test
run: |
chef shell-init powershell
Expand All @@ -54,8 +57,8 @@ jobs:
with:
name: "${{ matrix.os }}-hyperv-x86_64"
path: |
builds/*.box
builds/*.json
builds/testing_passed/x86_64/*.box
builds/testing_passed/x86_64/*.json
overwrite: true
retention-days: 10
compression-level: 0 # no compression
15 changes: 10 additions & 5 deletions .github/workflows/pkr-bld-parallels-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
on:
workflow_call:

permissions:
contents: read

env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# PACKER_LOG: "1"
Expand All @@ -15,6 +18,7 @@ jobs:
os:
- macos-14
- macos-15
- macos-26
- windows-11
provider:
- parallels-iso
Expand All @@ -29,13 +33,14 @@ jobs:
- name: Bento build
run: |
eval "$(chef shell-init bash)"
bento build -o ${{ matrix.provider }}.vm --vars 'ssh_timeout=30m' os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl"
ls -alh builds/
cat builds/${{ matrix.os }}*-aarch64._metadata.json
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl"
ls -alh builds/build_complete/
cat builds/build_complete/${{ matrix.os }}*-aarch64._metadata.json
- name: Remove VM in case of canceled job
if: cancelled()
run: |
VM="$(prlctl list -a | grep ${{ matrix.os }} | cut -d " " -f 1)"
echo "VM Name: $VM"
echo Powering off and deleting any existing VMs named ${{ matrix.os }}*-aarch64
prlctl stop "$VM" --kill 2> /dev/null
sleep 1
Expand All @@ -50,8 +55,8 @@ jobs:
with:
name: "${{ matrix.os }}-parallels-aarch64"
path: |
builds/*.box
builds/*.json
builds/testing_passed/aarch64/*.box
builds/testing_passed/aarch64/*.json
overwrite: true
retention-days: 10
compression-level: 0 # no compression
14 changes: 9 additions & 5 deletions .github/workflows/pkr-bld-parallels-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
on:
workflow_call:

permissions:
contents: read

env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# PACKER_LOG: "1"
Expand Down Expand Up @@ -32,13 +35,14 @@ jobs:
- name: Bento build
run: |
eval "$(chef shell-init bash)"
bento build -o ${{ matrix.provider }}.vm --vars 'ssh_timeout=30m' os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl"
ls -alh builds/
cat builds/${{ matrix.os }}*-x86_64._metadata.json
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl"
ls -alh builds/build_complete/
cat builds/build_complete/${{ matrix.os }}*-x86_64._metadata.json
- name: Remove VM in case of canceled job
if: cancelled()
run: |
VM="$(prlctl list -a | grep ${{ matrix.os }} | cut -d " " -f 1)"
echo "VM Name: $VM"
echo Powering off and deleting any existing VMs named ${{ matrix.os }}*-amd64
prlctl stop "$VM" --kill 2> /dev/null
sleep 1
Expand All @@ -53,8 +57,8 @@ jobs:
with:
name: "${{ matrix.os }}-parallels-x86_64"
path: |
builds/*.box
builds/*.json
builds/testing_passed/x86_64/*.box
builds/testing_passed/x86_64/*.json
overwrite: true
retention-days: 10
compression-level: 0 # no compression
Loading