Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Unités] Pouvoir créer une mission à partir d'une unité #2815

Merged
merged 69 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
3b5745e
Generate legacy control units stubs
ivangabriele Jan 12, 2024
ace3ca2
Add new mission button in control unit card
ivangabriele Jan 15, 2024
9e89150
Fix control unit administration change in mission form
ivangabriele Jan 15, 2024
98223a8
Update e2e tests data following stubs update
ivangabriele Jan 15, 2024
c6dfab0
Fix mission opening from vessel sidebar control list
ivangabriele Jan 16, 2024
08c24ef
Fix dirty mission draft switching
ivangabriele Jan 16, 2024
1b243c8
Refactor SonarCloud suggestions
ivangabriele Jan 16, 2024
1866fc2
Allow mission and action switching from map when a mission form is open
ivangabriele Jan 24, 2024
dea9d0e
Remove useless form keys update when editing new existing mission
ivangabriele Jan 24, 2024
0ca8305
Migrate MissionForm loading to dispatchers thunks
ivangabriele Feb 6, 2024
f5eb88b
Fix mission ID logic in mission form saving function
ivangabriele Feb 12, 2024
bf393b0
Update control unit list dialog e2e test data
ivangabriele Feb 12, 2024
04a37b7
Restore draft cancellation confirmation
ivangabriele Feb 12, 2024
92d7fab
Restore sideWindow closure detection for draft cancellation confirmation
ivangabriele Feb 12, 2024
ab568fa
Simplify createOrUpdate() mission form create/update
ivangabriele Feb 12, 2024
93c1735
Automatically retry debounced functions on pending in mission form
ivangabriele Feb 13, 2024
22829b4
Fix missing pending use case unsetting
ivangabriele Feb 13, 2024
6047138
Add some waits in mission main form e2e test
ivangabriele Feb 13, 2024
dd10d4a
Merge 4 first beacon malfunctions board e2e tests to prevent flakiness
ivangabriele Feb 13, 2024
b20a2dd
Fix mission form closing e2e test flakiness
ivangabriele Feb 13, 2024
763add6
Add type assertion in rethrowErrorIfDefined() util
ivangabriele Feb 15, 2024
299c2a2
Replace merged beacon malfunctions e2e tests old its with logs
ivangabriele Feb 15, 2024
0eaee13
Update SideWindow.Path tsdoc example
ivangabriele Feb 15, 2024
655b627
Rename displayOrLogError() errorKey to displayedErrorBoundary
ivangabriele Feb 15, 2024
4db4f5c
Move MissionForm from SideWindow to Mission feature
ivangabriele Feb 15, 2024
32be9be
Refactor some review comments
ivangabriele Feb 15, 2024
4bee4d6
Fix lint issues in Mission feature
ivangabriele Feb 15, 2024
40d1bfd
Mock console in assert() & ensure() unit tests
ivangabriele Feb 15, 2024
5661c7f
Rename PendingUseCase to UseCaseStore
ivangabriele Feb 15, 2024
c8ee1ac
Re-enable mission action opening from vessel sidebar control list
ivangabriele Feb 15, 2024
3904c30
Fix lint issue
ivangabriele Feb 15, 2024
6a3906e
Refactor DisplayedError to handle class and use case outside Redux
ivangabriele Feb 15, 2024
1713836
Merge MainApp feature slice into MissionForm component one
ivangabriele Feb 15, 2024
25e9c78
Fix MissionForm getMissionActionsDataFromMissionActionsFormValues() u…
ivangabriele Feb 16, 2024
9cd5dcf
Reset mission form state before loading a new mission
ivangabriele Feb 16, 2024
7d0a7c3
Fix control unit resource key in mission main form
ivangabriele Feb 16, 2024
cfb3fa8
Fix wrong nullish operator in useGetMainFormFormikUsecases()
ivangabriele Feb 19, 2024
b0aad8c
Rename assert() util to assertNotNullish() and remove var name
ivangabriele Feb 19, 2024
1a7e131
Replace ensure() util with assertNotNullish() one
ivangabriele Feb 19, 2024
faef36d
Remove useless MissionFormState todo
ivangabriele Feb 19, 2024
cf4d397
Simplify complex getMissionWithActions() use case with unwrap()
ivangabriele Feb 19, 2024
3d38a73
Link @store to store/index.ts in tsconfig
ivangabriele Feb 19, 2024
1374769
Move UseCaseStore in store & untype store keys
ivangabriele Feb 19, 2024
a6b22fb
Setup local development with MonitorEnv Docker image
ivangabriele Feb 20, 2024
ba3de81
Force refetch in getMissionWithActions() use case
ivangabriele Feb 20, 2024
7b2f339
Refetch missions on mission form destruction
ivangabriele Feb 20, 2024
a33c578
Replace custom properties file with env injection for run-back-with-m…
ivangabriele Feb 20, 2024
f4c4153
Remove FRONTEND_SENTRY_DSN value in .env.example
ivangabriele Feb 20, 2024
309dbe8
Add dev-env in npm commands to run Frontend with MonitorEnv Docker image
ivangabriele Feb 20, 2024
e03fdc9
Setup typings for Puppeteer
ivangabriele Feb 20, 2024
c5a88b7
Fix mission sync e2e test
ivangabriele Feb 20, 2024
32e7f12
Rename npm and makefile commands dev-env to dev-monitorenv
ivangabriele Feb 20, 2024
62f1c93
Fix puppeteer typings directory name
ivangabriele Feb 20, 2024
b3cd13b
Start gathering docker files in /infra/docker
ivangabriele Feb 20, 2024
af674eb
Fix SonarLint issues
ivangabriele Feb 20, 2024
3160114
Add missing execution rights on infra/docker/app/env.sh
ivangabriele Feb 20, 2024
96d5bc1
Fix Wiremock local mappings path in docker compose files
ivangabriele Feb 20, 2024
ccad37c
Remove unused infra/local/docker-compose-yml file
ivangabriele Feb 20, 2024
177fba8
Fix docker-compose.puppeteer.dev.yml name
ivangabriele Feb 20, 2024
4dc74ec
Fix Wiremock local mappings path in docker compose files (bis)
ivangabriele Feb 20, 2024
909a395
Remove unused DB_PUBLIC_PORT env var
ivangabriele Feb 20, 2024
28a2e5e
Normalize env loading with .env.local.defaults + .env.local = .env st…
ivangabriele Feb 20, 2024
6b161b3
Move /infra/.env.local.defaults file into /infra/docker
ivangabriele Feb 21, 2024
69127d9
Add ADR0003 about Docker & Frontend env vars strategy
ivangabriele Feb 21, 2024
fe60814
Rename env command to docker-env in Makefile
ivangabriele Feb 21, 2024
8a7a842
Update ignore env files in .gitignore
ivangabriele Feb 21, 2024
d565cad
Fix & upgrade MonitorEnv app in Puppeteer docker compose file
ivangabriele Feb 21, 2024
f1b0c8e
Fix .env.example copy in app Dockerfile
ivangabriele Feb 21, 2024
72093cd
Restore docker-compose-puppeteer-up command in Makefile
ivangabriele Feb 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cicd-data-processing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "datascience/**"
- "backend/src/main/resources/db/migration/**"
- ".github/workflows/*"
- "infra/docker/Dockerfile.DataPipeline"
- "infra/docker/datapipeline/**"
- "Makefile"
schedule:
- cron: "38 11 */3 * *"
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
context: .
load: true
builder: ${{ steps.buildx.outputs.name }}
file: infra/docker/Dockerfile.DataPipeline
file: infra/docker/datapipeline/Dockerfile
push: false
tags: monitorfish-pipeline:${{ env.VERSION }}
cache-from: type=local,src=/tmp/.buildx-cache-pipeline
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
- "**.yml"
- ".github/workflows/cicd.yml"
- "infra/configurations/**.properties"
- "infra/docker/DockerfileBuildApp"
- "infra/docker/app/**"
- "**.sql"
- "backend/pom.xml"
- "backend/build.gradle.kts"
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
context: .
load: true
builder: ${{ steps.buildx.outputs.name }}
file: infra/docker/DockerfileBuildApp
file: infra/docker/app/Dockerfile
push: false
tags: monitorfish-app:${{ env.VERSION }}
cache-from: type=local,src=/tmp/.buildx-cache-app
Expand Down Expand Up @@ -202,7 +202,6 @@ jobs:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
CYPRESS_PROJECT_ID: ${{ secrets.PROJECT_ID }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
DB_PUBLIC_PORT: 5432
ENV_PROFILE: ${{ needs.version.outputs.ENV_PROFILE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MONITORFISH_VERSION: ${{ needs.version.outputs.VERSION }}
Expand Down Expand Up @@ -260,7 +259,6 @@ jobs:
runs-on: ubuntu-22.04
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
DB_PUBLIC_PORT: 5432
ENV_PROFILE: ${{ needs.version.outputs.ENV_PROFILE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MONITORFISH_VERSION: ${{ needs.version.outputs.VERSION }}
Expand All @@ -279,9 +277,6 @@ jobs:
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${GITHUB_ACTOR} --password-stdin

- name: Run docker images
run: make docker-compose-puppeteer-up

- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -293,6 +288,9 @@ jobs:
run: npm ci
working-directory: ./frontend

- name: Run docker images
run: make docker-compose-puppeteer-up

- name: Install Firefox
run: npx puppeteer browsers install firefox

Expand Down
21 changes: 17 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,23 @@ dist
################################################################################
# Custom

# Env variables & configuration files
datascience/.env
# Env variables
/datascience/.env
# Our .env files follow the `import-meta-env` convention:
# - `.env`: git-ignored, generated from `.env.local.defaults`, overriden by `.env.local`.
# - `.env.example`: git-commited, only for /frontend, used to enforce the env that must be injected at runtime via `import-meta-env`.
# - `.env.local`: git-ignored, used when necessary to override `.env.local.defaults` default values.
# - `.env.local.defaults`: git-commited, used to share default values with Github contributors.
# https://import-meta-env.org/api.html#import-meta-env-prepare
# All explicited here for documentation purposes:
/frontend/.env
/frontend/.env.local
/infra/docker/.env
/infra/docker/.env.local

# Configuration files
github_token.txt
infra/remote/backup/pg_backup.config
/infra/remote/backup/pg_backup.config

# Notebooks
/datascience/notebooks
Expand Down Expand Up @@ -187,4 +200,4 @@ backend/.gradle
.gradle

# Ignore Gradle build output directory
backend/build
backend/build
80 changes: 58 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,51 +1,78 @@
INFRA_FOLDER="$(shell pwd)/infra/configurations/"
HOST_MIGRATIONS_FOLDER=$(shell pwd)/backend/src/main/resources/db/migration

.PHONY: install init-sig run-front run-back docker-build docker-tag docker-push check-clean-archi test restart-app
.PHONY: clean install test

docker-env:
cd ./infra/docker && ../../frontend/node_modules/.bin/import-meta-env-prepare -u -x ./.env.local.defaults\

################################################################################
# Local Development

# DEV commands
install:
cd ./frontend && npm i

run-front:
cd ./frontend && npm run dev

run-back: run-stubbed-apis
docker compose up -d --quiet-pull --wait db
cd backend && ./gradlew bootRun --args='--spring.profiles.active=local --spring.config.additional-location=$(INFRA_FOLDER)'

run-back-with-monitorenv: run-monitorenv
docker compose up -d --quiet-pull --wait db
cd backend && MONITORENV_URL=http://localhost:9880 ./gradlew bootRun --args='--spring.profiles.active=local --spring.config.additional-location=$(INFRA_FOLDER)'

run-monitorenv: docker-env
docker compose \
--project-directory ./infra/docker \
--env-file ./infra/docker/.env \
-f ./infra/docker/docker-compose.monitorenv.dev.yml \
up -d monitorenv_app

run-stubbed-apis:
docker compose stop geoserver-monitorenv-stubs
docker compose up -d --quiet-pull --wait geoserver-monitorenv-stubs

stop-stubbed-apis:
docker stop cypress-geoserver-1
erase-db:

clean: docker-env
rm -Rf ./backend/target
docker compose down -v
docker compose -f ./frontend/cypress/docker-compose.yml down -v
docker compose -f ./frontend/puppeteer/docker-compose.dev.yml down -v
docker compose --env-file ./infra/docker/.env -f ./infra/docker/docker-compose.monitorenv.dev.yml down -v
docker compose --env-file ./infra/docker/.env -f ./infra/docker/docker-compose.cypress.yml down -v
docker compose -f ./infra/docker/docker-compose.puppeteer.yml down -v

check-clean-archi:
cd backend/tools && ./check-clean-architecture.sh

################################################################################
# Testing

test: test-back
cd frontend && CI=true npm run test:unit -- --coverage

test-back: check-clean-archi
cd backend && ./gradlew clean test
clean:
make erase-db
rm -Rf ./backend/target
dev: clean
make run-back

lint-back:
cd ./backend && ./gradlew ktlintFormat | grep -v \
-e "Exceeded max line length" \
-e "Package name must not contain underscore" \
-e "Wildcard import"
run-back-for-puppeteer: run-stubbed-apis

run-back-for-puppeteer: docker-env run-stubbed-apis
docker compose up -d --quiet-pull --wait db
docker compose -f ./frontend/puppeteer/docker-compose.dev.yml up -d
cd backend && MONITORENV_URL=http://localhost:8882 ./gradlew bootRun --args='--spring.profiles.active=local --spring.config.additional-location=$(INFRA_FOLDER)'
docker compose -f ./infra/docker/docker-compose.puppeteer.yml up -d monitorenv-app
cd backend && MONITORENV_URL=http://localhost:9880 ./gradlew bootRun --args='--spring.profiles.active=local --spring.config.additional-location=$(INFRA_FOLDER)'

run-front-for-puppeteer:
cd ./frontend && npm run dev-puppeteer

# CI commands - app
docker-build:
docker build --no-cache -f infra/docker/DockerfileBuildApp . -t monitorfish-app:$(VERSION) \
docker build --no-cache -f infra/docker/app/Dockerfile . -t monitorfish-app:$(VERSION) \
--build-arg VERSION=$(VERSION) \
--build-arg ENV_PROFILE=$(ENV_PROFILE) \
--build-arg GITHUB_SHA=$(GITHUB_SHA) \
Expand All @@ -58,22 +85,25 @@ docker-tag:
docker-push:
docker push docker.pkg.github.com/mtes-mct/monitorfish/monitorfish-app:$(VERSION)
docker-compose-down:
docker compose -f ./frontend/cypress/docker-compose.yml down -v
docker compose -f ./infra/docker/docker-compose.cypress.yml down -v
docker-compose-up:
docker compose -f ./frontend/cypress/docker-compose.yml up -d --quiet-pull db
docker compose -f ./frontend/cypress/docker-compose.yml up --quiet-pull flyway
docker compose -f ./frontend/cypress/docker-compose.yml up -d --quiet-pull app
docker compose -f ./infra/docker/docker-compose.cypress.yml up -d --quiet-pull db
docker compose -f ./infra/docker/docker-compose.cypress.yml up --quiet-pull flyway
docker compose -f ./infra/docker/docker-compose.cypress.yml up -d --quiet-pull app
@printf 'Waiting for backend app to be ready'
@until curl --output /dev/null --silent --fail "http://localhost:8880/bff/v1/healthcheck"; do printf '.' && sleep 1; done

docker-compose-puppeteer-up:
docker compose -f ./frontend/puppeteer/docker-compose.yml up -d
@printf 'Waiting for backend app to be ready'
docker-compose-puppeteer-up: docker-env
docker compose -f ./infra/docker/docker-compose.puppeteer.yml up -d monitorenv-app
docker compose -f ./infra/docker/docker-compose.puppeteer.yml up -d monitorfish-app
@printf 'Waiting for MonitorEnv app to be ready'
@until curl --output /dev/null --silent --fail "http://localhost:9880/bff/v1/healthcheck"; do printf '.' && sleep 1; done
@printf 'Waiting for MonitorFish app to be ready'
@until curl --output /dev/null --silent --fail "http://localhost:8880/bff/v1/healthcheck"; do printf '.' && sleep 1; done

# CI commands - data pipeline
docker-build-pipeline:
docker build -f "infra/docker/Dockerfile.DataPipeline" . -t monitorfish-pipeline:$(VERSION)
docker build -f ./infra/docker/datapipeline/Dockerfile . -t monitorfish-pipeline:$(VERSION)
docker-test-pipeline:
docker run --network host -v /var/run/docker.sock:/var/run/docker.sock -u monitorfish-pipeline:$(DOCKER_GROUP) --env-file datascience/.env.test --env HOST_MIGRATIONS_FOLDER=$(HOST_MIGRATIONS_FOLDER) monitorfish-pipeline:$(VERSION) coverage run -m pytest --pdb tests
docker-tag-pipeline:
Expand Down Expand Up @@ -120,3 +150,9 @@ build-docs-locally:
cd datascience/docs && \
poetry run sphinx-build -b html source build/html/en && \
poetry run sphinx-build -b html -D language=fr source build/html/fr

################################################################################
# Alias commands

dev: clean run-back
dev-monitorenv: clean run-back-with-monitorenv
109 changes: 109 additions & 0 deletions adrs/0003-docker-and-frontend-env-vars-strategy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Stratégie de gestion des variables d'environnement de Docker et du Frontend

Date: 21/02/2024

## Statut

Résolu.

## Contexte

Nous commitions nos fichiers de variables d'environnement avec des valeurs par défaut jusqu'alors dans
`/infra/configuration/.env.[environment]`.

Mais deux besoins sont apparus :

- Sécuriser les variables d'environnement qui ne sont pas sensées être committées (même si les clés que nous partagions
ne représentaient pas de risque particulier car ce sont des clés d'accès à des APIs de données publiques).
- Pouvoir surcharger localement les variables d'environnement partagées pour les adapter à des besoins de développement
spécifiques (ex : activer/désactiver certains feature flags).

Tout en conservant la possibilité de partager les variables d'environnement partagées entre les membres de l'équipe
ainsi que d'éventuel.les contributeur.icess open-source.

Le problème est qu'il existe différentes stratégie et conventions concernant l'orgnisation des fichiers `.env*`,
dépendants du framework, des librairies de parsing, des outils de build et de runtime utilisés. Sans qu'aucune ne soit
devenue une référence de facto.

### Dotenv

- https://www.dotenv.org/docs/security

Dotenv a un stratégie basée simplement sur des `.env` et `.env.[environment]` (ex : `.env.production`), qui doivent être
ignorés par Git et partagés via un `.env.vault` qui lui est committé. Un `.env.me`, lui aussi ignoré par Git, est unique
à chaque contributeur.ice et permet de dévérrouiller le `.env.vault`.

> The .env.vault file uniquely identifies your project in dotenv-vault. You SHOULD commit this file to source control.
> It is safe to do so. Aside: DON'T commit your .env or .env.me to source control.

### Vite

- https://vitejs.dev/guide/env-and-mode.html#env-variables-and-modes

Vite a une stratégie basée sur des `.env` et `.env.[mode]` (i.e `.env.production`), qui sont partageables via Git alors
que les `.env.local` et `.env.[mode].local` soivent ignorés par Git. Les `.env.local*` permettent de surcharger
localement les `.env*` partagés.

> ```
> .env # loaded in all cases
> .env.local # loaded in all cases, ignored by git
> .env.[mode] # only loaded in specified mode
> .env.[mode].local # only loaded in specified mode, ignored by git
> ```

### `import-meta-env`

Cette librairie regroupe un ensemble d'outils et de librairies pour injecter des variables d'environnements au runtime
dans une SPA. Comme expliqué dans l'[ADR 0001](0001-frontend-runtime-env-var-injection.md), nous avons choisi d'utiliser
`@import-meta-env/cli` pour injecter ces variables d'environnement dans notre Frontend.

Pour rappel, deux fichiers y sont attendus par défaut :

- `.env.example` : committé par Git, sert à définir les **variables** d'environnement requises par l'application.
- `.env` : pas de précision concernant Git, sert à définir les **valeurs** par défaut des variables d'environnement.

Il existe cependant un autre outil, `@import-meta-env/prepare`, qui permet de générer des fichiers `.env` à la volée à
partir d'un fichier `.env.local.defaults` partagé, surchargé d'un fichier `.env.local` s'il est présent :

- `.env.local.defaults` : committé via Git, sert à définir les **valeurs** par défaut des variables d'environnement.
- `.env.local` : ignoré par Git, sert à surcharger localement les valeurs par défaut.
- `.env` : ignoré par Git, généré automatiquement à partir des deux fichiers précédents par `import-meta-env-prepare`.

> ```
> Usage: import-meta-env-prepare [options]
>
> Generate `.env` file from `.env.*` files.
>
> Options:
> -e, --env <path> .env file path to write (default: ".env")
> -x, --example <path> .env.example file path to read
> -p, --path <path...> .env.* file paths to read (default:
> [".env.local.defaults",".env.local"])
> -u, --user-environment whether to load user environment variables (i.e.,
> process.env.*) (default: false)
> ```

## Décision

Comme il n'existe pas de convention générale, et que nous avons déjà choisi d'utiliser `import-meta-env` pour
implémenter et injecter les variables d'environnement du Frontend, nous avons choisi ce qui nous semblait le plus simple
en utilisant aussi leur outil `@import-meta-env/prepare`. Cela comprends leur convention et s'applique maintenant aussi
aux variables d'environnement de Docker, pas soucis de cohérence.

## Conséquences

Nous nous retrouvons donc avec cette structure :

| Fichier | Contexte | Git | Description |
| ----------------------------------- | -------- | ------- | --------------------------------------------------------------------- |
| `/frontend/.env.example` | Frontend | OUI | Définit les **variables** d'environnement requises par l'application. |
| `/frontend/.env.local.defaults` | Frontend | OUI | Définit les **valeurs** par défaut des variables d'environnement. |
| `/frontend/.env.local` | Frontend | **NON** | Surcharge localement les valeurs par défaut. Non obligatoire. |
| `/frontend/.env` | Frontend | **NON** | Automatiquement généré (`.env.local.defaults` + .`.env.local`). |
| `/infra/docker/.env.local.defaults` | Docker | OUI | Définit les **valeurs** par défaut des variables d'environnement. |
| `/infra/docker/.env.local` | Docker | **NON** | Surcharge localement les valeurs par défaut. Non obligatoire. |
| `/infra/docker/.env` | Docker | **NON** | Automatiquement généré (`.env.local.defaults` + .`.env.local`). |

> [!NOTE]
> Vous noterez qu'il n'y a pas de `.env.example` pour les variables d'environnement de Docker. Le `.env.example` ne sert
> en effet qu'à valider l'injection des variables d'environnement au runtime, ce qui n'a pas de sens pour Docker.
2 changes: 1 addition & 1 deletion backend/scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ ! -f mvnw ]; then
exit 1
fi

SPRING_PROFILES_ACTIVE=local
SPRING_PROFILES_ACTIVE=${1:-local}
INFRA_FOLDER="$(pwd)/../infra/configurations/"

./mvnw spring-boot:run -Dspring-boot.run.arguments="--spring.config.additional-location=$INFRA_FOLDER" -Dspring-boot.run.profiles="$SPRING_PROFILES_ACTIVE"
Loading
Loading