-
Couldn't load subscription status.
- Fork 13
Call CLI tier0 test suite from global CI #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Marek Aufart <[email protected]>
WalkthroughAdds a toggleable e2e CLI tests job to global CI workflows via new inputs, including a cli_tests_ref in the bundle workflow. The job conditionally runs after image checks, checks out the kantra-cli-tests repo at a dynamic ref, and executes its test-suite. Nightly Slack message label adjusted. Changes
Sequence Diagram(s)sequenceDiagram
participant Trigger as Workflow Trigger
participant CI as Global CI Workflow
participant Check as check-images Job
participant CLI as e2e-cli-tests Job
participant Repo as kantra-cli-tests Repo
participant Suite as test-suite.yaml
Trigger->>CI: Dispatch / workflow_call (with run_cli_tests, tag, cli_tests_ref*)
CI->>Check: Run image checks
Check-->>CI: Completed
alt inputs.run_cli_tests == true
CI->>CLI: Start e2e-cli-tests
CLI->>CLI: Extract Kantra image URI (placeholder)
CLI->>Repo: Checkout at dynamic ref (main if tag==latest else tag/cli_tests_ref)
CLI->>Suite: Invoke test-suite.yaml (image, tag, tier=TIER0)
else
CI-->>Trigger: Skip CLI tests
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Updating tets-suite workflow to accept full URL of kantra image that should be tested. This hsould allow use image built e.g. from bundle or not-yet-released image to quay.io. Required by konveyor/ci#106 Signed-off-by: Marek Aufart <[email protected]>
Updating tets-suite workflow to accept full URL of kantra image that should be tested. This hsould allow use image built e.g. from bundle or not-yet-released image to quay.io. Required by konveyor/ci#106 Signed-off-by: Marek Aufart <[email protected]>
Signed-off-by: Marek Aufart <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🔭 Outside diff range comments (2)
.github/workflows/global-ci.yml (1)
469-484: Address invalid step-level workflow uses and other Actionlint errorsThe following workflows still invoke a reusable workflow at the step level, which isn’t supported. You need to convert these to job-level uses (or a composite action) and also resolve the other Actionlint warnings:
• .github/workflows/global-ci.yml (around line 480)
• .github/workflows/global-ci-bundle.yml (around line 543)Actionlint also reports:
- Outdated actions:
docker/setup-buildx-action@v2,actions/setup-go@v4– bump to the latest supported minor/major versions.- Exceeded 10 inputs for
workflow_dispatchin global-ci.yml – reduce to 10 or fewer.- Undefined properties in expressions (
tag,test-tags) – align inputs inworkflow_dispatchwith expressions used in your jobs.Minimal fix for each occurrence (example for global-ci.yml):
- e2e-cli-tests: - if: ${{ inputs.run_cli_tests }} - runs-on: ubuntu-latest - steps: - - name: Checkout kantra-cli-tests repo... - uses: actions/checkout@v4 - with: - repository: konveyor-ecosystem/kantra-cli-tests - ref: ${{ inputs.tag == 'latest' && 'main' || inputs.tag }} - path: kantra-cli-tests - - - uses: ./kantra-cli-tests/.github/workflows/test-suite.yaml - with: - tag: ${{ inputs.tag }} - tier: TIER0 + e2e-cli-tests: + if: ${{ inputs.run_cli_tests }} + uses: konveyor-ecosystem/kantra-cli-tests/.github/workflows/test-suite.yaml@main + with: + tag: ${{ inputs.tag }} + tier: TIER0Apply the same change in global-ci-bundle.yml. If you need dynamic refs, either call the workflow at a fixed ref and handle branching inside it, or expose a composite action in kantra-cli-tests and invoke that after checkout.
.github/workflows/global-ci-bundle.yml (1)
528-548: e2e-cli-tests job still fails actionlint checks: missing run/uses, undefined input, invalid step-level workflow invocationThe
e2e-cli-testsjob in.github/workflows/global-ci-bundle.ymlstill contains the same errors:
- Line 533: placeholder step has neither
runnoruses- Line 540: references
inputs.tag, which isn’t defined (should beinputs.cli_tests_ref)- Line 543: step-level
uses: ./kantra-cli-tests/.github/workflows/test-suite.yaml– reusable workflows can only be invoked at the job level, not withinstepsProposed fix (replace entire job with a job-level reusable workflow call):
e2e-cli-tests: needs: check-images if: ${{ inputs.run_cli_tests }} - runs-on: ubuntu-latest - steps: - - name: extract kantra image URI from bundle - # TODO HERE - - - name: Checkout kantra-cli-tests repo to use dynamically on target (release) branch - uses: actions/checkout@v4 - with: - repository: konveyor-ecosystem/kantra-cli-tests - ref: ${{ inputs.tag == 'latest' && 'main' || inputs.tag }} - path: kantra-cli-tests - - - uses: ./kantra-cli-tests/.github/workflows/test-suite.yaml - with: - image: <TBD> # take from bundle and the full image url - tag: latest # take from bundle tag - tier: TIER0 + uses: konveyor-ecosystem/kantra-cli-tests/.github/workflows/test-suite.yaml@main + with: + tag: ${{ inputs.cli_tests_ref == 'latest' && 'latest' || inputs.cli_tests_ref }} + tier: TIER0If you need to extract the image URI dynamically and invoke a local composite action, switch to a composite action approach:
runs-on: ubuntu-latest steps: - - name: extract kantra image URI from bundle - # TODO HERE + - name: Extract kantra image URI + run: | + # implement your bundle-parsing logic here, e.g.: + echo "KANTRA_IMAGE=$(bundle-tool get-kantra-image)" >> $GITHUB_ENV + - name: Checkout kantra-cli-tests repo to use dynamically on target (release) branch uses: actions/checkout@v4 with: - ref: ${{ inputs.tag == 'latest' && 'main' || inputs.tag }} + ref: ${{ inputs.cli_tests_ref == 'latest' && 'main' || inputs.cli_tests_ref }} path: kantra-cli-tests - - uses: ./kantra-cli-tests/.github/workflows/test-suite.yaml + - uses: ./kantra-cli-tests/.github/actions/test-suite with: - image: <TBD> - tag: latest + image: ${{ env.KANTRA_IMAGE }} + tag: ${{ inputs.cli_tests_ref == 'latest' && 'latest' || inputs.cli_tests_ref }} tier: TIER0These changes will:
- Remove the empty step
- Replace
inputs.tagwithinputs.cli_tests_ref- Eliminate the invalid step-level workflow invocation
🧹 Nitpick comments (2)
.github/workflows/nightly-main.yaml (1)
29-31: Slack label changed to “E2E” — confirm intentSemantics look fine; just ensure consumers of the Slack message expect the new label.
.github/workflows/global-ci-bundle.yml (1)
114-121: Input cli_tests_ref — LGTM, but consider defaulting to “main”Defaulting to latest and mapping it to a branch later is okay. Alternatively, default “main” to reduce indirection.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/global-ci-bundle.yml(4 hunks).github/workflows/global-ci.yml(3 hunks).github/workflows/nightly-main.yaml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/global-ci-bundle.yml
533-533: step must run script with "run" section or run action with "uses" section
(syntax-check)
540-540: property "tag" is not defined in object type {addon_analyzer: string; addon_discovery: string; api_hub_tests_ref: string; api_tests_ref: string; api_tests_tiers: string; artifact: string; cli_tests_ref: string; keycloak_init: string; keycloak_sso: string; namespace: string; oauth_proxy: string; operator_bundle: string; run_api_tests: bool; run_cli_tests: bool; run_ui_tests: bool; tackle_cr: string; tackle_hub: string; tackle_postgres: string; tackle_ui: string; ui_test_tags: string; ui_tests_ref: string}
(expression)
540-540: property "tag" is not defined in object type {addon_analyzer: string; addon_discovery: string; api_hub_tests_ref: string; api_tests_ref: string; api_tests_tiers: string; artifact: string; cli_tests_ref: string; keycloak_init: string; keycloak_sso: string; namespace: string; oauth_proxy: string; operator_bundle: string; run_api_tests: bool; run_cli_tests: bool; run_ui_tests: bool; tackle_cr: string; tackle_hub: string; tackle_postgres: string; tackle_ui: string; ui_test_tags: string; ui_tests_ref: string}
(expression)
🔇 Additional comments (4)
.github/workflows/global-ci.yml (2)
40-45: Input run_cli_tests (workflow_call) — LGTMBoolean toggle with sensible default. No issues.
128-133: Input run_cli_tests (workflow_dispatch) — LGTMConsistent with workflow_call. No issues.
.github/workflows/global-ci-bundle.yml (2)
82-87: Input run_cli_tests — LGTMToggle looks consistent with other test toggles.
175-180: Input run_cli_tests (workflow_dispatch) — LGTMConsistent with workflow_call.
Updating tets-suite workflow to accept full URL of kantra image that should be tested. This hsould allow use image built e.g. from bundle or not-yet-released image to quay.io. Required by konveyor/ci#106 Signed-off-by: Marek Aufart <[email protected]>
Updating tets-suite workflow to accept full URL of kantra image that should be tested. This hsould allow use image built e.g. from bundle or not-yet-released image to quay.io. Required by konveyor/ci#106 Signed-off-by: Marek Aufart <[email protected]>
Adding CLI tier0 tests job to the global CI workflows.
Summary by CodeRabbit
Tests
Chores