0
votes

We are working on MTA project and using the SAP Cloud SDK pipeline (Piper) to integrate CI/CD for Cloud Foundry.

The project has multiple microservices based on SAP Cloud SDK for Java and each of these microservices has individual sets of integration tests (based on Java project template for SAP Cloud SDK).

We want to do MTA packaging of the microservices but problem arises when we run the mta build with the SAP Cloud SDK pipeline.

The pipeline errors out as it now (i.e. the new structure) expects integration-test module on the project root level but in our case integration tests are at the individual microservice level.

We understand integration tests for all the microservices need to be clubbed at the project root level for mta build but is there any other recommended approach to handle the integration tests at the individual microservice itself?

Appreciate if someone can guide us here to understand the new structure and the best practice to follow.

Just to add as an information - we run maven build using s4sdk pipeline for each of the aforementioned microservices. We want to club these microservices into MTA package for release deployment.

1
If the answer satisfies you, it would be nice to mark it as "accepted" to signal to other users that an answer was provided.Florian Wilhelm

1 Answers

2
votes

Let me say a few additional words:

The structure of MTA projects suitable for using SAP Cloud SDK Pipeline is documented here.

It is easier to start such a project based on the SAP Cloud Platform Business Application SAP Web IDE Template than to start with one of the SAP Cloud SDK archetypes.

I think that there is a slight contradiction between the idea of microservices and one mta project, because microservices should be deployable in isolation. That said, using mta to structure your application is perfectly fine, but in this case having the integration tests in the project root as documented and as you already discovered is the only way. You can use packages to separate logical entities of your integration tests.

The alternative if your code should be more strictly separated would be to have multiple repos (might use mta or not) and to setup a pipeline for each of those repos.

I hope this helps.