-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: extract ISO image from build/manifest.json
- Loading branch information
Showing
1 changed file
with
68 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,8 @@ jobs: | |
build_version: ${{ steps.set_env_variables.outputs.build_version }} | ||
TIMESTAMP: ${{ steps.set_env_variables.outputs.TIMESTAMP }} | ||
PREVIOUS_SUCCESS_BUILD_TIMESTAMP: ${{ steps.set_env_variables.outputs.PREVIOUS_SUCCESS_BUILD_TIMESTAMP }} | ||
generic_image_iso: ${{ steps.build_generic_iso.outputs.generic_image_iso }} | ||
generic_image_name: ${{ steps.build_generic_iso.outputs.generic_image_name }} | ||
|
||
steps: | ||
### Initialization ### | ||
|
@@ -95,39 +97,54 @@ jobs: | |
- name: Clone vyos-build source code | ||
uses: actions/checkout@v4 | ||
with: | ||
# Clone to sub-path required for minisign binary shipped in this repo | ||
# This might change with future Debian versions when they ship minisign | ||
repository: vyos/vyos-build | ||
path: vyos-build | ||
|
||
- name: Build generic ISO image | ||
id: build_generic_iso | ||
run: | | ||
cd vyos-build | ||
sudo --preserve-env ./build-vyos-image \ | ||
--architecture amd64 \ | ||
--build-by $BUILD_BY \ | ||
--build-type release \ | ||
--custom-package vyos-1x-smoketest \ | ||
--debian-mirror $DEBIAN_MIRROR \ | ||
--debian-security-mirror $DEBIAN_SECURITY_MIRROR \ | ||
--version ${{ steps.set_env_variables.outputs.build_version }} \ | ||
--vyos-mirror $VYOS_MIRROR \ | ||
generic | ||
# move artifact one level up for minisign | ||
mv build/vyos-${{ steps.set_env_variables.outputs.build_version }}-generic-amd64.iso .. | ||
- name: Sign generic ISO image | ||
shell: bash | ||
run: | | ||
echo "${{ secrets.minisign_private_key }}" > /tmp/minisign.key | ||
echo ${{ secrets.minisign_password }} | $GITHUB_WORKSPACE/bin/minisign -s /tmp/minisign.key -Sm vyos-${{ steps.set_env_variables.outputs.build_version }}-generic-amd64.iso | ||
# sudo --preserve-env ./build-vyos-image \ | ||
# --architecture amd64 \ | ||
# --build-by $BUILD_BY \ | ||
# --build-type release \ | ||
# --custom-package vyos-1x-smoketest \ | ||
# --debian-mirror $DEBIAN_MIRROR \ | ||
# --debian-security-mirror $DEBIAN_SECURITY_MIRROR \ | ||
# --version ${{ steps.set_env_variables.outputs.build_version }} \ | ||
# --vyos-mirror $VYOS_MIRROR \ | ||
# generic | ||
mkdir build | ||
cd build | ||
GENERIC_IMAGE_NAME="vyos-1.5-rolling-202412310006-generic-amd64" | ||
GENERIC_IMAGE_ISO="vyos-1.5-rolling-202412310006-generic-amd64.iso" | ||
wget -O ${GENERIC_IMAGE_ISO} https://github.com/vyos/vyos-nightly-build/releases/download/1.5-rolling-202412310006/vyos-1.5-rolling-202412310006-generic-amd64.iso | ||
ls -al . | ||
#GENERIC_IMAGE_NAME=$(jq --raw-output .artifacts[0] manifest.json | sed -e 's/.iso//') | ||
#GENERIC_IMAGE_ISO=$(jq --raw-output .artifacts[0] manifest.json) | ||
echo "generic_image_iso=${GENERIC_IMAGE_ISO}" >> $GITHUB_OUTPUT | ||
echo "generic_image_name=${GENERIC_IMAGE_NAME}" >> $GITHUB_OUTPUT | ||
# Sign build artifact | ||
echo "${{ secrets.minisign_public_key }}" > /tmp/minisign.pub | ||
$GITHUB_WORKSPACE/bin/minisign -Vm vyos-${{ steps.set_env_variables.outputs.build_version }}-generic-amd64.iso -x vyos-${{ steps.set_env_variables.outputs.build_version }}-generic-amd64.iso.minisig -p /tmp/minisign.pub | ||
rm /tmp/minisign.key /tmp/minisign.pub | ||
echo "${{ secrets.minisign_private_key }}" > /tmp/minisign.key | ||
echo "${{ secrets.minisign_password }}" | $GITHUB_WORKSPACE/bin/minisign -s /tmp/minisign.key -Sm ${GENERIC_IMAGE_ISO} | ||
$GITHUB_WORKSPACE/bin/minisign -Vm ${GENERIC_IMAGE_ISO} -x ${GENERIC_IMAGE_ISO}.minisig -p /tmp/minisign.pub | ||
rm -f /tmp/minisign.key /tmp/minisign.pub | ||
pwd | ||
- name: Debug artifact path | ||
run: | | ||
echo "Artifact path: **/${{ steps.build_generic_iso.outputs.generic_image_name }}*" | ||
find . -name "${{ steps.build_generic_iso.outputs.generic_image_name }}*" | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: vyos-${{ steps.set_env_variables.outputs.build_version }}-generic-amd64 | ||
path: vyos-${{ steps.set_env_variables.outputs.build_version }}-* | ||
name: ${{ steps.build_generic_iso.outputs.generic_image_name }} | ||
path: "**/${{ steps.build_generic_iso.outputs.generic_image_name }}*" | ||
retention-days: 30 | ||
if-no-files-found: error | ||
|
||
|
@@ -146,14 +163,14 @@ jobs: | |
repository: vyos/vyos-build | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64 | ||
name: ${{ needs.build_iso.outputs.generic_image_name }} | ||
path: build | ||
- name: VyOS CLI smoketests (no interfaces) | ||
id: test | ||
shell: bash | ||
run: | | ||
set -e | ||
ln -s vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64.iso build/live-image-amd64.hybrid.iso | ||
ln -s ${{ needs.build_iso.outputs.generic_image_iso }} build/live-image-amd64.hybrid.iso | ||
sudo make test-no-interfaces | tee smoketest_make_test_no_interfaces.log | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
@@ -177,14 +194,14 @@ jobs: | |
repository: vyos/vyos-build | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64 | ||
name: ${{ needs.build_iso.outputs.generic_image_name }} | ||
path: build | ||
- name: VyOS CLI smoketests (interfaces only) | ||
id: test | ||
shell: bash | ||
run: | | ||
set -e | ||
ln -s vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64.iso build/live-image-amd64.hybrid.iso | ||
ln -s ${{ needs.build_iso.outputs.generic_image_iso }} build/live-image-amd64.hybrid.iso | ||
sudo make test-interfaces | tee smoketest_make_test_interfaces.log | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
@@ -208,14 +225,14 @@ jobs: | |
repository: vyos/vyos-build | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64 | ||
name: ${{ needs.build_iso.outputs.generic_image_name }} | ||
path: build | ||
- name: VyOS config load tests | ||
id: test | ||
shell: bash | ||
run: | | ||
set -e | ||
ln -s vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64.iso build/live-image-amd64.hybrid.iso | ||
ln -s ${{ needs.build_iso.outputs.generic_image_iso }} build/live-image-amd64.hybrid.iso | ||
sudo make testc | tee smoketest_make_testc.log | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
@@ -239,14 +256,28 @@ jobs: | |
repository: vyos/vyos-build | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64 | ||
path: build | ||
name: ${{ needs.build_iso.outputs.generic_image_name }} | ||
#path: build | ||
- name: VyOS RAID1 installation tests | ||
id: test | ||
shell: bash | ||
env: | ||
GENERIC_IMAGE_NAME: ${{ needs.build_iso.outputs.generic_image_name }} | ||
run: | | ||
set -e | ||
ln -s vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64.iso build/live-image-amd64.hybrid.iso | ||
env | ||
echo "Generic Image Name: $GENERIC_IMAGE_NAME" | ||
echo ls -al | ||
ls -al | ||
mv $GENERIC_IMAGE_NAME build | ||
echo ls -al build | ||
ls -al build | ||
echo ls -al build/${{ needs.build_iso.outputs.generic_image_name }} | ||
ls -al build/${{ needs.build_iso.outputs.generic_image_name }} | ||
mv build/${{ needs.build_iso.outputs.generic_image_name }}/* build/ | ||
ls -al build | ||
ln -s ${{ needs.build_iso.outputs.generic_image_iso }} build/live-image-amd64.hybrid.iso | ||
ls -al build | ||
sudo make testraid | tee smoketest_make_testraid.log | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
@@ -270,14 +301,14 @@ jobs: | |
repository: vyos/vyos-build | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64 | ||
name: ${{ needs.build_iso.outputs.generic_image_name }} | ||
path: build | ||
- name: VyOS TPM encryption tests | ||
id: test | ||
shell: bash | ||
run: | | ||
set -e | ||
ln -s vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64.iso build/live-image-amd64.hybrid.iso | ||
ln -s ${{ needs.build_iso.outputs.generic_image_iso }} build/live-image-amd64.hybrid.iso | ||
sudo make testtpm | tee smoketest_make_testtpm.log | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
@@ -295,7 +326,7 @@ jobs: | |
- test_encrypted_config_tpm | ||
- build_iso | ||
runs-on: ubuntu-24.04 | ||
if: failure() | ||
if: failure() && github.ref == 'refs/heads/current' | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
|
@@ -448,7 +479,7 @@ jobs: | |
json: | | ||
[ | ||
{ | ||
"url": "https://github.com/vyos/vyos-nightly-build/releases/download/${{ needs.build_iso.outputs.build_version }}/vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64.iso", | ||
"url": "https://github.com/vyos/vyos-nightly-build/releases/download/${{ needs.build_iso.outputs.build_version }}/${{ steps.build_generic_iso.outputs.generic_image_iso }}", | ||
"version": "${{ needs.build_iso.outputs.build_version }}", | ||
"timestamp": "${{ needs.build_iso.outputs.TIMESTAMP }}" | ||
} | ||
|
@@ -469,7 +500,7 @@ jobs: | |
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64 | ||
name: ${{ needs.build_iso.outputs.generic_image_name }} | ||
|
||
- name: "Release publishing: publish release" | ||
uses: softprops/action-gh-release@v2 | ||
|
@@ -478,8 +509,8 @@ jobs: | |
tag_name: ${{ needs.build_iso.outputs.build_version }} | ||
fail_on_unmatched_files: true | ||
files: | | ||
./vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64.iso | ||
./vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64.iso.minisig | ||
./${{ steps.build_generic_iso.outputs.generic_image_iso }} | ||
./${{ steps.build_generic_iso.outputs.generic_image_iso }}.minisig | ||
- uses: Nats-ji/[email protected] | ||
with: | ||
|