Skip to content

Commit 2056b35

Browse files
authored
Merge pull request #4 from Stromweld/chef-main
Merge upstream Bento main branch
2 parents c3cc2c9 + 190216a commit 2056b35

120 files changed

Lines changed: 1738 additions & 593 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci-build.yml

Lines changed: 50 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@
22
on:
33
pull_request:
44

5+
permissions:
6+
contents: read
7+
58
concurrency:
69
group: ci-build-${{ github.ref }}
710
cancel-in-progress: true
811

912
jobs:
10-
markdown-lint:
11-
uses: chef/github-workflows/.github/workflows/markdown-lint.yml@main
12-
13-
markdown-link-checker:
14-
uses: chef/github-workflows/.github/workflows/markdown-link-checker.yml@main
13+
# markdown-lint:
14+
# uses: chef/github-workflows/.github/workflows/markdown-lint.yml@main
15+
#
16+
# markdown-link-checker:
17+
# uses: chef/github-workflows/.github/workflows/markdown-link-checker.yml@main
1518

1619
yaml-lint:
1720
uses: chef/github-workflows/.github/workflows/yaml-lint.yml@main
@@ -37,56 +40,68 @@ jobs:
3740
uses: chef/github-workflows/.github/workflows/packer-lint.yml@main
3841
secrets: inherit
3942

40-
pkr-bld-hyperv-x64:
41-
uses: ./.github/workflows/pkr-bld-hyperv-x64.yml
42-
secrets: inherit
43+
pkr-bld-hyperv-x64:
44+
uses: ./.github/workflows/pkr-bld-hyperv-x64.yml
45+
secrets: inherit
4346

44-
pkr-bld-parallels-arm64:
45-
uses: ./.github/workflows/pkr-bld-parallels-arm64.yml
46-
secrets: inherit
47+
pkr-bld-parallels-arm64:
48+
uses: ./.github/workflows/pkr-bld-parallels-arm64.yml
49+
secrets: inherit
4750

48-
pkr-bld-parallels-x64:
49-
uses: ./.github/workflows/pkr-bld-parallels-x64.yml
50-
secrets: inherit
51+
pkr-bld-parallels-x64:
52+
uses: ./.github/workflows/pkr-bld-parallels-x64.yml
53+
secrets: inherit
5154

52-
pkr-bld-qemu-arm64:
53-
uses: ./.github/workflows/pkr-bld-qemu-arm64.yml
54-
secrets: inherit
55+
pkr-bld-qemu-arm64:
56+
uses: ./.github/workflows/pkr-bld-qemu-arm64.yml
57+
secrets: inherit
5558

56-
pkr-bld-qemu-x64:
57-
uses: ./.github/workflows/pkr-bld-qemu-x64.yml
58-
secrets: inherit
59+
pkr-bld-qemu-x64:
60+
uses: ./.github/workflows/pkr-bld-qemu-x64.yml
61+
secrets: inherit
5962

60-
pkr-bld-virtualbox-arm64:
61-
uses: ./.github/workflows/pkr-bld-virtualbox-arm64.yml
62-
secrets: inherit
63+
pkr-bld-virtualbox-arm64:
64+
uses: ./.github/workflows/pkr-bld-virtualbox-arm64.yml
65+
secrets: inherit
6366

64-
pkr-bld-virtualbox-x64:
65-
uses: ./.github/workflows/pkr-bld-virtualbox-x64.yml
66-
secrets: inherit
67+
pkr-bld-utm-arm64:
68+
uses: ./.github/workflows/pkr-bld-utm-arm64.yml
69+
secrets: inherit
6770

68-
pkr-bld-vmware-arm64:
69-
uses: ./.github/workflows/pkr-bld-vmware-arm64.yml
70-
secrets: inherit
71+
pkr-bld-utm-x64:
72+
uses: ./.github/workflows/pkr-bld-utm-x64.yml
73+
secrets: inherit
74+
75+
pkr-bld-virtualbox-arm64:
76+
uses: ./.github/workflows/pkr-bld-virtualbox-arm64.yml
77+
secrets: inherit
78+
79+
pkr-bld-virtualbox-x64:
80+
uses: ./.github/workflows/pkr-bld-virtualbox-x64.yml
81+
secrets: inherit
82+
83+
pkr-bld-vmware-arm64:
84+
uses: ./.github/workflows/pkr-bld-vmware-arm64.yml
85+
secrets: inherit
7186

