Skip to content

Commit

Permalink
WIP: experimenting with dynamic outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhail-sakhnov committed Oct 29, 2024
1 parent 54edcf7 commit 5db8627
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 21 deletions.
48 changes: 32 additions & 16 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,37 @@ on:
type: boolean
required: false
outputs:
controller:
controller-amd64:
description: 'neonvm-controller image'
value: ${{ jobs.build.outputs.controller }}
vxlan-controller:
value: ${{ jobs.build.outputs.controller-amd64 }}
vxlan-controller-amd64:
description: 'neonvm-vxlan-controller image'
value: ${{ jobs.build.outputs.vxlan-controller }}
runner:
value: ${{ jobs.build.outputs.vxlan-controller-amd64 }}
runner-amd64:
description: 'neonvm-runner image'
value: ${{ jobs.build.outputs.runner }}
scheduler:
value: ${{ jobs.build.outputs.runner-amd64 }}
scheduler-amd64:
description: 'autoscale-scheduler image'
value: ${{ jobs.build.outputs.scheduler }}
autoscaler-agent:
value: ${{ jobs.build.outputs.scheduler-amd64 }}
autoscaler-agent-amd64:
description: 'autoscaler-agent image'
value: ${{ jobs.build.outputs.autoscaler-agent }}
value: ${{ jobs.build.outputs.autoscaler-agent-amd64 }}

controller-arm64:
description: 'neonvm-controller image'
value: ${{ jobs.build.outputs.controller-arm64 }}
vxlan-controller-arm64:
description: 'neonvm-vxlan-controller image'
value: ${{ jobs.build.outputs.vxlan-controller-arm64 }}
runner-arm64:
description: 'neonvm-runner image'
value: ${{ jobs.build.outputs.runner-arm64 }}
scheduler-arm64:
description: 'autoscale-scheduler image'
value: ${{ jobs.build.outputs.scheduler-arm64 }}
autoscaler-agent-arm64:
description: 'autoscaler-agent image'
value: ${{ jobs.build.outputs.autoscaler-agent-arm64 }}

env:
IMG_CONTROLLER: "neondatabase/neonvm-controller"
Expand Down Expand Up @@ -129,12 +145,12 @@ jobs:
# tags converted to be a step and moved here to be in the same strategy context
- id: tags
run: |
echo "controller=${{ env.IMG_CONTROLLER }}-${{matrix.arch}}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
echo "vxlan-controller=${{ env.IMG_VXLAN_CONTROLLER }}-${{matrix.arch}}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
echo "runner=${{ env.IMG_RUNNER }}-${{matrix.arch}}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
echo "scheduler=${{ env.IMG_SCHEDULER }}-${{matrix.arch}}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
echo "autoscaler-agent=${{ env.IMG_AUTOSCALER_AGENT }}-${{matrix.arch}}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
echo "cluster-autoscaler=${{ env.IMG_CLUSTER_AUTOSCALER }}-${{matrix.arch}}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
echo "controller-${{matrix.arch}}=${{ env.IMG_CONTROLLER }}-${{matrix.arch}}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
echo "vxlan-controller-${{matrix.arch}}=${{ env.IMG_VXLAN_CONTROLLER }}-${{matrix.arch}}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
echo "runner-${{matrix.arch}}=${{ env.IMG_RUNNER }}-${{matrix.arch}}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
echo "scheduler-${{matrix.arch}}=${{ env.IMG_SCHEDULER }}-${{matrix.arch}}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
echo "autoscaler-agent-${{matrix.arch}}=${{ env.IMG_AUTOSCALER_AGENT }}-${{matrix.arch}}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
echo "cluster-autoscaler-${{matrix.arch}}=${{ env.IMG_CLUSTER_AUTOSCALER }}-${{matrix.arch}}:${{ inputs.tag }}" | tee -a $GITHUB_OUTPUT
- uses: actions/checkout@v4
with:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,12 @@ jobs:
- run: make render-release
env:
IMG_CONTROLLER: ${{ needs.build-images.outputs.controller }}
IMG_VXLAN_CONTROLLER: ${{ needs.build-images.outputs.vxlan-controller }}
IMG_RUNNER: ${{ needs.build-images.outputs.runner }}
IMG_SCHEDULER: ${{ needs.build-images.outputs.scheduler }}
IMG_AUTOSCALER_AGENT: ${{ needs.build-images.outputs.autoscaler-agent }}
IMG_CONTROLLER: ${{ needs.build-images.outputs[format('controller-{0}', matrix.arch)] }}
# #IMG_CONTROLLER: ${{ needs.build-images.outputs.controller }}
# IMG_VXLAN_CONTROLLER: ${{ needs.build-images.outputs.vxlan-controller }}
# IMG_RUNNER: ${{ needs.build-images.outputs.runner }}
# IMG_SCHEDULER: ${{ needs.build-images.outputs.scheduler }}
# IMG_AUTOSCALER_AGENT: ${{ needs.build-images.outputs.autoscaler-agent }}

- name: upload manifests
# nb: use format(..) to catch both inputs.push-yamls = true AND inputs.push-yamls = 'true'.
Expand Down

0 comments on commit 5db8627

Please sign in to comment.