Skip to content

Commit

Permalink
ci: fix azure nightly mkosi build
Browse files Browse the repository at this point in the history
Due to a rebase fail, the workflow attempted to use the ubuntu mkosi
build. Reverted to building using nix to stay close to the documented
procedure. If we opt to use the ubuntu-packaged mkosi, more testing is
required and we should change it everywhere.

In the mid-term this makes sense, because currently mkosi is marked as
broken in nixos-24.05 and nix-unstable. the version we have pinned in
the nix flake (v17) is rather old now.

Drive-by fix: sudo is not required for mkosi images on Ubuntu 22.04

Signed-off-by: Magnus Kulke <magnuskulke@microsoft.com>
  • Loading branch information
mkulke authored and davidhIBM committed Oct 23, 2024
1 parent 0656034 commit 68e3f6c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/azure-podvm-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ env:

jobs:
build-podvm-image:
runs-on: ubuntu-24.04
runs-on: ubuntu-22.04
defaults:
run:
working-directory: cloud-api-adaptor/src/cloud-api-adaptor/podvm-mkosi
Expand All @@ -49,7 +49,7 @@ jobs:
path: cloud-api-adaptor
ref: "${{ inputs.git-ref || 'main' }}"

- uses: cachix/install-nix-action@v27
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable

Expand All @@ -66,11 +66,7 @@ jobs:
ATTESTER="az-snp-vtpm-attester,az-tdx-vtpm-attester" make binaries
- name: Build image
run: |
touch resources/buildBootableImage
sudo mkosi --environment=VARIANT_ID=production
ln -s "$(which nix)" /usr/local/bin/nix
sudo make image-debug
run: make image

- uses: azure/login@v2
name: 'Az CLI login'
Expand Down

0 comments on commit 68e3f6c

Please sign in to comment.