Skip to content

Commit

Permalink
Merge branch 'NMSHDB-145-Backbone-Support-Show-sent-and-received-mess…
Browse files Browse the repository at this point in the history
…ages-of-an-identity' of https://github.com/nmshd/backbone into NMSHDB-145-Backbone-Support-Show-sent-and-received-messages-of-an-identity
  • Loading branch information
stamenione committed Jun 25, 2024
2 parents ba87ad8 + 1c7b278 commit e734527
Show file tree
Hide file tree
Showing 29 changed files with 350 additions and 186 deletions.
2 changes: 1 addition & 1 deletion .ci/acli/buildContainerImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ const tag = getRequiredEnvVar("TAG");
const platforms = process.env.PLATFORMS ?? "linux/amd64,linux/arm64";
const push = process.env.PUSH === "1" ? ["--push", "--provenance=true", "--sbom=true"] : "";

await $`docker buildx build --file ./Modules/Devices/src/Devices.AdminCli/Dockerfile --tag ghcr.io/nmshd/backbone-admin-cli:${tag} --platform ${platforms} ${push} .`;
await $`docker buildx build --file ./Modules/Devices/src/Devices.AdminCli/Dockerfile --tag ghcr.io/nmshd/backbone-admin-cli:${tag} --platform ${platforms} --build-arg VERSION=${tag} ${push} .`;
2 changes: 1 addition & 1 deletion .ci/aui/buildContainerImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ const tag = getRequiredEnvVar("TAG");
const platforms = process.env.PLATFORMS ?? "linux/amd64,linux/arm64";
const push = process.env.PUSH === "1" ? ["--push", "--provenance=true", "--sbom=true"] : "";

await $`docker buildx build --file ./AdminApi/src/AdminApi/Dockerfile --tag ghcr.io/nmshd/backbone-admin-ui:${tag} --platform ${platforms} ${push} .`;
await $`docker buildx build --file ./AdminApi/src/AdminApi/Dockerfile --tag ghcr.io/nmshd/backbone-admin-ui:${tag} --platform ${platforms} --build-arg VERSION=${tag} ${push} .`;
2 changes: 1 addition & 1 deletion .ci/capi/buildContainerImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ const tag = getRequiredEnvVar("TAG");
const platforms = process.env.PLATFORMS ?? "linux/amd64,linux/arm64";
const push = process.env.PUSH === "1" ? ["--push", "--provenance=true", "--sbom=true"] : "";

await $`docker buildx build --file ./ConsumerApi/Dockerfile --tag ghcr.io/nmshd/backbone-consumer-api:${tag} --platform ${platforms} ${push} .`;
await $`docker buildx build --file ./ConsumerApi/Dockerfile --tag ghcr.io/nmshd/backbone-consumer-api:${tag} --platform ${platforms} --build-arg VERSION=${tag} ${push} .`;
2 changes: 1 addition & 1 deletion .ci/dbm/buildContainerImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ const tag = getRequiredEnvVar("TAG");
const platforms = process.env.PLATFORMS ?? "linux/amd64,linux/arm64";
const push = process.env.PUSH === "1" ? ["--push", "--provenance=true", "--sbom=true"] : "";

await $`docker buildx build --file ./DatabaseMigrator/Dockerfile --tag ghcr.io/nmshd/backbone-database-migrator:${tag} --platform ${platforms} ${push} .`;
await $`docker buildx build --file ./DatabaseMigrator/Dockerfile --tag ghcr.io/nmshd/backbone-database-migrator:${tag} --platform ${platforms} --build-arg VERSION=${tag} ${push} .`;
1 change: 0 additions & 1 deletion .ci/docker-compose.test.postgres.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.3"
services:
### infrastructure ###

Expand Down
1 change: 0 additions & 1 deletion .ci/docker-compose.test.sqlserver.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.3"
services:
### infrastructure ###

