Skip to content

Latest commit

 

History

History
159 lines (106 loc) · 5.17 KB

software-requirements-specification.adoc

File metadata and controls

159 lines (106 loc) · 5.17 KB

Software Requirements Specification

1. Purpose and Scope

The purpose of this document is to describe the software system, including all functional and non-functional requirements. It states what is needed in terms of features, functions, performance, constraints, and quality.

2. Definitions and Abbreviations

2.1. Abbreviations

Abbreviation Description

ODS

OpenDevStack

CI

Continuous Integration

CD

Continuous Delivery

SQ

SonarQube

3. References

N/A

4. Software Requirements Specification

4.1. Software Description

ODS Pipeline shall provide CI/CD tooling within a Kubernetes cluster such as OpenShift. It shall interface with an ODS core installation (specifically, Bitbucket and Nexus). Tasks may create artifacts of their work, which shall be stored in Nexus and are intended to be used as evidence in technical documentation.

4.2. General Requirements

SRS-GENERAL-1

ODS Pipeline shall be installable in Kubernetes (1.24+) clusters with Tekton (0.41+) installed.

SRS-GENERAL-2

ODS Pipeline shall be installable in OpenShift (4.11+) clusters with the OpenShift Pipelines (1.9+) operator installed.

SRS-GENERAL-3

ODS Pipeline shall be installable within a namespace without cluster admin permissions.

SRS-GENERAL-4

ODS Pipeline shall function within corporate networks (must support private CA).

SRS-GENERAL-6

ODS Pipeline shall support installation from within an OpenShift Web Terminal when the OpenShift API cannot be accessed from outside the cluster.

4.3. Pipeline Manager Requirements

SRS-PIPELINE-MANAGER-1

The pipeline manager shall be able to respond to repo:refs_changed and pr:* events.

SRS-PIPELINE-MANAGER-2

The pipeline manager shall not trigger pipelines for Git commits which message instructs to skip CI.

SRS-PIPELINE-MANAGER-3

The pipeline manager shall create a pipeline run corresponding to the definition in the ODS config file in the Git repository.

SRS-PIPELINE-MANAGER-4

The pipeline manager shall create a PVC for use as a pipeline run workspace per repository.

SRS-PIPELINE-MANAGER-5

The pipeline manager shall prune pipeline runs per repository.

SRS-PIPELINE-MANAGER-6

The pipeline manager shall prevent concurrent pipeline runs for one repository.

SRS-PIPELINE-MANAGER-7

The pipeline manager shall be able to trigger different pipelines dependent on the configured events and parameterize those pipeline runs based on the matching trigger.

4.4. Tasks Requirements

4.4.1. Task ods-pipeline-start

SRS-TASK-START-1

The task shall check out a fresh copy of a Git repository.

  • If child repositories are configured, those shall be checked out as well. The branch/tag to be checked out shall be configurable.

  • All checkouts shall support Git submodules.

  • All checkouts shall support Git LFS extension.

  • The clone history depth shall be configurable.

SRS-TASK-START-2

The task shall store context information for each checked out repository (such as project and component key, Git commit SHA, target environment, etc.)

SRS-TASK-START-3

The task shall be able to discover artifacts connected to the checked out commit in a Nexus repository and make them available to subsequent tasks.

SRS-TASK-START-4

The task shall set the Bitbucket build status of the checked out commit being to "in progress". The build status shall link back to the pipeline run.

SRS-TASK-START-5

When an artifact source is configured, the task shall fail when any child repository is missing a successful pipeline run artifact for the checked out commit.

SRS-TASK-START-6

The task shall support caching. Caching shall enable persisting build dependencies. Caching shall enable to reuse build outputs and artifacts if a build tasks runs when the associated working directory has not changed.

4.4.2. Task ods-pipeline-finish

SRS-TASK-FINISH-1

The task shall set the Bitbucket build status to "failed" or "successful", depending on whether all tasks succeeded or not. The build status shall link back to the pipeline run.

SRS-TASK-FINISH-2

The task shall create an artifact representing the pipeline run.

SRS-TASK-FINISH-3

The task shall be able to upload all artifacts to a Nexus repository, associating them with the checked out commit.

SRS-TASK-FINISH-4

The task shall send a notification to a configured webhook about the pipeline run status.

4.4.3. Cache / Build skipping Support Requirements

SRS-TASK-SHARED-3

Task shall be able to optionally use a build output and report cache so that future execution of build scripts can be skipped if the subdirectory of the checked out repository did not change.

4.5. Aritfact Download Requirements

SRS-DLD-1

The binary shall download all artifacts belonging to one repository revision.

  • If the repository configures subrepositories, those shall be downloaded as well.

5. Appendix

N/A

6. Document History

As this document is version controlled in Git, all changes are tracked as commits. The history of changes to this file can be retrieved via git log --oneline --no-merges docs/design/software-requirements-specification.adoc.