chore(ci): use output image from build for integration tests (#4117)

In CI, images have `debug/`. In CD, they don't, so test them that way.
This commit is contained in:
Jamil
2024-03-12 19:58:17 -07:00
committed by GitHub
parent c555167e64
commit 1cfe2c5d4a
2 changed files with 22 additions and 1 deletions

View File

@@ -23,6 +23,16 @@ on:
description: "The stage of the data plane component images to build"
required: true
type: string
outputs:
client_image:
description: "The client image that was built"
value: ${{ jobs.data-plane.outputs.client_image }}
relay_image:
description: "The relay image that was built"
value: ${{ jobs.data-plane.outputs.relay_image }}
gateway_image:
description: "The gateway image that was built"
value: ${{ jobs.data-plane.outputs.gateway_image }}
env:
# mark:automatic-version
@@ -171,6 +181,10 @@ jobs:
image_name: snownet-tests
env:
BINARY_DEST_PATH: ${{ matrix.name.artifact }}-${{ matrix.arch.shortname }}
outputs:
client_image: ${{ steps.image-name.outputs.client_image }}
relay_image: ${{ steps.image-name.outputs.relay_image }}
gateway_image: ${{ steps.image-name.outputs.gateway_image }}
steps:
- uses: actions/checkout@v4
with:
@@ -284,6 +298,9 @@ jobs:
path: /tmp/digests/${{ matrix.name.image_name }}
if-no-files-found: error
retention-days: 1
- name: Output image name
id: image-name
run: echo "${{ matrix.name.image_name }}_image=${{ steps.login.outputs.registry }}/firezone/${{ inputs.image_prefix && format('{0}/', inputs.image_prefix) }}${{ matrix.name.image_name }}" >> $GITHUB_ENV
merge-docker-artifacts:
name: merge-${{ matrix.image_name }}

View File

@@ -49,7 +49,7 @@ jobs:
uses: ./.github/workflows/_build_artifacts.yml
secrets: inherit
with:
image_prefix: ${{ (github.event_name == 'pull_request' && 'debug') || inputs.image_prefix }}
image_prefix: ${{ (github.event_name != 'workflow_call' && 'debug') || inputs.image_prefix }}
profile: ${{ inputs.profile || 'debug' }}
stage: ${{ inputs.stage || 'debug' }}
@@ -77,6 +77,10 @@ jobs:
uses: ./.github/workflows/_integration_tests.yml
needs: build-artifacts
secrets: inherit
with:
gateway_image: ${{ needs.build-artifacts.outputs.gateway_image }}
client_image: ${{ needs.build-artifacts.outputs.client_image }}
relay_image: ${{ needs.build-artifacts.outputs.relay_image }}
snownet-tests:
needs: build-artifacts