diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 70b999ddb..96aaad8ad 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -304,7 +304,8 @@ jobs: mkdir reports mv release/*.json reports/ cd reports - sudo tar cvf "kairos-core-${{matrix.flavor}}-amd64-generic-${VERSION}-scan-reports.tar.gz" *.json + filename=$(ls *-grype.json | head -n 1) && filename=${filename%%-grype.json} + sudo tar cvf "${filename}-scan-reports.tar.gz" *.json mv *.tar.gz ../release/ cd .. sudo rm -rf release/IMAGE release/VERSION release/versions.yaml diff --git a/.github/workflows/reusable-upgrade-latest-test.yaml b/.github/workflows/reusable-upgrade-latest-test.yaml index 6504bc9a4..8183bfca3 100644 --- a/.github/workflows/reusable-upgrade-latest-test.yaml +++ b/.github/workflows/reusable-upgrade-latest-test.yaml @@ -57,9 +57,7 @@ jobs: # A flag to set the download target as latest release # The default value is 'false' latest: true - # TODO: v2.4.2 Enable once we have a release with the new naming - # fileName: 'kairos-${{ inputs.flavor }}-${{ inputs.flavor_release }}*core-amd64-generic*.iso' - fileName: 'kairos-core-${{ inputs.flavor }}*-amd64-generic*.iso' + fileName: 'kairos-${{ inputs.flavor }}-${{ inputs.flavor_release }}*core-amd64-generic*.iso' out-file-path: "" - name: Display structure of downloaded files run: ls -las . @@ -75,9 +73,7 @@ jobs: - run: | # release-downloader globing matches more than one iso. Make sure # we use the right one. - # TODO: v2.4.2 Enable once we have a release with the new naming - # ISO=$(ls kairos-${{ inputs.family }}-${{ inputs.flavor_release }}*core-amd64-generic-v*.iso | grep -v ipxe | head -n 1) - ISO=$(ls kairos-core-${{ inputs.family }}*-amd64-generic-v*.iso | grep -v ipxe | head -n 1) + ISO=$(ls kairos-${{ inputs.family }}-${{ inputs.flavor_release }}*core-amd64-generic-v*.iso | grep -v ipxe | head -n 1) earthly +run-qemu-test --PREBUILT_ISO=$ISO \ --CONTAINER_IMAGE=ttl.sh/kairos-${{ inputs.flavor }}-${{ inputs.flavor_release }}-${{ github.sha }}:24h \ --TEST_SUITE=upgrade-latest-with-cli diff --git a/Earthfile b/Earthfile index 2bb143137..c75860d37 100644 --- a/Earthfile +++ b/Earthfile @@ -788,6 +788,23 @@ netboot: SAVE ARTIFACT /build/$ISO_NAME-initrd initrd AS LOCAL build/$ISO_NAME-initrd SAVE ARTIFACT /build/$ISO_NAME.ipxe ipxe AS LOCAL build/$ISO_NAME.ipxe +artifact-name: + ARG TARGETARCH + ARG --required FAMILY + ARG --required FLAVOR + ARG --required FLAVOR_RELEASE + ARG --required VARIANT + ARG --required MODEL + ARG --required BASE_IMAGE + ARG --required NAMING_FUNC + ARG --required NAMING_EXT + ARG --required KAIROS_VERSION + FROM ubuntu + + COPY ./naming.sh /usr/bin/local/naming.sh + RUN echo $(/usr/bin/local/naming.sh ${NAMING_FUNC})${NAMING_EXT} > /ARTIFACT_NAME + SAVE ARTIFACT /ARTIFACT_NAME ARTIFACT_NAME + arm-image: ARG OSBUILDER_IMAGE ARG COMPRESS_IMG=true @@ -795,8 +812,8 @@ arm-image: FROM $OSBUILDER_IMAGE COPY +version/VERSION ./ - RUN echo "version ${VERSION}" ARG KAIROS_VERSION=$(cat VERSION) + RUN echo "version ${KAIROS_VERSION}" ARG TARGETARCH ARG --required FAMILY @@ -806,9 +823,9 @@ arm-image: ARG --required MODEL ARG --required BASE_IMAGE - COPY ./naming.sh . - ARG IMAGE_NAME=$(./naming.sh bootable_artifact_name).img - RUN echo $IMAGE_NAME + COPY --platform=linux/arm64 (+artifact-name/ARTIFACT_NAME --KAIROS_VERSION=${KAIROS_VERSION} --NAMING_FUNC=bootable_artifact_name --NAMING_EXT=".img") /ARTIFACT_NAME + ARG IMAGE_NAME=$(cat /ARTIFACT_NAME) + RUN rm /ARTIFACT_NAME WORKDIR /build # These sizes are in MB ENV SIZE="15200" @@ -861,8 +878,8 @@ prepare-arm-image: ARG --required BASE_IMAGE ARG --required MODEL - COPY ./naming.sh . - ARG IMAGE_NAME=$(./naming.sh bootable_artifact_name).img + COPY --platform=linux/arm64 (+artifact-name/ARTIFACT_NAME --KAIROS_VERSION=${KAIROS_VERSION} --NAMING_FUNC=bootable_artifact_name --NAMING_EXT=".img") /ARTIFACT_NAME + ARG IMAGE_NAME=$(cat /ARTIFACT_NAME) WORKDIR /build # These sizes are in MB @@ -1131,6 +1148,12 @@ run-qemu-test: IF [ -n "$PREBUILT_ISO" ] ENV ISO=/test/$PREBUILT_ISO ELSE + ARG --required FLAVOR + ARG --required FLAVOR_RELEASE + ARG --required FAMILY + ARG --required BASE_IMAGE + ARG --required MODEL + ARG --required VARIANT COPY +iso/kairos.iso kairos.iso ENV ISO=/test/kairos.iso END