Expand Down
25 changes: 6 additions & 19 deletions .ci/docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
version: "3.3"
services:
consumer-api:
container_name: consumer-api-test
hostname: consumer-api
build:
context: ..
dockerfile: ConsumerApi/Dockerfile
image: consumer-api:0.0.1
environment:
- ASPNETCORE_ENVIRONMENT=Development
ports:
Expand All @@ -24,9 +21,7 @@ services:
admin-ui:
container_name: admin-ui-test
hostname: admin-ui
build:
context: ..
dockerfile: AdminApi/src/AdminApi/Dockerfile
image: admin-ui:0.0.1
environment:
- ASPNETCORE_ENVIRONMENT=Development
ports:
Expand All @@ -42,9 +37,7 @@ services:

event-handler-service:
container_name: event-handler-service-test
build:
context: ..
dockerfile: EventHandlerService/src/EventHandlerService/Dockerfile
image: event-handler-service:0.0.1
environment:
- ASPNETCORE_ENVIRONMENT=Development
depends_on:
Expand All @@ -58,9 +51,7 @@ services:

sse-server:
container_name: sse-server-test
build:
context: ..
dockerfile: SseServer/src/SseServer/Dockerfile
image: sse-server:0.0.1
environment:
- ASPNETCORE_ENVIRONMENT=Development
configs:
Expand All @@ -69,9 +60,7 @@ services:

database-migrator:
container_name: database-migrator-test
build:
context: ..
dockerfile: DatabaseMigrator/Dockerfile
image: database-migrator:0.0.1
depends_on:
seed-database:
condition: service_completed_successfully
Expand Down Expand Up @@ -109,9 +98,7 @@ services:

seed-client:
container_name: seed-client-test
build:
context: ..
dockerfile: Modules/Devices/src/Devices.AdminCli/Dockerfile
image: seed-client:0.0.1
depends_on:
consumer-api:
condition: service_healthy
Expand Down
2 changes: 1 addition & 1 deletion .ci/eh/buildContainerImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ const tag = getRequiredEnvVar("TAG");
const platforms = process.env.PLATFORMS ?? "linux/amd64,linux/arm64";
const push = process.env.PUSH === "1" ? ["--push", "--provenance=true", "--sbom=true"] : "";

await $`docker buildx build --file ./EventHandlerService/src/EventHandlerService/Dockerfile --tag ghcr.io/nmshd/backbone-event-handler:${tag} --platform ${platforms} ${push} .`;
await $`docker buildx build --file ./EventHandlerService/src/EventHandlerService/Dockerfile --tag ghcr.io/nmshd/backbone-event-handler:${tag} --platform ${platforms} --build-arg VERSION=${tag} ${push} .`;
2 changes: 1 addition & 1 deletion .ci/fsc/buildContainerImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ const tag = getRequiredEnvVar("TAG");
const platforms = process.env.PLATFORMS ?? "linux/amd64,linux/arm64";
const push = process.env.PUSH === "1" ? ["--push", "--provenance=true", "--sbom=true"] : "";

await $`docker buildx build --file ./Modules/Files/src/Files.Jobs.SanityCheck/Dockerfile --tag ghcr.io/nmshd/backbone-files-sanity-check:${tag} --platform ${platforms} ${push} .`;
await $`docker buildx build --file ./Modules/Files/src/Files.Jobs.SanityCheck/Dockerfile --tag ghcr.io/nmshd/backbone-files-sanity-check:${tag} --platform ${platforms} --build-arg VERSION=${tag} ${push} .`;
2 changes: 1 addition & 1 deletion .ci/idj/buildContainerImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ const tag = getRequiredEnvVar("TAG");
const platforms = process.env.PLATFORMS ?? "linux/amd64,linux/arm64";
const push = process.env.PUSH === "1" ? ["--push", "--provenance=true", "--sbom=true"] : "";

