Skip to content

Commit 285a717

Browse files
authored
Merge pull request #8 from EventStore/feature/crypto_shredding
Added samples for Protecting Sensitive Data in Event-Sourced Systems with Crypto Shredding
2 parents 962416a + 8273d1b commit 285a717

30 files changed

+1628
-48
lines changed
Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build
1+
name: Build CQRS Flow .NET
22

33
on:
44
push:
@@ -11,38 +11,37 @@ defaults:
1111
working-directory: ./CQRS_Flow/.NET/
1212

1313
jobs:
14-
build:
15-
runs-on: ubuntu-latest
16-
17-
steps:
18-
- name: Check Out Repo
19-
uses: actions/checkout@v1
20-
21-
- name: Start containers
22-
run: docker-compose -f "docker-compose.yml" up -d
23-
24-
- name: Setup .NET Core
25-
uses: actions/setup-dotnet@v1
26-
with:
27-
dotnet-version: "5.0.x"
28-
29-
- name: Restore NuGet packages
30-
run: dotnet restore
31-
32-
- name: Build
33-
run: dotnet build --configuration Release --no-restore
34-
35-
- name: Run tests
36-
run: dotnet test --configuration Release --no-build --logger "trx;LogFileName=test-results.trx"
37-
38-
- name: Publish test results
39-
uses: dorny/test-reporter@v1
40-
if: success() || failure()
41-
with:
42-
name: Tests Results
43-
reporter: dotnet-trx
44-
path: '**/test-results.trx'
45-
46-
- name: Stop containers
47-
if: always()
48-
run: docker-compose -f "docker-compose.yml" down
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Check Out Repo
19+
uses: actions/checkout@v1
20+
21+
- name: Start containers
22+
run: docker-compose -f "docker-compose.yml" up -d
23+
24+
- name: Setup .NET Core
25+
uses: actions/setup-dotnet@v1
26+
with:
27+
dotnet-version: "5.0.x"
28+
29+
- name: Restore NuGet packages
30+
run: dotnet restore
31+
32+
- name: Build
33+
run: dotnet build --configuration Release --no-restore
34+
35+
- name: Run tests
36+
run: dotnet test --configuration Release --no-build --logger "trx;LogFileName=test-results.trx"
37+
38+
- name: Upload test results
39+
uses: actions/upload-artifact@v2
40+
if: success() || failure()
41+
with:
42+
name: test-results
43+
path: "**/test-results.trx"
44+
45+
- name: Stop containers
46+
if: always()
47+
run: docker-compose -f "docker-compose.yml" down
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build Crypto Shredding .NET
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
defaults:
10+
run:
11+
working-directory: ./Crypto_Shredding/.NET
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Check Out Repo
19+
uses: actions/checkout@v1
20+
21+
- name: Start containers
22+
run: docker-compose -f "docker-compose.yml" up -d
23+
24+
- name: Setup .NET Core
25+
uses: actions/setup-dotnet@v1
26+
with:
27+
dotnet-version: "5.0.x"
28+
29+
- name: Restore NuGet packages
30+
run: dotnet restore
31+
32+
- name: Build
33+
run: dotnet build --configuration Release --no-restore
34+
35+
- name: Run tests
36+
run: dotnet test --configuration Release --no-build --logger "trx;LogFileName=test-results.trx"
37+
38+
- name: Upload test results
39+
uses: actions/upload-artifact@v2
40+
if: success() || failure()
41+
with:
42+
name: test-results
43+
path: "**/test-results.trx"
44+
45+
- name: Stop containers
46+
if: always()
47+
run: docker-compose -f "docker-compose.yml" down
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Test Report
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Build CQRS Flow .NET", "Build Crypto Shredding .NET"]
6+
types:
7+
- completed
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Publish test results
14+
uses: dorny/test-reporter@v1
15+
if: success() || failure()
16+
with:
17+
name: Tests Results
18+
artifact: test-results
19+
reporter: dotnet-trx
20+
path: "**/test-results.trx"
21+
fail-on-error: "false"

CQRS_Flow/.NET/README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,20 @@ This sample is showing a typical flow of the Event Sourcing pattern with [Event
66

77
## Prerequisities
88

9-
1. Install git - https://git-scm.com/downloads.
10-
2. Install .NET Core 5.0 - https://dotnet.microsoft.com/download/dotnet/5.0.
11-
3. Install Visual Studio 2019, Rider or VSCode.
12-
4. Install docker - https://docs.docker.com/docker-for-windows/install/.
13-
5. Open `ECommerce.sln` solution.
9+
- .NET 5.0 - https://dotnet.microsoft.com/download/dotnet/5.0.
10+
- Visual Studio 2019, Jetbrains Rider or VSCode.
11+
- Docker - https://docs.docker.com/docker-for-windows/install/.
1412

1513
## Running
1614

1715
1. Run: `docker-compose up`.
18-
2. Wait until all dockers got are downloaded and running.
19-
3. You should automatically get:
20-
- EventStoreDB UI: http://localhost:2113/
21-
- ElasticSearch running at http://localhost:9200
22-
- Kibana - UI for ElasticSearch . Available at: http://localhost:5601
16+
2. Wait until all Docker containers are up and running.
17+
3. Check that you can access each started component the following URLs:
18+
- EventStoreDB: http://localhost:2113/ (use the default user `admin` and password `changeit`)
19+
- ElasticSearch: http://localhost:9200
20+
- Kibana: http://localhost:5601
2321
4. Open, build and run `ECommerce.sln` solution.
24-
- Swagger should be available at: http://localhost:5000/index.html
25-
22+
- The Swagger UI should be available at: http://localhost:5000/index.html
2623

2724
## Overview
2825

0 commit comments

Comments
 (0)