Skip to content

Commit 3be61c4

Browse files
ci: build neonvm-daemon in build-images.yaml (#1168)
Build and publish neonvm-daemon images since they are expected to be used by neondatabase/neon repository during the "build vm image" step. [1] For the simplicity, the neondatabase/autoscaling repo keeps building local version of the daemon image during the vm-example workflow (cronbased job) and during the build-test-vm workflow (is used as an external workflow in the e2e tests). Closes #1167 [1]: https://github.com/neondatabase/neon/blob/14c4fae64af5613c682ec7dd7d30e484c476e5af/.github/workflows/build_and_test.yml#L820 --------- Signed-off-by: Misha Sakhnov <[email protected]>
1 parent 02fad62 commit 3be61c4

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

.github/workflows/build-images.yaml

+21-1
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,18 @@ on:
4646
autoscaler-agent:
4747
description: 'autoscaler-agent image'
4848
value: ${{ jobs.tags.outputs.autoscaler-agent }}
49-
49+
daemon:
50+
description: 'neonvm-daemon image'
51+
value: ${{ jobs.tags.outputs.daemon }}
52+
5053
env:
5154
IMG_CONTROLLER: "neondatabase/neonvm-controller"
5255
IMG_VXLAN_CONTROLLER: "neondatabase/neonvm-vxlan-controller"
5356
IMG_RUNNER: "neondatabase/neonvm-runner"
5457
IMG_KERNEL: "neondatabase/vm-kernel"
5558
IMG_SCHEDULER: "neondatabase/autoscale-scheduler"
5659
IMG_AUTOSCALER_AGENT: "neondatabase/autoscaler-agent"
60+
IMG_DAEMON: "neondatabase/neonvm-daemon"
5761
IMG_CLUSTER_AUTOSCALER: "neondatabase/cluster-autoscaler-neonvm"
5862
ECR_DEV: "369495373322.dkr.ecr.eu-central-1.amazonaws.com"
5963
ECR_PROD: "093970136003.dkr.ecr.eu-central-1.amazonaws.com"
@@ -80,6 +84,7 @@ jobs:
8084
scheduler: ${{ steps.show-tags.outputs.scheduler }}
8185
autoscaler-agent: ${{ steps.show-tags.outputs.autoscaler-agent }}
8286
cluster-autoscaler: ${{ steps.show-tags.outputs.cluster-autoscaler }}
87+
daemon: ${{ steps.show-tags.outputs.daemon }}
8388
runs-on: ubuntu-latest
8489
steps:
8590
- id: show-tags
@@ -90,6 +95,7 @@ jobs:
9095
echo "scheduler=${{ env.IMG_SCHEDULER }}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
9196
echo "autoscaler-agent=${{ env.IMG_AUTOSCALER_AGENT }}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
9297
echo "cluster-autoscaler=${{ env.IMG_CLUSTER_AUTOSCALER }}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
98+
echo "daemon=${{ env.IMG_DAEMON }}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
9399
94100
vm-kernel:
95101
# nb: use format(..) to catch both inputs.skip = true AND inputs.skip = 'true'.
@@ -294,6 +300,19 @@ jobs:
294300
GO_BASE_IMG=${{ env.GO_BASE_IMG }}
295301
GIT_INFO=${{ steps.get-git-info.outputs.info }}
296302
303+
- name: Build and push neonvm-daemon image
304+
uses: docker/build-push-action@v6
305+
with:
306+
context: .
307+
platforms: linux/amd64
308+
push: true
309+
file: neonvm-daemon/Dockerfile
310+
cache-from: type=registry,ref=cache.neon.build/neonvm-daemon:cache
311+
cache-to: ${{ github.ref_name == 'main' && 'type=registry,ref=cache.neon.build/neonvm-daemon:cache,mode=max' || '' }}
312+
tags: ${{ needs.tags.outputs.daemon }}
313+
build-args: |
314+
GO_BASE_IMG=${{ env.GO_BASE_IMG }}
315+
297316
- name: Build and push cluster-autoscaler image
298317
uses: docker/build-push-action@v6
299318
if: ${{ format('{0}', inputs.build-cluster-autoscaler) == 'true' }}
@@ -312,6 +331,7 @@ jobs:
312331
neonvm-controller \
313332
neonvm-vxlan-controller \
314333
neonvm-runner \
334+
neonvm-daemon \
315335
vm-kernel \
316336
autoscale-scheduler \
317337
autoscaler-agent \

.github/workflows/build-test-vm.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ on:
3030
env:
3131
IMG_POSTGRES_16_BULLSEYE: "neondatabase/vm-postgres-16-bullseye"
3232
# using image built in the same workflow
33-
IMG_DAEMON: "daemon:dev"
33+
IMG_DAEMON: "neondatabase/neonvm-daemon"
3434

3535
defaults:
3636
run:
@@ -46,13 +46,15 @@ jobs:
4646
- id: show-tags
4747
run: |
4848
echo "vm-postgres-16-bullseye=${{ env.IMG_POSTGRES_16_BULLSEYE }}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
49-
echo "daemon=${{ env.IMG_DAEMON }}" | tee -a $GITHUB_OUTPUT
49+
echo "daemon=${{ env.IMG_DAEMON }}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
5050
5151
build:
5252
# nb: use format(..) to catch both inputs.skip = true AND inputs.skip = 'true'.
5353
if: ${{ format('{0}', inputs.skip) != 'true' }}
5454
needs: tags
5555
runs-on: [ self-hosted, gen3, large ]
56+
env:
57+
IMG_DAEMON: ${{ needs.tags.outputs.daemon }}
5658
steps:
5759
- uses: actions/checkout@v4
5860
- uses: actions/setup-go@v5

0 commit comments

Comments
 (0)