Uploaded image for project: 'OpenShift Builds'
  1. OpenShift Builds
  2. BUILD-974

Unit Test Builds Operator on Konflux

XMLWordPrintable

    • 3
    • False
    • None
    • False
    • Release Note Not Required
    • Builds Sprint #17

      Story (Required)

      As a Red Hat Engineer trying to verify the quality of Builds for OpenShift I want basic CI checks like unit tests to run alongside my build.

      <Describes high level purpose and goal for this story. Answers the questions: Who is impacted, what is it and why do we need it? How does it improve the customer’s experience?>

      Background (Required)

      <Describes the context or background related to this story>

      • We have a separate operator for deploying Builds for OpenShift - it has its own logic, and imports Shipwright operator code as a dependency.
      • We have Shipwright Build images built on Konflux - one component per image, we have multiple builds per PR "downstream." These are running container builds only.
      • Shipwright build has a robust test suite upstream that runs unit tests and an "integration" test with the EnvTest tool.

      Out of scope

      <Defines what is not included in this story>

      • Narrowing set of unit/integration tests running on Konflux PRs with Ginkgo labels. See BUILD-944
      • Unit/integration tests for Shipwright build, shared resource CSI Driver

      Approach (Required)

      <Description of the general technical path on how to achieve the goal of the story. Include details like json schema, class definitions>

      • If not done already, ensure that the operator repo generates makefile test targets with operator-sdk, and is able to download the Envtest tool.
      • Add a step to the Konflux pipeline in our downstream operator to run the unit/integration tests. This should be run for the operator, ideally using some of the test targets generated by operator-sdk.
      • Ensure the task for running unit/integration tests runs after source is cloned and in parallel with the image build process.

      Dependencies

      <Describes what this story depends on. Dependent Stories and EPICs should be linked to the story.>

      • Onboard downstream operator Konflux
      • Makefile targets generated by operator-sdk, including the ability to download the Envtest tool

      Acceptance Criteria (Mandatory)

      <Describe edge cases to consider when implementing the story and defining tests>

      <Provides a required and minimum list of acceptance tests for this story. More is expected as the engineer implements this story>

      • Operator unit + integration tests run on downstream PRs
      • Build pipelines succeed for pull requests and merged code.
      • No documentation, px, or security changes needed.

      INVEST Checklist

      Dependencies identified

      Blockers noted and expected delivery timelines set

      Design is implementable

      Acceptance criteria agreed upon

      Story estimated

      Legend

      Unknown

      Verified

      Unsatisfied

      Done Checklist

      • Code is completed, reviewed, documented and checked in
      • Unit and integration test automation have been delivered and running cleanly in continuous integration/staging/canary environment
      • Continuous Delivery pipeline(s) is able to proceed with new code included
      • Customer facing documentation, API docs etc. are produced/updated, reviewed and published
      • Acceptance criteria are met

              avinkuma@redhat.com Avinal Kumar
              adkaplan@redhat.com Adam Kaplan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: