Conversation
Reviewer's GuideThis PR refactors existing pipeline tasks to leverage Tekton workspaces for resource handling, enhances step actions to emit service endpoints, consolidates and upgrades the end-to-end pipeline with a default OCP version bump, and introduces a new DAST pipeline with a dedicated RapiDAST task for API scanning. Class diagram for refactored pipeline tasks and step actionsclassDiagram
class InstallOperatorFromImageTask {
+namespace: string
+resources_path: string
+workspaces: source-code
+steps: get-kubeconfig, kustomize-resources, run-operator
}
class InstallOperatorFromFbcTask {
+fbcImage: string
+namespace: string (default: openshift-operators)
+operator-name: string
+steps: get-kubeconfig, install-operator, wait-for-deployment
}
class InstallOperatorFromBundleTask {
+bundleImage: string
+namespace: string (default: default)
+timeout: string
}
class InstallKeycloakStepAction {
+credentials: string
+workdir: string
+steps: install-keycloak
}
class InstallTasStepAction {
+credentials: string
+workdir: string
+results: fulcio-url, tuf-url, rekor-url, tsa-url
+steps: install-tas
}
class RapidastTask {
+API scanning logic
}
InstallOperatorFromImageTask <|-- InstallOperatorFromFbcTask
InstallOperatorFromImageTask <|-- InstallOperatorFromBundleTask
InstallKeycloakStepAction <|-- InstallTasStepAction
class ProcessGoTestResultsStepAction {
+process test results
}
class OperatorDastPipeline {
+uses: RapidastTask
}
class RhtasOperatorE2ePipeline {
+uses: InstallOperatorFromImageTask, InstallKeycloakStepAction, InstallTasStepAction, ProcessGoTestResultsStepAction
}
OperatorDastPipeline --> RapidastTask
RhtasOperatorE2ePipeline --> InstallOperatorFromImageTask
RhtasOperatorE2ePipeline --> InstallKeycloakStepAction
RhtasOperatorE2ePipeline --> InstallTasStepAction
RhtasOperatorE2ePipeline --> ProcessGoTestResultsStepAction
Flow diagram for new DAST pipeline with RapiDAST taskflowchart TD
A["Start DAST Pipeline"] --> B["Run RapiDAST Task"]
B --> C["API Scan Results"]
C --> D["Process Results"]
D --> E["End Pipeline"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- The operator-e2e and operator-dast PipelineRuns share many similar steps—abstract common sequences or parameter sets into reusable Pipelines or Tasks to avoid duplication and simplify maintenance.
- Multiple tasks and pipelines embed hardcoded namespace and OCP version defaults; consider centralizing those defaults as shared parameters or environment variables to streamline version upgrades.
- The new YAML additions are very large; splitting pipeline definitions and tasks into smaller, self-contained files could help maintain readability and ease future changes.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The operator-e2e and operator-dast PipelineRuns share many similar steps—abstract common sequences or parameter sets into reusable Pipelines or Tasks to avoid duplication and simplify maintenance.
- Multiple tasks and pipelines embed hardcoded namespace and OCP version defaults; consider centralizing those defaults as shared parameters or environment variables to streamline version upgrades.
- The new YAML additions are very large; splitting pipeline definitions and tasks into smaller, self-contained files could help maintain readability and ease future changes.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
JasonPowr
left a comment
There was a problem hiding this comment.
Changes do look good the refactor on the RHTAS E2E is cleaner than the original, nice job, my only issue with this is the deletion of the stepActions. The policy controller operator E2E test still uses these, can you add them back for now and I can refactor the PCO E2E at some point then I will remove them :)
| note="TaskRun $(context.taskRun.name) completed: Refer to Tekton task result SCAN_OUTPUT for vulnerabilities scanned by RapiDAST." | ||
| # Call the function directly again | ||
| TEST_OUTPUT=$(make_result_json -r "SUCCESS" -t "$note") | ||
| echo "${TEST_OUTPUT}" | tee "$(results.TEST_OUTPUT.path)" No newline at end of file |
integration-test-pipelines/tasks/install-operator-from-bundle.yaml
Outdated
Show resolved
Hide resolved
|
You will need to modify rhtas-operator template to add/modify a integration tests |
996be18 to
e7a6e0f
Compare
Configuration Diff2 document(s) impacted: + 0 added
- 0 removed
! 2 modifiedDiff@@ spec.resources.appstudio.redhat.com/v1beta2/IntegrationTestScenario/rhtas-operator-e2e-test{{.nameSuffix}}.spec.resolverRef.params.pathInRepo.value @@
# projctl.konflux.dev/v1beta1/ProjectDevelopmentStreamTemplate/rhtas-tenant/operator-template
! ± value change
- pipelines/rhtas-operator-e2e.yaml
+ pipelines/integration-test/rhtas-operator-e2e.yaml
@@ spec.resources.appstudio.redhat.com/v1beta2/IntegrationTestScenario/rhtas-operator-e2e-test{{.nameSuffix}}.spec.resolverRef.resourceKind @@
# projctl.konflux.dev/v1beta1/ProjectDevelopmentStreamTemplate/rhtas-tenant/operator-template
! ± value change
- pipeline
+ pipelinerun📦 Artifacts: base-output.yaml, head-output.yaml, dyff-output.txt |
|
@JasonPowr sorry, I did not noticed that there is one more test pipeline. I did the refactoring too. Please review. |
|
I executed all pipelines that could be related and all passed, but there is a number of variants. Ping me if something fails. |
This PR contains:
Summary by Sourcery
Implement a DAST pipeline and modernize the integration test pipelines by adopting workspaces, consolidating tasks, exporting service endpoints, and updating defaults.
New Features:
Enhancements:
Chores: