Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into use-caching-in-github-actions
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/test.yml
  • Loading branch information
MH321Productions committed Jun 5, 2024
2 parents be60b28 + 88b612f commit 3a48911
Show file tree
Hide file tree
Showing 1,325 changed files with 33,476 additions and 10,710 deletions.
6 changes: 5 additions & 1 deletion .ci/appsettings.override.postgres.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@
"ConnectionString": "User ID=devices;Password=Passw0rd;Server=postgres;Port=5432;Database=enmeshed;"
},
"PushNotifications": {
"Provider": "Dummy"
"Providers": {
"dummy": {
"enabled": true
}
}
}
}
},
Expand Down
6 changes: 5 additions & 1 deletion .ci/appsettings.override.sqlserver.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@
"ConnectionString": "Server=sqlserver;Database=enmeshed;User Id=devices;Password=Passw0rd;TrustServerCertificate=True"
},
"PushNotifications": {
"Provider": "Dummy"
"Providers": {
"dummy": {
"enabled": true
}
}
}
}
},
Expand Down
11 changes: 11 additions & 0 deletions .ci/dbm/buildContainerImage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env node

import { $ } from "zx";
import { getRequiredEnvVar } from "../lib.js";

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} .`;
10 changes: 5 additions & 5 deletions .ci/docker-compose.test.postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ services:

seed-database:
image: postgres
volumes:
- ../setup-db:/app/setup-db
environment:
- PGPASSWORD=Passw0rd
command: psql -h postgres -U postgres -d enmeshed -f /app/setup-db/setup-postgres.sql
depends_on:
database:
condition: service_healthy

seed-client:
environment:
Database__Provider: Postgres
Database__ConnectionString: "Server=postgres;Database=enmeshed;User Id=devices;Password=Passw0rd;Port=5432"

database-migrator:
environment:
Infrastructure__SqlDatabase__Provider: Postgres
Infrastructure__SqlDatabase__ConnectionString: "Server=postgres;Database=enmeshed;User Id=postgres;Password=Passw0rd;Port=5432"

configs:
Config:
file: appsettings.override.postgres.json
Expand Down
14 changes: 10 additions & 4 deletions .ci/docker-compose.test.sqlserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,30 @@ services:
- MSSQL_SA_PASSWORD=Passw0rd
- ACCEPT_EULA=Y
- MSSQL_PID=Express
healthcheck:
test: ["CMD", "echo"]
interval: 1s
timeout: 1s
retries: 1
ports:
- 1433:1433

### seeds ###

seed-database:
image: mcr.microsoft.com/mssql-tools
volumes:
- ../setup-db:/app/setup-db
command: bash -c " sleep 20 && /opt/mssql-tools/bin/sqlcmd -S sqlserver -U SA -P Passw0rd -i /app/setup-db/setup-sqlserver.sql "
depends_on:
- database

seed-client:
environment:
Database__Provider: SqlServer
Database__ConnectionString: "Server=sqlserver;Database=enmeshed;User Id=devices;Password=Passw0rd;TrustServerCertificate=True"

database-migrator:
environment:
Infrastructure__SqlDatabase__Provider: SqlServer
Infrastructure__SqlDatabase__ConnectionString: "Server=sqlserver;Database=enmeshed;User Id=sa;Password=Passw0rd;TrustServerCertificate=True"

configs:
Config:
file: appsettings.override.sqlserver.json
Expand Down
47 changes: 40 additions & 7 deletions .ci/docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ services:
ports:
- "5000:8080"
depends_on:
database:
condition: service_started
database-migrator:
condition: service_completed_successfully
rabbitmq:
condition: service_started
seed-database:
condition: service_completed_successfully
azure-storage-emulator:
condition: service_started
configs:
Expand All @@ -52,12 +50,40 @@ services:
ports:
- "5173:8080"
depends_on:
database:
database-migrator:
condition: service_completed_successfully
rabbitmq:
condition: service_started
configs:
- source: Config
target: app/appsettings.override.json

event-handler-service:
container_name: event-handler-service-test
build:
context: ..
dockerfile: EventHandlerService/src/EventHandlerService/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
depends_on:
database-migrator:
condition: service_completed_successfully
rabbitmq:
condition: service_started
consumer-api:
condition: service_healthy
configs:
- source: Config
target: app/appsettings.override.json

database-migrator:
container_name: database-migrator-test
build:
context: ..
dockerfile: DatabaseMigrator/Dockerfile
depends_on:
seed-database:
condition: service_completed_successfully
environment:
- ASPNETCORE_ENVIRONMENT=Development
configs:
- source: Config
target: app/appsettings.override.json
Expand All @@ -81,6 +107,13 @@ services:

### seeds ###

seed-database:
volumes:
- ../setup-db:/app/setup-db
depends_on:
database:
condition: service_healthy

seed-client:
container_name: seed-client-test
image: seed-client
Expand Down
11 changes: 11 additions & 0 deletions .ci/eh/buildContainerImage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env node

import { $ } from "zx";
import { getRequiredEnvVar } from "../lib.js";

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} .`;
16 changes: 0 additions & 16 deletions .ci/extractVersionFromGitTag.js

This file was deleted.

3 changes: 2 additions & 1 deletion .ci/helm/buildChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ import { getRequiredEnvVar } from "../lib.js";
const version = getRequiredEnvVar("VERSION");

await $`helm dependency update helm`;
await $`helm package --version ${version} helm`;

await $`helm package --version ${version} --app-version ${version} helm`;
11 changes: 11 additions & 0 deletions .ci/idj/buildContainerImage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env node

import { $ } from "zx";
import { getRequiredEnvVar } from "../lib.js";

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} .`;
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @tnotheis @jkoenig134
* @tnotheis @jkoenig134
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,23 @@ updates:
- "daniel-almeida-konkconsulting"
labels:
- "dependencies"

##### Docker #####
- package-ecosystem: "docker"
directories:
- "/AdminApi/src/AdminApi"
- "/ConsumerApi"
- "/DatabaseMigrator"
- "/EventHandlerService/src/EventHandlerService"
- "/Jobs/src/Job.IdentityDeletion"
- "/Modules/Devices/src/Devices.AdminCli"
schedule:
interval: "weekly"
groups:
update-docker-dependencies:
patterns:
- "*"
reviewers:
- "tnotheis"
labels:
- "dependencies"
46 changes: 0 additions & 46 deletions .github/workflows/publish-acli.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/publish-aui.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/publish-capi.yml

This file was deleted.

Loading

0 comments on commit 3a48911

Please sign in to comment.