72-
pkr-bld-vmware-x64:
73-
uses: ./.github/workflows/pkr-bld-vmware-x64.yml
74-
secrets: inherit
87+
pkr-bld-vmware-x64:
88+
uses: ./.github/workflows/pkr-bld-vmware-x64.yml
89+
secrets: inherit
7590

7691
check_jobs_pass:
7792
if: always()
7893
needs:
79-
- markdown-lint
94+
# - markdown-lint
8095
- yaml-lint
8196
- json-lint
8297
- xml-lint
8398
- powershell-lint
8499
- shellcheck-lint
85-
# - packer-lint
100+
# - packer-lint
86101
runs-on: Ubuntu-latest
87102
steps:
88103
- name: Decide whether the needed jobs succeeded or failed
89-
uses: re-actors/alls-green@main
104+
uses: re-actors/alls-green@release/v1
90105
with:
91106
allowed-failures:
92107
allowed-skips: ${{ toJSON(needs) }}

.github/workflows/ci-lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
schedule:
44
- cron: '0 0 * * 0'
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
markdown-lint:
811
uses: chef/github-workflows/.github/workflows/markdown-lint.yml@main
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
on:
3+
workflow_call:
4+
5+
permissions:
6+
contents: read
7+
8+
env:
9+
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
10+
# PACKER_LOG: "1"
11+
12+
jobs:
13+
aarch64:
14+
runs-on: [self-hosted, ARM64, virtualbox]
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os:
19+
- amazonlinux-2023
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@main
23+
# - name: Setup Packer
24+
# if: steps.verify-changed-files.outputs.files_changed == 'true'
25+
# uses: hashicorp/setup-packer@main
26+
# with:
27+
# version: latest
28+
- name: Bento build
29+
run: |
30+
eval "$(chef shell-init bash)"
31+
./${{ matrix.os }}-aarch64-virtualbox-build.sh
32+
ls -alh builds/build_complete
33+
cat builds/build_complete/${{ matrix.os }}*-aarch64._metadata.json
34+
35+
- name: Remove VM in case of canceled job
36+
if: cancelled()
37+
run: |
38+
VM="$(VBoxManage list vms | grep ${{ matrix.os }} | cut -d " " -f 1)"
39+
echo "VM Name: $VM"
40+
echo Powering off and deleting any existing VMs named ${{ matrix.os }}*-aarch64
41+
VBoxManage controlvm $VM poweroff
42+
sleep 1
43+
vboxmanage unregistervm $VM --delete
44+
sleep 2
45+
- name: Bento Test
46+
run: |
47+
eval "$(chef shell-init bash)"
48+
bento test
49+
- name: Upload build artifact
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: "${{ matrix.os }}-virtualbox-aarch64"
53+
path: |
54+
builds/testing_passed/aarch64/*.box
55+
builds/testing_passed/aarch64/*.json
56+
overwrite: true
57+
retention-days: 10
58+
compression-level: 0 # no compression
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
on:
3+
workflow_call:
4+
5+
permissions:
6+
contents: read
7+
8+
env:
9+
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
10+
# PACKER_LOG: "1"
11+
12+
jobs:
13+
x86_64:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os:
19+
- amazonlinux-2023
20+
steps:
21+
- name: Install Vagrant and VirtualBox
22+
run: |
23+
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
24+
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor | sudo tee /usr/share/keyrings/oracle-virtualbox-2016.gpg
25+
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
26+
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
27+
sudo apt-get update
28+
sudo apt-get install -y software-properties-common vagrant virtualbox-7.1 qemu-utils genisoimage
29+
VBoxManage --version
30+
vagrant --version
31+
- name: Install Chef
32+
uses: actionshub/chef-install@3.0.0
33+
- name: Setup Packer
34+
uses: hashicorp/setup-packer@main
35+
with:
36+
version: latest
37+
- name: Checkout
38+
uses: actions/checkout@main
39+
- name: Install Bento
40+
run: |
41+
eval "$(chef shell-init bash)"
42+
gem build bento.gemspec
43+
gem install bento-*.gem
44+
- name: Bento build
45+
run: |
46+
rm -rf builds
47+
sudo mkdir -p /mnt/builds/iso
48+
sudo mkdir -p /mnt/builds/build_complete
49+
sudo chmod -R 777 /mnt/builds
50+
sudo ln -s /mnt/builds ./
51+
eval "$(chef shell-init bash)"
52+
./${{ matrix.os }}-x86_64-virtualbox-build.sh
53+
ls -alh builds/build_complete
54+
cat builds/build_complete/${{ matrix.os }}*-x86_64._metadata.json
55+
- name: Bento Test
56+
run: |
57+
eval "$(chef shell-init bash)"
58+
bento test
59+
- name: Upload build artifact
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: "${{ matrix.os }}-virtualbox-x86_64"
63+
path: |
64+
builds/testing_passed/x86_64/*.box
65+
builds/testing_passed/x86_64/*.json
66+
overwrite: true
67+
retention-days: 10
68+
compression-level: 0 # no compression

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
on:
33
workflow_call:
44

5+
permissions:
6+
contents: read
7+
58
env:
69
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
710
# PACKER_LOG: "1"
@@ -44,7 +47,7 @@ jobs:
4447
- name: Packer Init
4548
run: packer init -upgrade packer_templates
4649
- name: Packer build
47-
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
50+
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
4851
- name: Bento Test
4952
run: |
5053
chef shell-init powershell
@@ -54,8 +57,8 @@ jobs:
5457
with:
5558
name: "${{ matrix.os }}-hyperv-x86_64"
5659
path: |
57-
builds/*.box
58-
builds/*.json
60+
builds/testing_passed/x86_64/*.box
61+
builds/testing_passed/x86_64/*.json
5962
overwrite: true
6063
retention-days: 10
6164
compression-level: 0 # no compression

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
on:
33
workflow_call:
44

5+
permissions:
6+
contents: read
7+
58
env:
69
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
710
# PACKER_LOG: "1"
@@ -15,6 +18,7 @@ jobs:
1518
os:
1619
- macos-14
1720
- macos-15
21+
- macos-26
1822
- windows-11
1923
provider:
2024
- parallels-iso
@@ -29,13 +33,14 @@ jobs:
2933
- name: Bento build
3034
run: |
3135
eval "$(chef shell-init bash)"
32-
bento build -o ${{ matrix.provider }}.vm --vars 'ssh_timeout=30m' os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl"
33-
ls -alh builds/
34-
cat builds/${{ matrix.os }}*-aarch64._metadata.json
36+
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl"
37+
ls -alh builds/build_complete/
38+
cat builds/build_complete/${{ matrix.os }}*-aarch64._metadata.json
3539
- name: Remove VM in case of canceled job
3640
if: cancelled()
3741
run: |
3842
VM="$(prlctl list -a | grep ${{ matrix.os }} | cut -d " " -f 1)"
43+
echo "VM Name: $VM"
3944
echo Powering off and deleting any existing VMs named ${{ matrix.os }}*-aarch64
4045
prlctl stop "$VM" --kill 2> /dev/null
4146
sleep 1
@@ -50,8 +55,8 @@ jobs:
5055
with:
5156
name: "${{ matrix.os }}-parallels-aarch64"
5257
path: |
53-
builds/*.box
54-
builds/*.json
58+
builds/testing_passed/aarch64/*.box
59+
builds/testing_passed/aarch64/*.json
5560
overwrite: true
5661
retention-days: 10
5762
compression-level: 0 # no compression

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
on:
33
workflow_call:
44

5+
permissions:
6+
contents: read
7+
58
env:
69
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
710
# PACKER_LOG: "1"
@@ -32,13 +35,14 @@ jobs:
3235
- name: Bento build
3336
run: |
3437
eval "$(chef shell-init bash)"
35-
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"
36-
ls -alh builds/
37-
cat builds/${{ matrix.os }}*-x86_64._metadata.json
38+
bento build -o ${{ matrix.provider }}.vm os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-x86_64.pkrvars.hcl"
39+
ls -alh builds/build_complete/
40+
cat builds/build_complete/${{ matrix.os }}*-x86_64._metadata.json
3841
- name: Remove VM in case of canceled job
3942
if: cancelled()
4043
run: |
4144
VM="$(prlctl list -a | grep ${{ matrix.os }} | cut -d " " -f 1)"
45+
echo "VM Name: $VM"
4246
echo Powering off and deleting any existing VMs named ${{ matrix.os }}*-amd64
4347
prlctl stop "$VM" --kill 2> /dev/null
4448
sleep 1
@@ -53,8 +57,8 @@ jobs:
5357
with:
5458
name: "${{ matrix.os }}-parallels-x86_64"
5559
path: |
56-
builds/*.box
57-
builds/*.json
60+
builds/testing_passed/x86_64/*.box
61+
builds/testing_passed/x86_64/*.json
5862
overwrite: true
5963
retention-days: 10
6064
compression-level: 0 # no compression

0 commit comments

Comments
 (0)