Skip to content

Commit

Permalink
Run the basic set of integration tests on konflux built images
Browse files Browse the repository at this point in the history
  • Loading branch information
Molter73 committed May 29, 2024
1 parent bdf4b26 commit 3f48a16
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/konflux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Run konflux tests

on:
push:
branches:
- master
- release-*
tags:
- 3.*.*
pull_request:
branches:
- '**konflux**'
- '**rhtap**'

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
init:
runs-on: ubuntu-latest
outputs:
collector-tag: ${{ steps.generate-tag.outputs.collector-tag }}
collector-qa-tag: ${{ steps.generate-tag.outputs.collector-qa-tag }}
rebuild-qa-containers: ${{ steps.filter.outputs.container }}
steps:
- uses: actions/checkout@v4

- uses: dorny/paths-filter@v3
id: filter
with:
list-files: shell

# Only trigger a rebuild when the QA tag has changed
filters: |
container:
- integration-tests/container/QA_TAG
- id: generate-tag
run: |
echo "collector-tag='$(make tag)'" >> "$GITHUB_OUTPUT"
COLLECTOR_QA_TAG="$(cat ${{ github.workspace }}/integration-tests/container/QA_TAG)"
if [[ "${GITHUB_EVENT_NAME}" == "pull_request" && "${{ steps.filter.outputs.container }}" == "true" ]]; then
COLLECTOR_QA_TAG="${COLLECTOR_QA_TAG}-${COLLECTOR_TAG}"
fi
echo "collector-tag-qa=${COLLECTOR_QA_TAG}" >> "$GITHUB_OUTPUT"
wait-for-images:
runs-on: ubuntu-latest
needs:
- init
steps:
- uses: stackrox/actions/release/wait-for-images@v1
with:
token: ${{ secrets.QUAY_RHACS_ENG_BEARER_TOKEN }}
image: quay.io/rhacs-eng/collector:${{ needs.init.outputs.collector-tag }}-fast

build-test-containers:
uses: ./.github/workflows/integration-test-containers.yml
needs:
- init
with:
collector-tag: ${{ needs.init.outputs.collector-tag }}
collector-qa-tag: ${{ needs.init.outputs.collector-qa-tag }}
rebuild-qa-containers: ${{ needs.init.outputs.rebuild-qa-containers == 'true' }}
secrets: inherit

run-konflux-tests:
uses: ./.github/workflows/integration-tests.yml
needs:
- init
- wait-for-images
with:
collector-tag: ${{ needs.init.outputs.collector-tag }}
collector-qa-tag: ${{ needs.init.outputs.collector-qa-tag }}
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-integration-tests') }}
secrets: inherit

0 comments on commit 3f48a16

Please sign in to comment.