await $`docker buildx build --file ./Jobs/src/Job.IdentityDeletion/Dockerfile --tag ghcr.io/nmshd/backbone-identity-deletion-jobs:${tag} --platform ${platforms} ${push} .`;
await $`docker buildx build --file ./Jobs/src/Job.IdentityDeletion/Dockerfile --tag ghcr.io/nmshd/backbone-identity-deletion-jobs:${tag} --platform ${platforms} --build-arg VERSION=${tag} ${push} .`;
16 changes: 11 additions & 5 deletions .ci/integrationTest.postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ dockerCompose() {
docker compose -f ./.ci/docker-compose.test.yml -f ./.ci/docker-compose.test.postgres.yml "$@"
}

dockerCompose down
dockerCompose build
dockerCompose up -d
dotnet restore "Backbone.sln"
dotnet build --no-restore "Backbone.sln"
{
dockerCompose down;
dockerCompose up -d --no-build
} &
{
dotnet restore "Backbone.sln";
dotnet build --no-restore "Backbone.sln"
}
wait

export CONSUMER_API_BASE_ADDRESS="http://localhost:5000"
export ADMIN_API_BASE_ADDRESS="http://localhost:5173"

dotnet test --no-restore --no-build --filter "Category=Integration&TestCategory!~ignore" --logger "GitHubActions;summary.includeNotFoundTests=false" "Backbone.sln"
16 changes: 11 additions & 5 deletions .ci/integrationTest.sqlserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ dockerCompose() {
docker compose -f ./.ci/docker-compose.test.yml -f ./.ci/docker-compose.test.sqlserver.yml "$@"
}

dockerCompose down
dockerCompose build
dockerCompose up -d
dotnet restore "Backbone.sln"
dotnet build --no-restore "Backbone.sln"
{
dockerCompose down;
dockerCompose up -d --no-build
} &
{
dotnet restore "Backbone.sln";
dotnet build --no-restore "Backbone.sln"
}
wait

export CONSUMER_API_BASE_ADDRESS="http://localhost:5000"
export ADMIN_API_BASE_ADDRESS="http://localhost:5173"

dotnet test --no-restore --no-build --filter "Category=Integration&TestCategory!~ignore" --logger "GitHubActions;summary.includeNotFoundTests=false" "Backbone.sln"
6 changes: 6 additions & 0 deletions .ci/loadDockerImages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -e

for f in /tmp/*.tar; do
docker load --input $f
done
2 changes: 1 addition & 1 deletion .ci/sc/buildContainerImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ const projectSuffix = $.env["PROJECT_SUFFIX"] ? `.${$.env["PROJECT_SUFFIX"]}` :

const moduleNameCamelCase = toCamelCase(moduleName);

await $`docker build --file ./Modules/${moduleName}/src/${moduleName}.Jobs.SanityCheck${projectSuffix}/Dockerfile --tag ghcr.io/nmshd/backbone-${moduleNameCamelCase}-sanity-check:${tag} .`;
await $`docker build --file ./Modules/${moduleName}/src/${moduleName}.Jobs.SanityCheck${projectSuffix}/Dockerfile --tag ghcr.io/nmshd/backbone-${moduleNameCamelCase}-sanity-check:${tag} --build-arg VERSION=${tag} .`;
2 changes: 1 addition & 1 deletion .ci/sses/buildContainerImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ const tag = getRequiredEnvVar("TAG");
const platforms = process.env.PLATFORMS ?? "linux/amd64,linux/arm64";
const push = process.env.PUSH === "1" ? ["--push", "--provenance=true", "--sbom=true"] : "";

await $`docker buildx build --file ./SseServer/src/SseServer/Dockerfile --tag ghcr.io/nmshd/backbone-sse-server:${tag} --platform ${platforms} ${push} .`;
await $`docker buildx build --file ./SseServer/src/SseServer/Dockerfile --tag ghcr.io/nmshd/backbone-sse-server:${tag} --platform ${platforms} --build-arg VERSION=${tag} ${push} .`;
Loading

0 comments on commit e734527

Please sign in to comment.