3 weeks ago - last edited 3 weeks ago
Hi everyone,
I'm currently working with a monorepository that contains multiple applications, including:
A frontend application
A backend service
Other supporting services
I'm using SAP CI/CD and have encountered challenges when trying to set up separate CI/CD jobs for each application within the same repository.
SAP CI/CD seems to only allow one .pipeline folder and one config.yml file per repository when using Infrastructure as Code (IaC). However, in a monorepo setup, I need to define different build and deployment jobs for each application (frontend, backend, etc.), ideally in isolation from each other.
Copying the .pipeline folder into each application directory
– This does not work. During execution, SAP CI/CD always searches for the .pipeline folder at the root of the repository. If not found there, it throws an error.
Using cd or changing directory in runFirst before a stage (e.g., cd frontend && npm install)
– This also doesn’t work. The pipeline execution seems to disregard directory changes or expects absolute control over execution flow.
How can I separate pipeline jobs for each application in a monorepo using SAP CI/CD?
Is there a best practice or workaround that would allow this setup with only one .pipeline/config.yml allowed?
Has anyone succeeded in setting up conditional stages, path filters, or custom scripts within a monorepo under these constraints?
Any ideas, examples, or pointers from those with experience in SAP CI/CD and monorepos would be incredibly helpful.
Thanks in advance!
Request clarification before answering.
Hi,
for your approach to work, the location of the pipeline configuration YAML file would need to be configurable. Unfortunately, this is not currently supported by the SAP Continuous Integration and Delivery service.
If you whish, you can request that feature here: https://influence.sap.com/sap/ino/
As an alternative to repository-based configuration, you can configure your jobs directly within the service using its user interface.
Most use cases we encounter with regards to mono-repositories are actually MTA projects. Using the MTA file, you can configure the build for each sub-project in the repository.
However, this approach only makes sense if you intend to deploy all your deliverables together.
Best regards, Holger
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
21 | |
9 | |
7 | |
6 | |
6 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.