Skip to content

Commit

Permalink
ci: use matrix results in build-images
Browse files Browse the repository at this point in the history
Signed-off-by: Misha Sakhnov <[email protected]>
  • Loading branch information
mikhail-sakhnov committed Nov 13, 2024
1 parent a402bfa commit cda5664
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 41 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,6 @@ jobs:
arch: ${{ inputs.arch }}
secrets: inherit

# vm-kernel-results:
# runs-on: ubuntu-latest
# needs: [vm-kernel]
# steps:
# - uses: cloudposse/github-action-matrix-outputs-read@v1
# id: read
# with:
# matrix-step-name: vm-kernel

# outputs:
# result: "${{ steps.read.outputs.result }}"

build:
# nb: use format(..) to catch both inputs.skip = true AND inputs.skip = 'true'.
if: ${{ format('{0}', inputs.skip) != 'true' }}
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:

steps:
- run: echo ${{ needs.build-images-results.outputs.result }}
- run: exit 0
- run: echo ${{ needs.build-test-vm-results.outputs.result }}
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all, so that we also include tags
Expand Down Expand Up @@ -148,11 +148,12 @@ jobs:
- run: make render-release
env:
IMG_CONTROLLER: ${{ needs.build-images.outputs[format('controller-{0}', matrix.arch)] }}
IMG_VXLAN_CONTROLLER: ${{ needs.build-images.outputs[format('vxlan-controller-{0}', matrix.arch)] }}
IMG_RUNNER: ${{ needs.build-images.outputs[format('runner-{0}', matrix.arch)] }}
IMG_SCHEDULER: ${{ needs.build-images.outputs[format('scheduler-{0}', matrix.arch)] }}
IMG_AUTOSCALER_AGENT: ${{ needs.build-images.outputs[format('autoscaler-agent-{0}', matrix.arch)] }}
# ${{ fromJson(needs.vm-kernel-results.outputs.result).image[ inputs.arch ] }}
IMG_CONTROLLER: ${{ fromJson(needs.build-images-results.outputs.result).controller[matrix.arch] }}
IMG_VXLAN_CONTROLLER: ${{ fromJson(needs.build-images-results.outputs.result).vxlan-controller[matrix.arch] }}
IMG_RUNNER: ${{ fromJson(needs.build-images-results.outputs.result).runner[matrix.arch]}}
IMG_SCHEDULER: ${{ fromJson(needs.build-images-results.outputs.result).scheduler[matrix.arch]}}
IMG_AUTOSCALER_AGENT: ${{ fromJson(needs.build-images-results.outputs.result).autoscaler-agent[matrix.arch]}}

- name: upload manifests
# nb: use format(..) to catch both inputs.push-yamls = true AND inputs.push-yamls = 'true'.
Expand Down Expand Up @@ -225,7 +226,7 @@ jobs:
- name: load e2e test vm image
env:
TEST_IMAGE: ${{ needs.build-test-vm-results.outputs.vm-postgres-16-bullseye }}
TEST_IMAGE: ${{ fromJson(needs.build-test-vm-results.outputs.result).vm-postgres-16-bullseye[matrix.arch]}}
timeout-minutes: 2
run: |
# Pull the docker image so we can re-tag it, because using a consistent tag inside the
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/vm-kernel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ on:
description: 'Architecture to build the kernel image for'
type: string
required: true
matrix-step-name:
required: false
type: string
matrix-key:
required: false
type: string
outputs:
image:
description: "Image"
Expand Down Expand Up @@ -213,19 +207,3 @@ jobs:


- run: git diff neonvm-kernel

# write_matrix:
# runs-on: ubuntu-latest
# needs: [build-vm-kernel-image]
# steps:
# ## Write for matrix outputs workaround
# - uses: cloudposse/github-action-matrix-outputs-write@v1
# id: out
# with:
# matrix-step-name: ${{ inputs.matrix-step-name }}
# matrix-key: ${{ inputs.matrix-key }}
# outputs: |-
# image: ${{ needs.build-vm-kernel-image.outputs.image }}

# outputs:
# image: ${{ fromJson(steps.out.outputs.result).image }}

0 comments on commit cda5664

Please sign in to comment.