Skip to content

Commit

Permalink
podvm_mkosi: Add switch to build debug/non-debug image
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenhorsman committed Sep 9, 2024
1 parent 6c645ba commit 98275a3
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/e2e_run_all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/podvm_mkosi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/podvm_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ jobs:
with:
git_ref: ${{ github.sha }}
image_tag: ${{ github.sha }}
debug: false
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
with:
image_tag: ${{ github.event.release.tag_name }}
git_ref: ${{ github.ref }}
debug: false
secrets: inherit

webhook:
Expand Down

0 comments on commit 98275a3

Please sign in to comment.