diff --git a/.container_apps/onboarding-ms/container_app.tf b/.container_apps/onboarding-ms/container_app.tf index 7a212a988..30a5fbb50 100644 --- a/.container_apps/onboarding-ms/container_app.tf +++ b/.container_apps/onboarding-ms/container_app.tf @@ -22,7 +22,7 @@ data "azurerm_container_app_environment" "container_app_environment" { name = "${local.project}-cae" } -resource "azapi_resource" "container_app" { +resource "azapi_resource" "container_app_onboarding_ms" { type = "Microsoft.App/containerApps@2023-05-01" name = "${local.project}-${local.app_name}-ca" location = data.azurerm_resource_group.resource_group_app.location @@ -78,7 +78,7 @@ resource "azapi_resource" "container_app" { resource "azurerm_key_vault_access_policy" "keyvault_containerapp_access_policy" { key_vault_id = data.azurerm_key_vault.key_vault.id tenant_id = data.azurerm_client_config.current.tenant_id - object_id = azapi_resource.container_app_onboarding.identity[0].principal_id + object_id = azapi_resource.container_app_onboarding_ms.identity[0].principal_id secret_permissions = [ "Get", diff --git a/.container_apps/onboarding-ms/outputs.tf b/.container_apps/onboarding-ms/outputs.tf index 49817e375..2c5e22d95 100644 --- a/.container_apps/onboarding-ms/outputs.tf +++ b/.container_apps/onboarding-ms/outputs.tf @@ -1,5 +1,5 @@ output "container_app_resource_group_name" { - value = azapi_resource.container_app_onboarding.location + value = azapi_resource.container_app_onboarding_ms.location } output "container_app_environment_name" { @@ -7,5 +7,5 @@ output "container_app_environment_name" { } output "container_app_name" { - value = azapi_resource.container_app_onboarding.name + value = azapi_resource.container_app_onboarding_ms.name } \ No newline at end of file diff --git a/onboarding-ms/.dockerignore b/.dockerignore similarity index 96% rename from onboarding-ms/.dockerignore rename to .dockerignore index a70f9c9f0..ec2ed4865 100644 --- a/onboarding-ms/.dockerignore +++ b/.dockerignore @@ -1,6 +1,6 @@ **/.dockerignore **/.git -**/.gitignore +apps/onboarding-ms/.idea/.gitignore **/bin **/docker-compose* **/Dockerfile* @@ -12,6 +12,11 @@ LICENSE README.md +**/.idea +.idea +**/.mvn +.mvn + # Created by .ignore support plugin (hsz.mobi) ### Maven template target/ diff --git a/.github/labeler.yml b/.github/labeler.yml index 3617c0085..d4d332657 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,14 +1,15 @@ functions: - onboarding-functions/** -ms: -- onboarding-ms/** +onboarding-ms: +- apps/onboarding-ms/** -sdk: -- onboarding-sdk/** +onboarding-sdk: +- apps/onboarding-sdk/** ops: - .github/** +- .container_apps/** - .identity/** docs: diff --git a/.github/workflows/deploy_onboarding_ms.yml b/.github/workflows/deploy_onboarding_ms.yml index b058ae1eb..30af761c9 100644 --- a/.github/workflows/deploy_onboarding_ms.yml +++ b/.github/workflows/deploy_onboarding_ms.yml @@ -7,8 +7,8 @@ on: - main types: [closed] paths: - - "onboarding-ms/**" - - "pom.xml" + - "apps/onboarding-ms/**" + - "apps/pom.xml" workflow_dispatch: inputs: @@ -32,7 +32,7 @@ env: jobs: build: - name: Build OnBoarding Microservice + name: Build Onboarding Microservice runs-on: ubuntu-latest if: ${{ (github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == 'true') }} environment: "${{ inputs.environment != null && inputs.environment || (github.base_ref == 'main' && 'prod' || (github.base_ref == 'develop' && 'uat' || 'dev')) }}-ci" @@ -96,7 +96,7 @@ jobs: uses: docker/build-push-action@v5 with: context: . - file: ./onboarding-ms/Dockerfile + file: ./apps/onboarding-ms/Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/release_onboarding_sdk.yml b/.github/workflows/release_onboarding_sdk.yml index de7dc86eb..021899f56 100644 --- a/.github/workflows/release_onboarding_sdk.yml +++ b/.github/workflows/release_onboarding_sdk.yml @@ -22,12 +22,12 @@ jobs: cache: maven - name: Build with Maven - run: mvn -B package -f onboarding-sdk/pom.xml + run: mvn --projects :onboarding-sdk --also-make-dependents clean package -DskipTests shell: bash - name: Deploy to GitHub Package Registry run: | - mvn -B deploy -f onboarding-sdk/pom.xml + mvn -B deploy -f libs/onboarding-sdk/pom.xml shell: bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/CODEOWNERS b/CODEOWNERS index 04a422742..3e6a4b0ff 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -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 + + diff --git a/README.md b/README.md index 6ece86fa3..49fd58200 100644 --- a/README.md +++ b/README.md @@ -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` | + diff --git a/onboarding-functions/.gitignore b/apps/onboarding-functions/.gitignore similarity index 100% rename from onboarding-functions/.gitignore rename to apps/onboarding-functions/.gitignore diff --git a/onboarding-functions/README.md b/apps/onboarding-functions/README.md similarity index 100% rename from onboarding-functions/README.md rename to apps/onboarding-functions/README.md diff --git a/onboarding-functions/host.json b/apps/onboarding-functions/host.json similarity index 100% rename from onboarding-functions/host.json rename to apps/onboarding-functions/host.json diff --git a/onboarding-functions/pom.xml b/apps/onboarding-functions/pom.xml similarity index 98% rename from onboarding-functions/pom.xml rename to apps/onboarding-functions/pom.xml index 5fc8a2208..9ac1ee5c8 100644 --- a/onboarding-functions/pom.xml +++ b/apps/onboarding-functions/pom.xml @@ -4,11 +4,13 @@ 4.0.0 it.pagopa.selfcare - onboarding + onboarding-apps 0.0.1 + onboarding-functions 1.0.0-SNAPSHOT + 3.11.0 11 @@ -19,8 +21,9 @@ 3.3.3 true 3.1.2 - 0.0.4 + 0.1.0 + diff --git a/onboarding-functions/src/integrationTest/java/org/acme/FunctionIT.java b/apps/onboarding-functions/src/integrationTest/java/org/acme/FunctionIT.java similarity index 100% rename from onboarding-functions/src/integrationTest/java/org/acme/FunctionIT.java rename to apps/onboarding-functions/src/integrationTest/java/org/acme/FunctionIT.java diff --git a/onboarding-functions/src/main/docker/Dockerfile.jvm b/apps/onboarding-functions/src/main/docker/Dockerfile.jvm similarity index 100% rename from onboarding-functions/src/main/docker/Dockerfile.jvm rename to apps/onboarding-functions/src/main/docker/Dockerfile.jvm diff --git a/onboarding-functions/src/main/docker/Dockerfile.legacy-jar b/apps/onboarding-functions/src/main/docker/Dockerfile.legacy-jar similarity index 100% rename from onboarding-functions/src/main/docker/Dockerfile.legacy-jar rename to apps/onboarding-functions/src/main/docker/Dockerfile.legacy-jar diff --git a/onboarding-functions/src/main/docker/Dockerfile.native b/apps/onboarding-functions/src/main/docker/Dockerfile.native similarity index 100% rename from onboarding-functions/src/main/docker/Dockerfile.native rename to apps/onboarding-functions/src/main/docker/Dockerfile.native diff --git a/onboarding-functions/src/main/docker/Dockerfile.native-micro b/apps/onboarding-functions/src/main/docker/Dockerfile.native-micro similarity index 100% rename from onboarding-functions/src/main/docker/Dockerfile.native-micro rename to apps/onboarding-functions/src/main/docker/Dockerfile.native-micro diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/OnboardingFunctions.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/OnboardingFunctions.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/OnboardingFunctions.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/OnboardingFunctions.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/config/AzureStorageConfig.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/config/AzureStorageConfig.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/config/AzureStorageConfig.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/config/AzureStorageConfig.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/config/MailTemplateConfig.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/config/MailTemplateConfig.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/config/MailTemplateConfig.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/config/MailTemplateConfig.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/config/OnboardingFunctionConfig.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/config/OnboardingFunctionConfig.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/config/OnboardingFunctionConfig.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/config/OnboardingFunctionConfig.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/Billing.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/Billing.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/Billing.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/Billing.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/DataProtectionOfficer.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/DataProtectionOfficer.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/DataProtectionOfficer.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/DataProtectionOfficer.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/Institution.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/Institution.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/Institution.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/Institution.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/MailTemplate.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/MailTemplate.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/MailTemplate.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/MailTemplate.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/Onboarding.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/Onboarding.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/Onboarding.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/Onboarding.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/PaymentServiceProvider.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/PaymentServiceProvider.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/PaymentServiceProvider.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/PaymentServiceProvider.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/Token.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/Token.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/Token.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/Token.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/User.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/User.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/User.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/entity/User.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/exception/FunctionOrchestratedException.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/exception/FunctionOrchestratedException.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/exception/FunctionOrchestratedException.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/exception/FunctionOrchestratedException.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/exception/GenericOnboardingException.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/exception/GenericOnboardingException.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/exception/GenericOnboardingException.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/exception/GenericOnboardingException.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/exception/ResourceNotFoundException.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/exception/ResourceNotFoundException.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/exception/ResourceNotFoundException.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/exception/ResourceNotFoundException.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/repository/OnboardingRepository.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/repository/OnboardingRepository.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/repository/OnboardingRepository.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/repository/OnboardingRepository.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/repository/TokenRepository.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/repository/TokenRepository.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/repository/TokenRepository.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/repository/TokenRepository.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/ContractService.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/ContractService.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/ContractService.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/ContractService.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/ContractServiceDefault.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/ContractServiceDefault.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/ContractServiceDefault.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/ContractServiceDefault.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/NotificationService.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/NotificationService.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/NotificationService.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/NotificationService.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/NotificationServiceDefault.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/NotificationServiceDefault.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/NotificationServiceDefault.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/NotificationServiceDefault.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/OnboardingService.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/OnboardingService.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/OnboardingService.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/OnboardingService.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/utils/ClassPathStream.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/utils/ClassPathStream.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/utils/ClassPathStream.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/utils/ClassPathStream.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/utils/GenericError.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/utils/GenericError.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/utils/GenericError.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/utils/GenericError.java diff --git a/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/utils/PdfMapper.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/utils/PdfMapper.java similarity index 100% rename from onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/utils/PdfMapper.java rename to apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/utils/PdfMapper.java diff --git a/onboarding-functions/src/main/openapi/user_registry.json b/apps/onboarding-functions/src/main/openapi/user_registry.json similarity index 100% rename from onboarding-functions/src/main/openapi/user_registry.json rename to apps/onboarding-functions/src/main/openapi/user_registry.json diff --git a/onboarding-functions/src/main/resources/application.properties b/apps/onboarding-functions/src/main/resources/application.properties similarity index 100% rename from onboarding-functions/src/main/resources/application.properties rename to apps/onboarding-functions/src/main/resources/application.properties diff --git a/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/HttpResponseMessageMock.java b/apps/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/HttpResponseMessageMock.java similarity index 100% rename from onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/HttpResponseMessageMock.java rename to apps/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/HttpResponseMessageMock.java diff --git a/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/OnboardingFunctionsTest.java b/apps/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/OnboardingFunctionsTest.java similarity index 100% rename from onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/OnboardingFunctionsTest.java rename to apps/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/OnboardingFunctionsTest.java diff --git a/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/service/ContractServiceDefaultTest.java b/apps/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/service/ContractServiceDefaultTest.java similarity index 100% rename from onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/service/ContractServiceDefaultTest.java rename to apps/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/service/ContractServiceDefaultTest.java diff --git a/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/service/NotificationServiceDefaultTest.java b/apps/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/service/NotificationServiceDefaultTest.java similarity index 100% rename from onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/service/NotificationServiceDefaultTest.java rename to apps/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/service/NotificationServiceDefaultTest.java diff --git a/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/service/OnboardingServiceTest.java b/apps/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/service/OnboardingServiceTest.java similarity index 100% rename from onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/service/OnboardingServiceTest.java rename to apps/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/service/OnboardingServiceTest.java diff --git a/onboarding-functions/src/test/resources/application.properties b/apps/onboarding-functions/src/test/resources/application.properties similarity index 100% rename from onboarding-functions/src/test/resources/application.properties rename to apps/onboarding-functions/src/test/resources/application.properties diff --git a/onboarding-ms/.gitignore b/apps/onboarding-ms/.gitignore similarity index 100% rename from onboarding-ms/.gitignore rename to apps/onboarding-ms/.gitignore diff --git a/apps/onboarding-ms/Dockerfile b/apps/onboarding-ms/Dockerfile new file mode 100644 index 000000000..a180a31c6 --- /dev/null +++ b/apps/onboarding-ms/Dockerfile @@ -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"] diff --git a/onboarding-ms/README.md b/apps/onboarding-ms/README.md similarity index 100% rename from onboarding-ms/README.md rename to apps/onboarding-ms/README.md diff --git a/onboarding-ms/pom.xml b/apps/onboarding-ms/pom.xml similarity index 98% rename from onboarding-ms/pom.xml rename to apps/onboarding-ms/pom.xml index c43a76dda..620e406e1 100644 --- a/onboarding-ms/pom.xml +++ b/apps/onboarding-ms/pom.xml @@ -4,10 +4,10 @@ 4.0.0 it.pagopa.selfcare - onboarding + onboarding-apps 0.0.1 - it.pagopa.selfcare + onboarding-ms 1.0.0-SNAPSHOT @@ -22,7 +22,7 @@ 3.4.2 true 3.1.2 - 0.0.4 + 0.1.0 diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/client/auth/AuthenticationPropagationHeadersFactory.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/client/auth/AuthenticationPropagationHeadersFactory.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/client/auth/AuthenticationPropagationHeadersFactory.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/client/auth/AuthenticationPropagationHeadersFactory.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/conf/JacksonConfiguration.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/conf/JacksonConfiguration.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/conf/JacksonConfiguration.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/conf/JacksonConfiguration.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/constants/CustomError.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/constants/CustomError.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/constants/CustomError.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/constants/CustomError.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/OnboardingController.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/OnboardingController.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/OnboardingController.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/OnboardingController.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/BillingRequest.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/BillingRequest.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/BillingRequest.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/BillingRequest.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/BillingSaRequest.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/BillingSaRequest.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/BillingSaRequest.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/BillingSaRequest.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/ContractRequest.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/ContractRequest.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/ContractRequest.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/ContractRequest.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/DataProtectionOfficerRequest.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/DataProtectionOfficerRequest.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/DataProtectionOfficerRequest.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/DataProtectionOfficerRequest.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/InstitutionBaseRequest.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/InstitutionBaseRequest.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/InstitutionBaseRequest.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/InstitutionBaseRequest.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/InstitutionPspRequest.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/InstitutionPspRequest.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/InstitutionPspRequest.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/InstitutionPspRequest.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingBaseRequest.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingBaseRequest.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingBaseRequest.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingBaseRequest.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingDefaultRequest.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingDefaultRequest.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingDefaultRequest.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingDefaultRequest.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingImportContract.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingImportContract.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingImportContract.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingImportContract.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingPaRequest.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingPaRequest.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingPaRequest.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingPaRequest.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingPgRequest.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingPgRequest.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingPgRequest.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingPgRequest.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingPspRequest.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingPspRequest.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingPspRequest.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingPspRequest.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingSaRequest.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingSaRequest.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingSaRequest.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/OnboardingSaRequest.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/PaymentServiceProviderRequest.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/PaymentServiceProviderRequest.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/PaymentServiceProviderRequest.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/PaymentServiceProviderRequest.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/ProductInfo.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/ProductInfo.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/ProductInfo.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/ProductInfo.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/SupportContact.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/SupportContact.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/SupportContact.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/SupportContact.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/UserRequest.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/UserRequest.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/UserRequest.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/request/UserRequest.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/response/BillingResponse.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/response/BillingResponse.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/response/BillingResponse.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/response/BillingResponse.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/response/InstitutionResponse.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/response/InstitutionResponse.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/response/InstitutionResponse.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/response/InstitutionResponse.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/response/OnboardingResponse.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/response/OnboardingResponse.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/response/OnboardingResponse.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/response/OnboardingResponse.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/response/UserResponse.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/response/UserResponse.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/response/UserResponse.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/controller/response/UserResponse.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/Billing.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/Billing.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/Billing.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/Billing.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/DataProtectionOfficer.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/DataProtectionOfficer.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/DataProtectionOfficer.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/DataProtectionOfficer.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/Institution.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/Institution.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/Institution.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/Institution.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/Onboarding.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/Onboarding.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/Onboarding.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/Onboarding.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/PaymentServiceProvider.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/PaymentServiceProvider.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/PaymentServiceProvider.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/PaymentServiceProvider.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/Product.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/Product.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/Product.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/Product.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/User.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/User.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/User.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/entity/User.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/exception/InvalidRequestException.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/exception/InvalidRequestException.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/exception/InvalidRequestException.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/exception/InvalidRequestException.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/exception/OnboardingNotAllowedException.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/exception/OnboardingNotAllowedException.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/exception/OnboardingNotAllowedException.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/exception/OnboardingNotAllowedException.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/exception/UpdateNotAllowedException.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/exception/UpdateNotAllowedException.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/exception/UpdateNotAllowedException.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/exception/UpdateNotAllowedException.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/exception/handler/ExceptionHandler.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/exception/handler/ExceptionHandler.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/exception/handler/ExceptionHandler.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/exception/handler/ExceptionHandler.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/mapper/OnboardingMapper.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/mapper/OnboardingMapper.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/mapper/OnboardingMapper.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/mapper/OnboardingMapper.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/service/OnboardingService.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/service/OnboardingService.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/service/OnboardingService.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/service/OnboardingService.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/service/OnboardingServiceDefault.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/service/OnboardingServiceDefault.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/service/OnboardingServiceDefault.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/service/OnboardingServiceDefault.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/service/strategy/ConfigMapAllowedListOnboardingValidationStrategy.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/service/strategy/ConfigMapAllowedListOnboardingValidationStrategy.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/service/strategy/ConfigMapAllowedListOnboardingValidationStrategy.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/service/strategy/ConfigMapAllowedListOnboardingValidationStrategy.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/service/strategy/OnboardingValidationStrategy.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/service/strategy/OnboardingValidationStrategy.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/service/strategy/OnboardingValidationStrategy.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/service/strategy/OnboardingValidationStrategy.java diff --git a/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/util/InstitutionPaSubunitType.java b/apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/util/InstitutionPaSubunitType.java similarity index 100% rename from onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/util/InstitutionPaSubunitType.java rename to apps/onboarding-ms/src/main/java/it/pagopa/selfcare/onboarding/util/InstitutionPaSubunitType.java diff --git a/onboarding-ms/src/main/openapi/core.json b/apps/onboarding-ms/src/main/openapi/core.json similarity index 100% rename from onboarding-ms/src/main/openapi/core.json rename to apps/onboarding-ms/src/main/openapi/core.json diff --git a/onboarding-ms/src/main/openapi/onboarding_functions.json b/apps/onboarding-ms/src/main/openapi/onboarding_functions.json similarity index 100% rename from onboarding-ms/src/main/openapi/onboarding_functions.json rename to apps/onboarding-ms/src/main/openapi/onboarding_functions.json diff --git a/onboarding-ms/src/main/openapi/product.json b/apps/onboarding-ms/src/main/openapi/product.json similarity index 100% rename from onboarding-ms/src/main/openapi/product.json rename to apps/onboarding-ms/src/main/openapi/product.json diff --git a/onboarding-ms/src/main/openapi/user_registry.json b/apps/onboarding-ms/src/main/openapi/user_registry.json similarity index 100% rename from onboarding-ms/src/main/openapi/user_registry.json rename to apps/onboarding-ms/src/main/openapi/user_registry.json diff --git a/onboarding-ms/src/main/resources/META-INF/resources/index.html b/apps/onboarding-ms/src/main/resources/META-INF/resources/index.html similarity index 100% rename from onboarding-ms/src/main/resources/META-INF/resources/index.html rename to apps/onboarding-ms/src/main/resources/META-INF/resources/index.html diff --git a/onboarding-ms/src/main/resources/application.properties b/apps/onboarding-ms/src/main/resources/application.properties similarity index 100% rename from onboarding-ms/src/main/resources/application.properties rename to apps/onboarding-ms/src/main/resources/application.properties diff --git a/onboarding-ms/src/test/java/it/pagopa/selfcare/onboarding/controller/OnboardingControllerTest.java b/apps/onboarding-ms/src/test/java/it/pagopa/selfcare/onboarding/controller/OnboardingControllerTest.java similarity index 100% rename from onboarding-ms/src/test/java/it/pagopa/selfcare/onboarding/controller/OnboardingControllerTest.java rename to apps/onboarding-ms/src/test/java/it/pagopa/selfcare/onboarding/controller/OnboardingControllerTest.java diff --git a/onboarding-ms/src/test/java/it/pagopa/selfcare/onboarding/service/OnboardingServiceDefaultTest.java b/apps/onboarding-ms/src/test/java/it/pagopa/selfcare/onboarding/service/OnboardingServiceDefaultTest.java similarity index 100% rename from onboarding-ms/src/test/java/it/pagopa/selfcare/onboarding/service/OnboardingServiceDefaultTest.java rename to apps/onboarding-ms/src/test/java/it/pagopa/selfcare/onboarding/service/OnboardingServiceDefaultTest.java diff --git a/onboarding-ms/src/test/java/it/pagopa/selfcare/onboarding/service/strategy/ConfigMapAllowedListOnboardingValidationStrategyTest.java b/apps/onboarding-ms/src/test/java/it/pagopa/selfcare/onboarding/service/strategy/ConfigMapAllowedListOnboardingValidationStrategyTest.java similarity index 100% rename from onboarding-ms/src/test/java/it/pagopa/selfcare/onboarding/service/strategy/ConfigMapAllowedListOnboardingValidationStrategyTest.java rename to apps/onboarding-ms/src/test/java/it/pagopa/selfcare/onboarding/service/strategy/ConfigMapAllowedListOnboardingValidationStrategyTest.java diff --git a/onboarding-ms/src/test/resources/application.properties b/apps/onboarding-ms/src/test/resources/application.properties similarity index 100% rename from onboarding-ms/src/test/resources/application.properties rename to apps/onboarding-ms/src/test/resources/application.properties diff --git a/apps/pom.xml b/apps/pom.xml new file mode 100644 index 000000000..752ee07cb --- /dev/null +++ b/apps/pom.xml @@ -0,0 +1,40 @@ + + + 4.0.0 + + + it.pagopa.selfcare + onboarding-root + 0.0.1 + + + onboarding-apps + pom + + + + onboarding-ms + + + onboarding-ms/pom.xml + + + + onboarding-ms + + + + onboarding-functions + + + onboarding-functions/pom.xml + + + + onboarding-functions + + + + + diff --git a/docker-compose.yml b/docker-compose.yml index 2396023c2..8ce778c54 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: restart: on-failure build: context: . - dockerfile: ./onboarding-ms/Dockerfile + dockerfile: ./apps/onboarding-ms/Dockerfile ports: - "8080:8080" environment: diff --git a/onboarding-sdk/.gitignore b/libs/onboarding-sdk/.gitignore similarity index 100% rename from onboarding-sdk/.gitignore rename to libs/onboarding-sdk/.gitignore diff --git a/onboarding-sdk/onboarding-sdk-azure-storage/.gitignore b/libs/onboarding-sdk/onboarding-sdk-azure-storage/.gitignore similarity index 100% rename from onboarding-sdk/onboarding-sdk-azure-storage/.gitignore rename to libs/onboarding-sdk/onboarding-sdk-azure-storage/.gitignore diff --git a/onboarding-sdk/onboarding-sdk-azure-storage/README.md b/libs/onboarding-sdk/onboarding-sdk-azure-storage/README.md similarity index 100% rename from onboarding-sdk/onboarding-sdk-azure-storage/README.md rename to libs/onboarding-sdk/onboarding-sdk-azure-storage/README.md diff --git a/onboarding-sdk/onboarding-sdk-azure-storage/pom.xml b/libs/onboarding-sdk/onboarding-sdk-azure-storage/pom.xml similarity index 100% rename from onboarding-sdk/onboarding-sdk-azure-storage/pom.xml rename to libs/onboarding-sdk/onboarding-sdk-azure-storage/pom.xml diff --git a/onboarding-sdk/onboarding-sdk-azure-storage/src/main/java/it/pagopa/selfcare/azurestorage/AzureBlobClient.java b/libs/onboarding-sdk/onboarding-sdk-azure-storage/src/main/java/it/pagopa/selfcare/azurestorage/AzureBlobClient.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-azure-storage/src/main/java/it/pagopa/selfcare/azurestorage/AzureBlobClient.java rename to libs/onboarding-sdk/onboarding-sdk-azure-storage/src/main/java/it/pagopa/selfcare/azurestorage/AzureBlobClient.java diff --git a/onboarding-sdk/onboarding-sdk-azure-storage/src/main/java/it/pagopa/selfcare/azurestorage/AzureBlobClientDefault.java b/libs/onboarding-sdk/onboarding-sdk-azure-storage/src/main/java/it/pagopa/selfcare/azurestorage/AzureBlobClientDefault.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-azure-storage/src/main/java/it/pagopa/selfcare/azurestorage/AzureBlobClientDefault.java rename to libs/onboarding-sdk/onboarding-sdk-azure-storage/src/main/java/it/pagopa/selfcare/azurestorage/AzureBlobClientDefault.java diff --git a/onboarding-sdk/onboarding-sdk-azure-storage/src/main/java/it/pagopa/selfcare/azurestorage/error/SelfcareAzureStorageError.java b/libs/onboarding-sdk/onboarding-sdk-azure-storage/src/main/java/it/pagopa/selfcare/azurestorage/error/SelfcareAzureStorageError.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-azure-storage/src/main/java/it/pagopa/selfcare/azurestorage/error/SelfcareAzureStorageError.java rename to libs/onboarding-sdk/onboarding-sdk-azure-storage/src/main/java/it/pagopa/selfcare/azurestorage/error/SelfcareAzureStorageError.java diff --git a/onboarding-sdk/onboarding-sdk-azure-storage/src/main/java/it/pagopa/selfcare/azurestorage/error/SelfcareAzureStorageException.java b/libs/onboarding-sdk/onboarding-sdk-azure-storage/src/main/java/it/pagopa/selfcare/azurestorage/error/SelfcareAzureStorageException.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-azure-storage/src/main/java/it/pagopa/selfcare/azurestorage/error/SelfcareAzureStorageException.java rename to libs/onboarding-sdk/onboarding-sdk-azure-storage/src/main/java/it/pagopa/selfcare/azurestorage/error/SelfcareAzureStorageException.java diff --git a/onboarding-sdk/onboarding-sdk-common/.gitignore b/libs/onboarding-sdk/onboarding-sdk-common/.gitignore similarity index 100% rename from onboarding-sdk/onboarding-sdk-common/.gitignore rename to libs/onboarding-sdk/onboarding-sdk-common/.gitignore diff --git a/onboarding-sdk/onboarding-sdk-common/README.md b/libs/onboarding-sdk/onboarding-sdk-common/README.md similarity index 100% rename from onboarding-sdk/onboarding-sdk-common/README.md rename to libs/onboarding-sdk/onboarding-sdk-common/README.md diff --git a/onboarding-sdk/onboarding-sdk-common/pom.xml b/libs/onboarding-sdk/onboarding-sdk-common/pom.xml similarity index 100% rename from onboarding-sdk/onboarding-sdk-common/pom.xml rename to libs/onboarding-sdk/onboarding-sdk-common/pom.xml diff --git a/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/Env.java b/libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/Env.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/Env.java rename to libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/Env.java diff --git a/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/InstitutionPaSubunitType.java b/libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/InstitutionPaSubunitType.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/InstitutionPaSubunitType.java rename to libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/InstitutionPaSubunitType.java diff --git a/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/InstitutionType.java b/libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/InstitutionType.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/InstitutionType.java rename to libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/InstitutionType.java diff --git a/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/OnboardingStatus.java b/libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/OnboardingStatus.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/OnboardingStatus.java rename to libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/OnboardingStatus.java diff --git a/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/Origin.java b/libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/Origin.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/Origin.java rename to libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/Origin.java diff --git a/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/PartyRole.java b/libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/PartyRole.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/PartyRole.java rename to libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/PartyRole.java diff --git a/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/PricingPlan.java b/libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/PricingPlan.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/PricingPlan.java rename to libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/PricingPlan.java diff --git a/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/ProductId.java b/libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/ProductId.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/ProductId.java rename to libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/ProductId.java diff --git a/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/TokenType.java b/libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/TokenType.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/TokenType.java rename to libs/onboarding-sdk/onboarding-sdk-common/src/main/java/it/pagopa/selfcare/onboarding/common/TokenType.java diff --git a/onboarding-sdk/onboarding-sdk-product/.gitignore b/libs/onboarding-sdk/onboarding-sdk-product/.gitignore similarity index 100% rename from onboarding-sdk/onboarding-sdk-product/.gitignore rename to libs/onboarding-sdk/onboarding-sdk-product/.gitignore diff --git a/onboarding-sdk/onboarding-sdk-product/README.md b/libs/onboarding-sdk/onboarding-sdk-product/README.md similarity index 100% rename from onboarding-sdk/onboarding-sdk-product/README.md rename to libs/onboarding-sdk/onboarding-sdk-product/README.md diff --git a/onboarding-sdk/onboarding-sdk-product/pom.xml b/libs/onboarding-sdk/onboarding-sdk-product/pom.xml similarity index 100% rename from onboarding-sdk/onboarding-sdk-product/pom.xml rename to libs/onboarding-sdk/onboarding-sdk-product/pom.xml diff --git a/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/BackOfficeConfigurations.java b/libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/BackOfficeConfigurations.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/BackOfficeConfigurations.java rename to libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/BackOfficeConfigurations.java diff --git a/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/ContractStorage.java b/libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/ContractStorage.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/ContractStorage.java rename to libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/ContractStorage.java diff --git a/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/Product.java b/libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/Product.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/Product.java rename to libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/Product.java diff --git a/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/ProductRole.java b/libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/ProductRole.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/ProductRole.java rename to libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/ProductRole.java diff --git a/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/ProductRoleInfo.java b/libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/ProductRoleInfo.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/ProductRoleInfo.java rename to libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/ProductRoleInfo.java diff --git a/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/ProductStatus.java b/libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/ProductStatus.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/ProductStatus.java rename to libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/entity/ProductStatus.java diff --git a/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/exception/InvalidRoleMappingException.java b/libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/exception/InvalidRoleMappingException.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/exception/InvalidRoleMappingException.java rename to libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/exception/InvalidRoleMappingException.java diff --git a/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/exception/ProductNotFoundException.java b/libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/exception/ProductNotFoundException.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/exception/ProductNotFoundException.java rename to libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/exception/ProductNotFoundException.java diff --git a/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/service/ProductService.java b/libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/service/ProductService.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/service/ProductService.java rename to libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/service/ProductService.java diff --git a/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/service/ProductServiceDefault.java b/libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/service/ProductServiceDefault.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/service/ProductServiceDefault.java rename to libs/onboarding-sdk/onboarding-sdk-product/src/main/java/it/pagopa/selfcare/product/service/ProductServiceDefault.java diff --git a/onboarding-sdk/onboarding-sdk-product/src/main/schema/Product_v1.avsc b/libs/onboarding-sdk/onboarding-sdk-product/src/main/schema/Product_v1.avsc similarity index 100% rename from onboarding-sdk/onboarding-sdk-product/src/main/schema/Product_v1.avsc rename to libs/onboarding-sdk/onboarding-sdk-product/src/main/schema/Product_v1.avsc diff --git a/onboarding-sdk/onboarding-sdk-product/src/test/java/ProductServiceDefaultTest.java b/libs/onboarding-sdk/onboarding-sdk-product/src/test/java/ProductServiceDefaultTest.java similarity index 100% rename from onboarding-sdk/onboarding-sdk-product/src/test/java/ProductServiceDefaultTest.java rename to libs/onboarding-sdk/onboarding-sdk-product/src/test/java/ProductServiceDefaultTest.java diff --git a/onboarding-sdk/pom.xml b/libs/onboarding-sdk/pom.xml similarity index 84% rename from onboarding-sdk/pom.xml rename to libs/onboarding-sdk/pom.xml index 6aa9c4584..709add501 100644 --- a/onboarding-sdk/pom.xml +++ b/libs/onboarding-sdk/pom.xml @@ -1,12 +1,8 @@ 4.0.0 - - it.pagopa.selfcare - onboarding - 0.0.1 - + it.pagopa.selfcare onboarding-sdk pom onboarding-sdk @@ -24,7 +20,7 @@ - github + selfcare-github Selfcare Onboarding SDK https://maven.pkg.github.com/pagopa/selfcare-onboarding diff --git a/libs/pom.xml b/libs/pom.xml new file mode 100644 index 000000000..f6d077917 --- /dev/null +++ b/libs/pom.xml @@ -0,0 +1,19 @@ + + + 4.0.0 + + + it.pagopa.selfcare + onboarding-root + 0.0.1 + + + onboarding-libs + pom + + + onboarding-sdk + + + diff --git a/onboarding-functions/.dockerignore b/onboarding-functions/.dockerignore deleted file mode 100644 index 94810d006..000000000 --- a/onboarding-functions/.dockerignore +++ /dev/null @@ -1,5 +0,0 @@ -* -!target/*-runner -!target/*-runner.jar -!target/lib/* -!target/quarkus-app/* \ No newline at end of file diff --git a/onboarding-ms/Dockerfile b/onboarding-ms/Dockerfile deleted file mode 100644 index 4e45f7ed7..000000000 --- a/onboarding-ms/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -# syntax=docker/dockerfile:1.6 -FROM maven:3-eclipse-temurin-17 AS builder - -WORKDIR /src - -COPY --link ./pom.xml . - -WORKDIR /src/onboarding-ms - -COPY --link ./onboarding-ms/pom.xml . -COPY ./onboarding-ms/src/main/ ./src/main/ - -RUN mvn -B package -DskipTests=true --file ./pom.xml - -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/onboarding-ms/target/quarkus-app/lib/ ./lib/ -COPY --from=builder /src/onboarding-ms/target/quarkus-app/*.jar ./ -COPY --from=builder /src/onboarding-ms/target/quarkus-app/app/ ./app/ -COPY --from=builder /src/onboarding-ms/target/quarkus-app/quarkus/ ./quarkus/ - -EXPOSE 8080 -USER 1001 - -ENTRYPOINT ["sh", "-c", "java $JAVA_OPTIONS -jar /app/quarkus-run.jar"] diff --git a/onboarding-ms/deploy-image-container-app.yaml b/onboarding-ms/deploy-image-container-app.yaml deleted file mode 100644 index dd14c8b45..000000000 --- a/onboarding-ms/deploy-image-container-app.yaml +++ /dev/null @@ -1,39 +0,0 @@ -properties: - managedEnvironmentId: /subscriptions/$SUBSCRIPTION_ID$/resourceGroups/$RESOURCE_GROUP$/providers/Microsoft.App/managedEnvironments/$CONTAINER_APP_ENV$ - configuration: - secrets: - - name: jwt-public-key - value: $JWT_PUBLIC_KEY$ - - name: mongo-connection-uri - value: $MONGODB_CONNECTION_URI$ - - name: user-registry-api-key - value: $USER_REGISTRY_API_KEY$ - - name: onboarding-functions-api-key - value: $ONBOARDING_FUNCTIONS_API_KEY$ - ingress: - external: true - allowInsecure: true - targetPort: 8080 - transport: Auto - template: - containers: - - image: ghcr.io/pagopa/selfcare-onboarding-ms:latest - name: selfcare-onboarding-ms - env: - - name: JWT_TOKEN_PUBLIC_KEY - secretRef: jwt-public-key - - name: MONGODB_CONNECTION_URI - secretRef: mongo-connection-uri - - name: USER_REGISTRY_API_KEY - secretRef: user-registry-api-key - - name: USER_REGISTRY_URL - value: $USER_REGISTRY_URL$ - - name: ONBOARDING_FUNCTIONS_API_KEY - secretRef: onboarding-functions-api-key - - name: ONBOARDING_FUNCTIONS_URL - value: $ONBOARDING_FUNCTIONS_URL$ - - name: ONBOARDING_ALLOWED_INSTITUTIONS_PRODUCTS - value: $ONBOARDING_ALLOWED_INSTITUTIONS_PRODUCTS$ - scale: - minReplicas: 1 - maxReplicas: 5 \ No newline at end of file diff --git a/pom.xml b/pom.xml index 4f9fefbaf..1c906f2dc 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 it.pagopa.selfcare - onboarding + onboarding-root 0.0.1 pom @@ -12,9 +12,8 @@ - onboarding-functions - onboarding-ms - onboarding-sdk + apps + libs @@ -24,11 +23,6 @@ https://pkgs.dev.azure.com/pagopaspa/selfcare-platform-app-projects/_packaging/selfcare-platform/maven/v1 - - selfcare-github - Selfcare Onboarding SDK - https://maven.pkg.github.com/pagopa/selfcare-onboarding -