Skip to content

Commit

Permalink
WIP: runner uses kernel prebuilt for correct arch
Browse files Browse the repository at this point in the history
Signed-off-by: Misha Sakhnov <[email protected]>
  • Loading branch information
mikhail-sakhnov committed Oct 29, 2024
1 parent 9c263cc commit 3372e65
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,14 @@ jobs:
docker version
docker buildx version
# - name: Load VM kernel
# env:
# IMAGE: ${{ matrix.arch == 'amd64' && needs.vm-kernel.outputs.image_amd64 || needs.vm-kernel.outputs.image_arm64 }}
# run: |
# docker pull --quiet $IMAGE
# ID=$(docker create $IMAGE true)
# docker cp ${ID}:/vmlinuz neonvm-kernel/vmlinuz
# docker rm -f ${ID}
- name: Load VM kernel
env:
IMAGE: ${{format(needs.vm-kernel.outputs.image_placeholder, matrix.arch)}}
run: |
docker pull --quiet $IMAGE
ID=$(docker create $IMAGE true)
docker cp ${ID}:/vmlinuz neonvm-kernel/vmlinuz
docker rm -f ${ID}
- name: Build go dependencies image
uses: docker/build-push-action@v6
Expand All @@ -231,19 +231,19 @@ jobs:
cache-from: type=registry,ref=cache.neon.build/autoscaling-go-base:cache
cache-to: ${{ github.ref_name == 'main' && 'type=registry,ref=cache.neon.build/autoscaling-go-base:cache,mode=max' || '' }}
tags: ${{ env.GO_BASE_IMG }}
# TODO: SKIP WHILE KERNEL CACHING IS NOT SORTED OUT
# - name: Build and push neonvm-runner image
# uses: docker/build-push-action@v6
# with:
# context: .
# push: true
# platforms: linux/${{ matrix.arch }}
# file: neonvm-runner/Dockerfile
# cache-from: type=registry,ref=cache.neon.build/neonvm-runner:cache
# cache-to: ${{ github.ref_name == 'main' && 'type=registry,ref=cache.neon.build/neonvm-runner:cache,mode=max' || '' }}
# tags: ${{ needs.tags.outputs.runner }}
# build-args: |
# GO_BASE_IMG=${{ env.GO_BASE_IMG }}

- name: Build and push neonvm-runner image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/${{ matrix.arch }}
file: neonvm-runner/Dockerfile
cache-from: type=registry,ref=cache.neon.build/neonvm-runner:cache
cache-to: ${{ github.ref_name == 'main' && 'type=registry,ref=cache.neon.build/neonvm-runner:cache,mode=max' || '' }}
tags: ${{ needs.tags.outputs.runner }}
build-args: |
GO_BASE_IMG=${{ env.GO_BASE_IMG }}
- name: Generate neonvm-controller build tags
id: controller-build-tags
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vm-kernel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ jobs:
with:
build-args: KERNEL_VERSION=${{ steps.get-kernel-version.outputs.VM_KERNEL_VERSION }}
context: neonvm-kernel
platforms: linux/amd64
platforms: ${{format('linux/{0}', inputs.arch)}}
# neonvm-kernel/Dockerfile.kernel-builder has different targets for different architectures
# so we need to specify the target explicitly
target: ${{format('kernel_{0}', inputs.arch)}}
Expand Down

0 comments on commit 3372e65

Please sign in to comment.