generated from pagopa/pagopa-functions-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: monorepo folder structure (#34)
- Loading branch information
Showing
147 changed files
with
176 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
# see https://help.github.com/en/articles/about-code-owners#example-of-a-codeowners-file | ||
|
||
# Default owner | ||
* @pagopa/selfcare-contributors | ||
|
||
# Code owner for the applications | ||
/apps/onboarding-ms/* @pagopa/selfcare-contributors | ||
/apps/onboarding-functions/* @pagopa/selfcare-contributors | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,46 @@ | ||
# Selfcare Onboarding | ||
|
||
Repository that contains backend services for selfcare onboarding. It is a monorepo for onboarding domain that contains: | ||
This repo structure and build monorepo with Apache Maven for selfcare onboarding domain. | ||
|
||
- `onboarding-functions`: functions that handle all asynchronous activities related to preparing and completing the onboarding process. Indeed, they are activated by the onboarding microservice upon receiving an onboarding request | ||
- `onboarding-ms`: microservice that implements CRUD operations for the 'onboarding' object and the business logic for the onboarding phase. During the onboarding process | ||
- `onboarding-sdk`: Java utility classes that simplify the work of developers about onboarding activity | ||
Applications under apps/ depend on shared code under libs/. | ||
|
||
|
||
``` | ||
. | ||
├── apps | ||
│ ├── onboarding-functions | ||
│ └── onboarding-ms | ||
└── libs | ||
├── onboarding-sdk | ||
``` | ||
|
||
Look at single README module for more information. | ||
|
||
## Infrastructure | ||
|
||
The [`.container_apps/`] sub folder contains terraform files for deploying infrastructure as container apps in Azure. | ||
|
||
|
||
## Continous integration | ||
|
||
The [`.github/`] sub folder contains a self-contained ci-stack for building the monorepo with Github Actions. | ||
|
||
## Maven basic actions for monorep | ||
|
||
Maven is really not a monorepo-*native* build tool (e.g. lacks | ||
trustworthy incremental builds, can only build java code natively, is recursive and | ||
struggles with partial repo checkouts) but can be made good use of with some tricks | ||
and usage of a couple of lesser known command line switches. | ||
|
||
| Action | in working directory | with Maven | | ||
|:---------------------------------------------------------------------------------------------------|:----------------------:|:-----------------------------------------------------------------------------------| | ||
| Build the world | `.` | `mvn clean package -DskipTests` | | ||
| Run `onboarding-ms` | `.` | `java -jar apps/onboarding-ms/target/onboarding-ms-0.0.1-SNAPSHOT.jar` | | ||
| Build and test the world | `.` | `mvn clean package` | | ||
| Build the world | `./apps/onboarding-ms` | `mvn --file ../.. clean package -DskipTests` | | ||
| Build `onboarding-ms` and its dependencies | `.` | `mvn --projects :onboarding-ms --also-make clean package -DskipTests` | | ||
| Build `onboarding-ms` and its dependencies | `./apps/onboarding-ms` | `mvn --file ../.. --projects :onboarding-ms --also-make clean package -DskipTests` | | ||
| Build `onboarding-sdk` and its dependents (aka. reverse dependencies or *rdeps* in Bazel parlance) | `.` | `mvn --projects :onboarding-sdk --also-make-dependents clean package -DskipTests` | | ||
| Print dependencies of `onboarding-sdk` | `./apps/onboarding-ms` | `mvn dependency:list` | | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# syntax=docker/dockerfile:1.6 | ||
FROM maven:3-eclipse-temurin-17 AS builder | ||
|
||
WORKDIR /src | ||
COPY --link ./pom.xml . | ||
|
||
WORKDIR /src/libs | ||
COPY --link ./libs/pom.xml . | ||
|
||
WORKDIR /src/libs/onboarding-sdk | ||
COPY ./libs/onboarding-sdk/ . | ||
|
||
WORKDIR /src/apps | ||
COPY --link ./apps/pom.xml . | ||
|
||
WORKDIR /src/apps/onboarding-ms | ||
COPY --link ./apps/onboarding-ms/pom.xml . | ||
COPY ./apps/onboarding-ms/src/main/ ./src/main/ | ||
|
||
WORKDIR /src | ||
RUN mvn --projects :onboarding-ms --also-make clean package -DskipTests | ||
|
||
FROM openjdk:17-jdk AS runtime | ||
|
||
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' | ||
ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /src/apps/onboarding-ms/target/quarkus-app/lib/ ./lib/ | ||
COPY --from=builder /src/apps/onboarding-ms/target/quarkus-app/*.jar ./ | ||
COPY --from=builder /src/apps/onboarding-ms/target/quarkus-app/app/ ./app/ | ||
COPY --from=builder /src/apps/onboarding-ms/target/quarkus-app/quarkus/ ./quarkus/ | ||
|
||
EXPOSE 8080 | ||
USER 1001 | ||
|
||
ENTRYPOINT ["sh", "-c", "java $JAVA_OPTIONS -jar /app/quarkus-run.jar"] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>it.pagopa.selfcare</groupId> | ||
<artifactId>onboarding-root</artifactId> | ||
<version>0.0.1</version> | ||
</parent> | ||
|
||
<artifactId>onboarding-apps</artifactId> | ||
<packaging>pom</packaging> | ||
|
||
<profiles> | ||
<profile> | ||
<id>onboarding-ms</id> | ||
<activation> | ||
<file> | ||
<exists>onboarding-ms/pom.xml</exists> | ||
</file> | ||
</activation> | ||
<modules> | ||
<module>onboarding-ms</module> | ||
</modules> | ||
</profile> | ||
<profile> | ||
<id>onboarding-functions</id> | ||
<activation> | ||
<file> | ||
<exists>onboarding-functions/pom.xml</exists> | ||
</file> | ||
</activation> | ||
<modules> | ||
<module>onboarding-functions</module> | ||
</modules> | ||
</profile> | ||
</profiles> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>it.pagopa.selfcare</groupId> | ||
<artifactId>onboarding-root</artifactId> | ||
<version>0.0.1</version> | ||
</parent> | ||
|
||
<artifactId>onboarding-libs</artifactId> | ||
<packaging>pom</packaging> | ||
|
||
<modules> | ||
<module>onboarding-sdk</module> | ||
</modules> | ||
|
||
</project> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.