Skip to content

Commit

Permalink
update default vmx_data (chef#1512)
Browse files Browse the repository at this point in the history
* update default vmx_data
* switch pipeline to bento build command
* added opensuse-leap-15-aarch64 and updated build workflows accordingly
* update vmware settings and add proper bento build failure exit status
* fixed bento arm64 metadata generation

---------

Signed-off-by: Corey Hemminger <[email protected]>
  • Loading branch information
Stromweld authored Jul 6, 2023
1 parent e8d4291 commit 465cb8a
Show file tree
Hide file tree
Showing 25 changed files with 213 additions and 119 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/pkr-bld-amazonlinux-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
on:
workflow_call:

env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

jobs:
x86_64:
runs-on: [self-hosted, X64, virtualbox]
Expand All @@ -18,15 +21,17 @@ jobs:
# with:
# version: latest
- name: Packer Init
env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
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: Packer build
run: ./AMZ_build_virtualbox-ovf.sh
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
ls -alh builds
- name: Remove VM in case of canceled job
if: cancelled()
run: |
Expand All @@ -38,7 +43,8 @@ jobs:
- name: Upload build artifact
uses: actions/upload-artifact@main
with:
name: "${{ matrix.os }}-virtualbox-x86_64.box"
name: "${{ matrix.os }}-virtualbox-x86_64"
path: |
builds/*.box
builds
!builds/uploaded/*
retention-days: 10
7 changes: 4 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:

env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

jobs:
x86_64:
runs-on: [self-hosted, X64, hyperv]
Expand Down Expand Up @@ -57,8 +60,6 @@ jobs:
# with:
# version: latest
- name: Packer Init
env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: packer init -upgrade packer_templates
- name: Packer FMT
run: packer fmt -check -recursive .
Expand All @@ -77,7 +78,7 @@ jobs:
- name: Upload build artifact
uses: actions/upload-artifact@main
with:
name: "${{ matrix.os }}-hyperv-x86_64.box"
name: "${{ matrix.os }}-hyperv-x86_64"
path: |
builds/*.box
retention-days: 10
17 changes: 12 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:

env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

jobs:
aarch64:
runs-on: [self-hosted, ARM64, parallels]
Expand All @@ -21,6 +24,7 @@ jobs:
- fedora-38
- freebsd-12
- freebsd-13
- opensuse-leap-15
- oracle-7
- oracle-8
- oracle-9
Expand All @@ -45,15 +49,17 @@ jobs:
# with:
# version: latest
- name: Packer Init
env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
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
# 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
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: Remove VM in case of canceled job
if: cancelled()
run: |
Expand All @@ -66,7 +72,8 @@ jobs:
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: "${{ matrix.os }}-parallels-aarch64.box"
name: "${{ matrix.os }}-parallels-aarch64"
path: |
builds/*.box
builds
!builds/uploaded/*
retention-days: 10
16 changes: 11 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:

env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

jobs:
x86_64:
runs-on: [self-hosted, X64, parallels]
Expand Down Expand Up @@ -55,15 +58,17 @@ jobs:
# with:
# version: latest
- name: Packer Init
env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
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: Packer build
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
# 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
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"
ls -alh builds
- name: Remove VM in case of canceled job
if: cancelled()
run: |
Expand All @@ -76,7 +81,8 @@ jobs:
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: "${{ matrix.os }}-parallels-x86_64.box"
name: "${{ matrix.os }}-parallels-x86_64"
path: |
builds/*.box
builds
!builds/uploaded/*
retention-days: 10
17 changes: 12 additions & 5 deletions .github/workflows/pkr-bld-qemu-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
on:
workflow_call:

env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

jobs:
aarch64:
runs-on: [self-hosted, ARM64, qemu]
Expand All @@ -21,6 +24,7 @@ jobs:
- fedora-38
- freebsd-12
- freebsd-13
- opensuse-leap-15
- oracle-7
- oracle-8
- oracle-9
Expand All @@ -45,19 +49,22 @@ jobs:
# with:
# version: latest
- name: Packer Init
env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
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 "qemu_accelerator=hvf" -var-file=os_pkrvars/$(echo ${{ matrix.os }} | cut -d "-" -f 1)/"${{ matrix.os }}-aarch64.pkrvars.hcl" packer_templates
# 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"
ls -alh builds
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: "${{ matrix.os }}-qemu-aarch64.box"
name: "${{ matrix.os }}-qemu-aarch64"
path: |
builds/*.box
builds
!builds/uploaded/*
retention-days: 10
16 changes: 11 additions & 5 deletions .github/workflows/pkr-bld-qemu-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
on:
workflow_call:

env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

jobs:
x86_64:
runs-on: [self-hosted, X64, qemu]
Expand Down Expand Up @@ -57,19 +60,22 @@ jobs:
# with:
# version: latest
- name: Packer Init
env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
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: Packer build
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: 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"
ls -alh builds
- name: Upload build artifact
uses: actions/upload-artifact@main
with:
name: "${{ matrix.os }}-qemu-x86_64.box"
name: "${{ matrix.os }}-qemu-x86_64"
path: |
builds/*.box
builds
!builds/uploaded/*
retention-days: 10
17 changes: 12 additions & 5 deletions .github/workflows/pkr-bld-virtualbox-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
on:
workflow_call:

env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

jobs:
aarch64:
runs-on: [self-hosted, ARM64, virtualbox]
Expand All @@ -21,6 +24,7 @@ jobs:
- fedora-38
- freebsd-12
- freebsd-13
- opensuse-leap-15
- oracle-7
- oracle-8
- oracle-9
Expand All @@ -45,15 +49,17 @@ jobs:
# with:
# version: latest
- name: Packer Init
env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
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
# 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
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: Remove VM in case of canceled job
if: cancelled()
run: |
Expand All @@ -65,7 +71,8 @@ jobs:
- name: Upload build artifact
uses: actions/upload-artifact@main
with:
name: "${{ matrix.os }}-virtualbox-aarch64.box"
name: "${{ matrix.os }}-virtualbox-aarch64"
path: |
builds/*.box
builds
!builds/uploaded/*
retention-days: 10
16 changes: 11 additions & 5 deletions .github/workflows/pkr-bld-virtualbox-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
on:
workflow_call:

env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

jobs:
x86_64:
runs-on: [self-hosted, X64, virtualbox]
Expand Down Expand Up @@ -55,15 +58,17 @@ jobs:
# with:
# version: latest
- name: Packer Init
env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
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: Packer build
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
# 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
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"
ls -alh builds
- name: Remove VM in case of canceled job
if: cancelled()
run: |
Expand All @@ -75,7 +80,8 @@ jobs:
- name: Upload build artifact
uses: actions/upload-artifact@main
with:
name: "${{ matrix.os }}-virtualbox-x86_64.box"
name: "${{ matrix.os }}-virtualbox-x86_64"
path: |
builds/*.box
builds
!builds/uploaded/*
retention-days: 10
17 changes: 12 additions & 5 deletions .github/workflows/pkr-bld-vmware-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
on:
workflow_call:

env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

jobs:
aarch64:
runs-on: [self-hosted, ARM64, vmware-fusion]
Expand All @@ -21,6 +24,7 @@ jobs:
- fedora-38
- freebsd-12
- freebsd-13
- opensuse-leap-15
- oracle-7
- oracle-8
- oracle-9
Expand All @@ -45,15 +49,17 @@ jobs:
# with:
# version: latest
- name: Packer Init
env:
PACKER_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
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
# 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
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: Remove VM in case of canceled job
if: cancelled()
run: |
Expand All @@ -65,7 +71,8 @@ jobs:
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: "${{ matrix.os }}-vmware-aarch64.box"
name: "${{ matrix.os }}-vmware-aarch64"
path: |
builds/*.box
builds
!builds/uploaded/*
retention-days: 10
Loading

0 comments on commit 465cb8a

Please sign in to comment.