Skip to content

Commit

Permalink
Merge pull request #8 from EventStore/feature/crypto_shredding
Browse files Browse the repository at this point in the history
Added samples for Protecting Sensitive Data in Event-Sourced Systems with Crypto Shredding
  • Loading branch information
ylorph authored Aug 9, 2021
2 parents 962416a + 8273d1b commit 285a717
Show file tree
Hide file tree
Showing 30 changed files with 1,628 additions and 48 deletions.
71 changes: 35 additions & 36 deletions .github/workflows/build.cqrs_flow.dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Build CQRS Flow .NET

on:
push:
Expand All @@ -11,38 +11,37 @@ defaults:
working-directory: ./CQRS_Flow/.NET/

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check Out Repo
uses: actions/checkout@v1

- name: Start containers
run: docker-compose -f "docker-compose.yml" up -d

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: "5.0.x"

- name: Restore NuGet packages
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Run tests
run: dotnet test --configuration Release --no-build --logger "trx;LogFileName=test-results.trx"

- name: Publish test results
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Tests Results
reporter: dotnet-trx
path: '**/test-results.trx'

- name: Stop containers
if: always()
run: docker-compose -f "docker-compose.yml" down
build:
runs-on: ubuntu-latest

steps:
- name: Check Out Repo
uses: actions/checkout@v1

- name: Start containers
run: docker-compose -f "docker-compose.yml" up -d

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: "5.0.x"

- name: Restore NuGet packages
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Run tests
run: dotnet test --configuration Release --no-build --logger "trx;LogFileName=test-results.trx"

- name: Upload test results
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: test-results
path: "**/test-results.trx"

- name: Stop containers
if: always()
run: docker-compose -f "docker-compose.yml" down
47 changes: 47 additions & 0 deletions .github/workflows/build.crypto_shredding.dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build Crypto Shredding .NET

on:
push:
branches:
- main
pull_request:

defaults:
run:
working-directory: ./Crypto_Shredding/.NET

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check Out Repo
uses: actions/checkout@v1

- name: Start containers
run: docker-compose -f "docker-compose.yml" up -d

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: "5.0.x"

- name: Restore NuGet packages
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Run tests
run: dotnet test --configuration Release --no-build --logger "trx;LogFileName=test-results.trx"

- name: Upload test results
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: test-results
path: "**/test-results.trx"

- name: Stop containers
if: always()
run: docker-compose -f "docker-compose.yml" down
21 changes: 21 additions & 0 deletions .github/workflows/build.dotnet.testreport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test Report

on:
workflow_run:
workflows: ["Build CQRS Flow .NET", "Build Crypto Shredding .NET"]
types:
- completed

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Publish test results
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Tests Results
artifact: test-results
reporter: dotnet-trx
path: "**/test-results.trx"
fail-on-error: "false"
21 changes: 9 additions & 12 deletions CQRS_Flow/.NET/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,20 @@ This sample is showing a typical flow of the Event Sourcing pattern with [Event

## Prerequisities

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

## Running

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

- The Swagger UI should be available at: http://localhost:5000/index.html

## Overview

Expand Down
Loading

0 comments on commit 285a717

Please sign in to comment.