Skip to content

Commit

Permalink
Merge pull request #2 from devmuppet/chef-main
Browse files Browse the repository at this point in the history
Chef main
  • Loading branch information
devmuppet authored Nov 23, 2023
2 parents 3c85a95 + c663cce commit d124207
Show file tree
Hide file tree
Showing 145 changed files with 4,572 additions and 3,499 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,9 @@ jobs:
powershell-lint:
uses: chef/github-workflows/.github/workflows/powershell-lint.yml@main

packer-iso-check:
uses: chef/github-workflows/.github/workflows/packer-iso-url-checker.yml@main

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-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 @@ -84,8 +77,6 @@ jobs:
- xml-lint
- powershell-lint
- shellcheck-lint
- packer-iso-check
- packer-lint
runs-on: Ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
Expand Down
30 changes: 20 additions & 10 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 @@ -13,20 +16,26 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup Packer
uses: hashicorp/setup-packer@main
with:
version: latest
# - name: Setup Packer
# uses: hashicorp/setup-packer@main
# 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
- name: Bento build
run: |
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"
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 All @@ -38,7 +47,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
38 changes: 15 additions & 23 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 All @@ -14,34 +17,25 @@ jobs:
- centos-7
- centos-stream-8
- centos-stream-9
- debian-10
- debian-11
- fedora-36
- fedora-37
- debian-12
- fedora-38
- fedora-39
- freebsd-12
- freebsd-13
- opensuse-leap-15
- oraclelinux-7
- oraclelinux-8
- oraclelinux-9
- oracle-7
- oracle-8
- oracle-9
- rockylinux-8
- rockylinux-9
- scientificlinux-7
- springdalelinux-7
- springdalelinux-8
- springdalelinux-9
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
# - windows-10
# - windows-10gen2
# - windows-11
# - windows-11gen2
# - windows-2012r2
# - windows-2016
# - windows-2019
# - windows-2022
- ubuntu-23.04
provider:
- hyperv-iso
steps:
Expand All @@ -50,13 +44,11 @@ jobs:
- 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
uses: hashicorp/setup-packer@main
with:
version: latest
# - name: Setup Packer
# uses: hashicorp/setup-packer@main
# 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 @@ -75,7 +67,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
38 changes: 25 additions & 13 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 @@ -14,19 +17,21 @@ jobs:
- centos-7
- centos-stream-8
- centos-stream-9
- debian-10
- debian-11
- fedora-36
- fedora-37
- oraclelinux-7
- oraclelinux-8
- oraclelinux-9
- debian-12
- fedora-38
- fedora-39
- freebsd-12
- freebsd-13
- opensuse-leap-15
- oracle-7
- oracle-8
- oracle-9
- rockylinux-8
- rockylinux-9
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
provider:
- parallels-iso
steps:
Expand All @@ -41,15 +46,21 @@ 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: Bento Test
# run: |
# eval "$(chef shell-init bash)"
# bento test
- name: Remove VM in case of canceled job
if: cancelled()
run: |
Expand All @@ -62,7 +73,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
49 changes: 26 additions & 23 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 All @@ -14,32 +17,25 @@ jobs:
- centos-7
- centos-stream-8
- centos-stream-9
- debian-10
- debian-11
- fedora-36
- fedora-37
- debian-12
- fedora-38
- fedora-39
- freebsd-12
- freebsd-13
- opensuse-leap-15
- oraclelinux-7
- oraclelinux-8
- oraclelinux-9
- oracle-7
- oracle-8
- oracle-9
- rockylinux-8
- rockylinux-9
- scientificlinux-7
- springdalelinux-7
- springdalelinux-8
- springdalelinux-9
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
# - windows-10
# - windows-11
# - windows-2012r2
# - windows-2016
# - windows-2019
# - windows-2022
- ubuntu-23.04
provider:
- parallels-iso
steps:
Expand All @@ -48,20 +44,26 @@ jobs:
- 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
uses: hashicorp/setup-packer@main
with:
version: latest
# - name: Setup Packer
# uses: hashicorp/setup-packer@main
# 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: Bento Test
# run: |
# eval "$(chef shell-init bash)"
# bento test
- name: Remove VM in case of canceled job
if: cancelled()
run: |
Expand All @@ -74,7 +76,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
Loading

0 comments on commit d124207

Please sign in to comment.