-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflows: simplify integration test (#4490)
* workflows: rename fuzz workflow file to match pr- prefix Signed-off-by: Patrick Stephens <[email protected]> * workflows: refactor integration image usage Signed-off-by: Patrick Stephens <[email protected]> * workflows: image cleanup Signed-off-by: Patrick Stephens <[email protected]> * workflows: temporarily select current branch Signed-off-by: Patrick Stephens <[email protected]> * workflows: fix linting issues Signed-off-by: Patrick Stephens <[email protected]> * workflows: fix linting issues Signed-off-by: Patrick Stephens <[email protected]> * workflows: ensure we use gchr.io Signed-off-by: Patrick Stephens <[email protected]> * workflows: add helper documentation Signed-off-by: Patrick Stephens <[email protected]> * workflows: updated README Signed-off-by: Patrick Stephens <[email protected]> * workflows: reverted to using master branch Signed-off-by: Patrick Stephens <[email protected]> * workflows: invoke reusable Grafana workflow Signed-off-by: Patrick Stephens <[email protected]>
- Loading branch information
1 parent
089e3c8
commit 48a74ca
Showing
10 changed files
with
217 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: Reusable workflow for integration testing | ||
on: | ||
workflow_call: | ||
inputs: | ||
ref: | ||
description: The SHA, commit or branch to checkout and build. | ||
required: true | ||
type: string | ||
registry: | ||
description: The registry to push container images to. | ||
type: string | ||
required: true | ||
username: | ||
description: The username for the registry. | ||
type: string | ||
required: true | ||
image: | ||
description: The name of the container image to push to the registry. | ||
type: string | ||
required: true | ||
image-tag: | ||
description: The tag of the image to for testing. | ||
type: string | ||
required: true | ||
environment: | ||
description: The Github environment to run this workflow on. | ||
type: string | ||
required: false | ||
secrets: | ||
token: | ||
description: The Github token or similar to authenticate with for the registry. | ||
required: true | ||
jobs: | ||
call-integration-image-build-container: | ||
name: Integration test container image build | ||
runs-on: ubuntu-latest | ||
environment: ${{ inputs.environment }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ${{ inputs.registry }} | ||
username: ${{ inputs.username }} | ||
password: ${{ secrets.token }} | ||
|
||
- name: Extract metadata from Github | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ${{ inputs.registry }}/${{ inputs.image }} | ||
tags: | | ||
raw,${{ inputs.image-tag }} | ||
- name: Build the AMD64 image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
file: ./dockerfiles/Dockerfile.x86_64-master | ||
context: . | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
platforms: linux/amd64 | ||
push: true | ||
load: false | ||
|
||
- name: Extract metadata from Github | ||
id: meta-debug | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ${{ inputs.registry }}/${{ inputs.image }} | ||
tags: | | ||
raw,${{ inputs.image-tag }}-debug | ||
- name: Build the AMD64 development image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
file: ./dockerfiles/Dockerfile.x86_64-master_debug | ||
context: . | ||
tags: ${{ steps.meta-debug.outputs.tags }} | ||
labels: ${{ steps.meta-debug.outputs.labels }} | ||
platforms: linux/amd64 | ||
push: true | ||
load: false |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.