Skip to content

Latest commit

 

History

History
23 lines (12 loc) · 1.32 KB

20210816-monorepo.md

File metadata and controls

23 lines (12 loc) · 1.32 KB

Monorepo Support

Status

Accepted

Context

The tasks we provide should be usable for repositories which are monorepos. In general, I think the Tekton approach we chose is well suited as it is much easier to have multiple tasks backed by containers with varying technology (e.g. one for Python, one for TypeScript), opposed to the previous Jenkins implementation which ran all stages on one build agent.

Decision

Add an additional parameter (working-dir) to all tasks which allows to specify a subfolder.

Alternatives

Make use of the subPath field in the task reference, which mounts the workspace at a subfolder. However, it would be impossible to reference the .ods folder in the root of the workspace which means the task can neither access the pipeline context, nor the artifacts.

Consequences

All tasks will need to support a working-dir parameter, and need to deal with it accordingly. Further, this working-dir parameter needs to be accounted for when generating artifacts so that e.g. xUnit results from multiple subdirs can co-exist in Nexus. For now we use the sanitized subdir as a prefix of the filename. For the SonarQube scan, we will add the subdir as a suffix for the SonarQube project.

At this stage, there is no further magic that e.g. avoids unnecessary rebuilds, but that may be added in the future.