From 98275a32ff76ba73b4b9ee206f424880f6dda142 Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Mon, 9 Sep 2024 16:44:02 +0100 Subject: [PATCH] podvm_mkosi: Add switch to build debug/non-debug image --- .github/workflows/e2e_run_all.yaml | 1 + .github/workflows/podvm_mkosi.yaml | 22 ++++++++++++++++++++-- .github/workflows/podvm_publish.yaml | 1 + .github/workflows/release.yaml | 1 + 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e_run_all.yaml b/.github/workflows/e2e_run_all.yaml index 076220e20..262601df1 100644 --- a/.github/workflows/e2e_run_all.yaml +++ b/.github/workflows/e2e_run_all.yaml @@ -72,6 +72,7 @@ jobs: registry: ${{ inputs.registry }} image_tag: ${{ inputs.podvm_image_tag }} git_ref: ${{ inputs.git_ref }} + debug: true secrets: inherit # Build and push the cloud-api-adaptor image diff --git a/.github/workflows/podvm_mkosi.yaml b/.github/workflows/podvm_mkosi.yaml index dc6618939..cd1c93462 100644 --- a/.github/workflows/podvm_mkosi.yaml +++ b/.github/workflows/podvm_mkosi.yaml @@ -18,6 +18,11 @@ on: description: Git ref to checkout the cloud-api-adaptor repository. required: true type: string + debug: + description: Whether to build the debug, or not-debug image + default: false + required: false + type: boolean workflow_call: inputs: @@ -37,6 +42,11 @@ on: description: Git ref to checkout the cloud-api-adaptor repository. required: true type: string + debug: + description: Whether to build the debug, or not-debug image + default: false + required: false + type: boolean defaults: run: @@ -228,9 +238,17 @@ jobs: tar xf podvm-binaries.tar -C podvm-mkosi/resources/binaries-tree rm podvm-binaries.tar - - name: Build mkosi debug image + - name: Build mkosi image + if: ${{ inputs.debug }} working-directory: src/cloud-api-adaptor/podvm-mkosi - run: make image-debug + run: | + if [ "${{inputs.debug}}" = "true" ]; then + echo "Making debug image" + make image-debug + else + echo "Making non-debug image" + make image + fi env: PUSH: true REGISTRY: ${{ inputs.registry }} diff --git a/.github/workflows/podvm_publish.yaml b/.github/workflows/podvm_publish.yaml index cc2da7bc4..4bdd0ae96 100644 --- a/.github/workflows/podvm_publish.yaml +++ b/.github/workflows/podvm_publish.yaml @@ -36,4 +36,5 @@ jobs: with: git_ref: ${{ github.sha }} image_tag: ${{ github.sha }} + debug: false secrets: inherit diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 655585abe..0a02c24ee 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -59,6 +59,7 @@ jobs: with: image_tag: ${{ github.event.release.tag_name }} git_ref: ${{ github.ref }} + debug: false secrets: inherit webhook: