Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add arm64 iso building to master/releases #716

Merged
merged 1 commit into from
Sep 24, 2021
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
12 changes: 12 additions & 0 deletions .github/build.yaml.gomplate
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,15 @@
{{{- end }}}
{{{- if and $config.skip_images_flavor (has $config.skip_images_flavor $flavor) }}}
{{{- else }}}
{{{- if $config.build_raw_image }}}
- raw-images-{{{ $flavor }}}
{{{- end }}}
{{{- if $config.build_image_vbox }}}
- vbox-nonsquashfs-{{{ $flavor }}}
{{{- end }}}
{{{- if $config.build_image_qemu }}}
- qemu-nonsquashfs-{{{ $flavor }}}
{{{- end }}}
- iso-nonsquashfs-{{{ $flavor }}}
{{{- end }}}
- image-link-{{{ $flavor }}}
Expand Down Expand Up @@ -457,6 +463,7 @@
with:
name: cOS-nonsquashfs-{{{ $flavor }}}-{{{ $config.arch }}}.iso.zip
path: release
{{{- if $config.build_image_vbox }}}
- name: Download vagrant box
uses: actions/download-artifact@v2
with:
Expand All @@ -467,11 +474,15 @@
with:
name: cOS-nonsquashfs-{{{ $flavor }}}-{{{ $config.arch }}}.ova
path: release
{{{- end }}}
{{{- if $config.build_image_qemu }}}
- name: Download QCOW image
uses: actions/download-artifact@v2
with:
name: cOS-nonsquashfs-{{{ $flavor }}}-{{{ $config.arch }}}.qcow
path: release
{{{- end }}}
{{{- if $config.build_raw_image }}}
- name: Download GCE RAW image
uses: actions/download-artifact@v2
with:
Expand All @@ -487,6 +498,7 @@
with:
name: cOS-Vanilla-RAW-{{{ $flavor }}}-${{ env.COS_VERSION }}-{{{ $config.arch }}}
path: release
{{{- end }}}
{{{- end}}}
- name: Download Image links
uses: actions/download-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/config/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ arches:
skip_tests: true
flavors: [ "green" ]
skip_tests_flavor: [ "green","blue","orange" ]
skip_images_flavor: [ "green", "blue","orange" ]
skip_images_flavor: [ "blue","orange" ]
build_image_qemu: false
build_image_vbox: false
build_raw_image: false
Expand Down
2 changes: 1 addition & 1 deletion .github/config/releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ arches:
skip_tests: true
flavors: [ "green" ]
skip_tests_flavor: [ "green","blue","orange" ]
skip_images_flavor: [ "green", "blue","orange" ]
skip_images_flavor: [ "blue","orange" ]
build_image_qemu: false
build_image_vbox: false
build_raw_image: false
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/build-master-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,102 @@ jobs:
name: build-green-arm64
path: build
if-no-files-found: error
iso-squashfs-green:
runs-on: [self-hosted, arm64]
needs: build-green-arm64
env:
FINAL_REPO: quay.io/costoolkit/releases-green-arm64
LUET_ARCH: arm64
FLAVOR: green
ARCH: arm64
steps:
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow
- name: Download result for build
uses: actions/download-artifact@v2
with:
name: build-green-arm64
path: build
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y xorriso squashfs-tools
- name: Run make deps
run: |
sudo -E make deps
sudo luet install --no-spinner -y toolchain/yq
- name: Export cos version
run: |
source .github/helpers.sh
echo "COS_VERSION=$(cos_version)" >> $GITHUB_ENV
- name: Build ISO from local build 🔧
if: github.event_name != 'schedule' && !startsWith(github.ref, 'refs/tags/')
run: |
source .github/helpers.sh
create_remote_manifest manifest.yaml
sudo -E MAKEISO_ARGS="--output cOS-Seed-green-${{ env.COS_VERSION }}-arm64" MANIFEST=manifest.yaml.remote make local-iso
- name: Build ISO from remote repositories 🔧
if: github.event_name == 'schedule' || startsWith(github.ref, 'refs/tags/')
run: |
sudo -E YQ=/usr/bin/yq MAKEISO_ARGS="--output cOS-Seed-green-${{ env.COS_VERSION }}-arm64" make iso
- uses: actions/upload-artifact@v2
with:
name: cOS-squashfs-green-arm64.iso.zip
path: |
*.iso
*.sha256
if-no-files-found: error
iso-nonsquashfs-green:
runs-on: [self-hosted, arm64]
needs: build-green-arm64
env:
FINAL_REPO: quay.io/costoolkit/releases-green-arm64
LUET_ARCH: arm64
FLAVOR: green
ARCH: arm64
steps:
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow
- name: Download result for build
uses: actions/download-artifact@v2
with:
name: build-green-arm64
path: build
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y xorriso squashfs-tools
- name: Run make deps
run: |
sudo -E make deps
sudo luet install --no-spinner -y toolchain/yq
- name: Tweak manifest and drop squashfs recovery
run: |
source .github/helpers.sh
drop_recovery manifest.yaml
- name: Export cos version
run: |
source .github/helpers.sh
echo "COS_VERSION=$(cos_version)" >> $GITHUB_ENV
- name: Build ISO from local build 🔧
if: github.event_name != 'schedule' && !startsWith(github.ref, 'refs/tags/')
run: |
source .github/helpers.sh
create_remote_manifest manifest.yaml
sudo -E MAKEISO_ARGS="--output cOS-Seed-green-${{ env.COS_VERSION }}-arm64" MANIFEST=manifest.yaml.remote make local-iso
- name: Build ISO from remote repositories 🔧
if: github.event_name == 'schedule' || startsWith(github.ref, 'refs/tags/')
run: |
sudo -E YQ=/usr/bin/yq MAKEISO_ARGS="--output cOS-Seed-green-${{ env.COS_VERSION }}-arm64" make iso
- uses: actions/upload-artifact@v2
with:
name: cOS-nonsquashfs-green-arm64.iso.zip
path: |
*.iso
*.sha256
if-no-files-found: error
image-link-green:
runs-on: ubuntu-latest
needs: publish-green
Expand All @@ -104,6 +200,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- build-green-arm64
- iso-squashfs-green
env:
FLAVOR: green
ARCH: arm64
Expand Down
103 changes: 103 additions & 0 deletions .github/workflows/build-releases-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,102 @@ jobs:
name: build-green-arm64
path: build
if-no-files-found: error
iso-squashfs-green:
runs-on: [self-hosted, arm64]
needs: build-green-arm64
env:
FINAL_REPO: quay.io/costoolkit/releases-green-arm64
LUET_ARCH: arm64
FLAVOR: green
ARCH: arm64
steps:
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow
- name: Download result for build
uses: actions/download-artifact@v2
with:
name: build-green-arm64
path: build
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y xorriso squashfs-tools
- name: Run make deps
run: |
sudo -E make deps
sudo luet install --no-spinner -y toolchain/yq
- name: Export cos version
run: |
source .github/helpers.sh
echo "COS_VERSION=$(cos_version)" >> $GITHUB_ENV
- name: Build ISO from local build 🔧
if: github.event_name != 'schedule' && !startsWith(github.ref, 'refs/tags/')
run: |
source .github/helpers.sh
create_remote_manifest manifest.yaml
sudo -E MAKEISO_ARGS="--output cOS-Seed-green-${{ env.COS_VERSION }}-arm64" MANIFEST=manifest.yaml.remote make local-iso
- name: Build ISO from remote repositories 🔧
if: github.event_name == 'schedule' || startsWith(github.ref, 'refs/tags/')
run: |
sudo -E YQ=/usr/bin/yq MAKEISO_ARGS="--output cOS-Seed-green-${{ env.COS_VERSION }}-arm64" make iso
- uses: actions/upload-artifact@v2
with:
name: cOS-squashfs-green-arm64.iso.zip
path: |
*.iso
*.sha256
if-no-files-found: error
iso-nonsquashfs-green:
runs-on: [self-hosted, arm64]
needs: build-green-arm64
env:
FINAL_REPO: quay.io/costoolkit/releases-green-arm64
LUET_ARCH: arm64
FLAVOR: green
ARCH: arm64
steps:
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow
- name: Download result for build
uses: actions/download-artifact@v2
with:
name: build-green-arm64
path: build
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y xorriso squashfs-tools
- name: Run make deps
run: |
sudo -E make deps
sudo luet install --no-spinner -y toolchain/yq
- name: Tweak manifest and drop squashfs recovery
run: |
source .github/helpers.sh
drop_recovery manifest.yaml
- name: Export cos version
run: |
source .github/helpers.sh
echo "COS_VERSION=$(cos_version)" >> $GITHUB_ENV
- name: Build ISO from local build 🔧
if: github.event_name != 'schedule' && !startsWith(github.ref, 'refs/tags/')
run: |
source .github/helpers.sh
create_remote_manifest manifest.yaml
sudo -E MAKEISO_ARGS="--output cOS-Seed-green-${{ env.COS_VERSION }}-arm64" MANIFEST=manifest.yaml.remote make local-iso
- name: Build ISO from remote repositories 🔧
if: github.event_name == 'schedule' || startsWith(github.ref, 'refs/tags/')
run: |
sudo -E YQ=/usr/bin/yq MAKEISO_ARGS="--output cOS-Seed-green-${{ env.COS_VERSION }}-arm64" make iso
- uses: actions/upload-artifact@v2
with:
name: cOS-nonsquashfs-green-arm64.iso.zip
path: |
*.iso
*.sha256
if-no-files-found: error
image-link-green:
runs-on: ubuntu-latest
needs: publish-green
Expand All @@ -104,6 +200,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- build-green-arm64
- iso-squashfs-green
env:
FLAVOR: green
ARCH: arm64
Expand Down Expand Up @@ -157,6 +254,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- build-green-arm64
- iso-nonsquashfs-green
- image-link-green
env:
FLAVOR: green
Expand All @@ -171,6 +269,11 @@ jobs:
run: |
source .github/helpers.sh
echo "COS_VERSION=$(cos_version)" >> $GITHUB_ENV
- name: Download ISO
uses: actions/download-artifact@v2
with:
name: cOS-nonsquashfs-green-arm64.iso.zip
path: release
- name: Download Image links
uses: actions/download-artifact@v2
with:
Expand Down