This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
75 changed files
with
3,714 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
trigger: | ||
- develop | ||
- main | ||
- releases/* | ||
|
||
pool: | ||
vmImage: windows-latest | ||
|
||
steps: | ||
- task: UseDotNet@2 | ||
displayName: 'Install .NET 6 SDK' | ||
inputs: | ||
packageType: 'sdk' | ||
version: '6.0.x' | ||
performMultiLevelLookup: true | ||
|
||
- script: | | ||
ls | ||
cd Source/CDR.GetDataRecipients | ||
ls | ||
dotnet restore | ||
dotnet build --configuration Release | ||
- task: DotNetCoreCLI@2 | ||
inputs: | ||
command: publish | ||
arguments: '--configuration Release --output publish_output' | ||
projects: 'Source/CDR.GetDataRecipients/CDR.GetDataRecipients.csproj' | ||
publishWebProjects: false | ||
modifyOutputPath: false | ||
zipAfterPublish: false | ||
|
||
- task: ArchiveFiles@2 | ||
displayName: 'Archive Files' | ||
inputs: | ||
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/publish_output' | ||
includeRootFolder: false | ||
archiveFile: '$(System.DefaultWorkingDirectory)/CDR.GetDataRecipients.zip' | ||
|
||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
PathToPublish: '$(System.DefaultWorkingDirectory)/CDR.GetDataRecipients.zip' | ||
artifactName: 'functions' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<h2>Azure Functions</h2> | ||
<div style="margin-left:18px;"> | ||
The Mock Data Holder Energy solution contains an azure function project.<br /> | ||
The GetDataRecipients function is used to get the list of Data Recipients<br /> | ||
from the Mock Register and update the Mock Data Hoder Energy repository.<br /> | ||
</div> | ||
|
||
<h2>To Run and Debug Azure Functions</h2> | ||
<div style="margin-left:18px;"> | ||
The following procedures can be used to run the functions in a local development environment for evaluation of the functions. | ||
<br /> | ||
|
||
<div style="margin-top:6px;margin-bottom:6px;"> | ||
1) Start the Mock Register and the Mock Data Holder Energy solutions. | ||
</div> | ||
|
||
<div style="margin-top:6px;"> | ||
2) Start the Azure Storage Emulator (Azurite): | ||
</div> | ||
<div style="margin-left:18px;margin-bottom:6px;"> | ||
using a MS Windows command prompt:<br /> | ||
</div> | ||
|
||
``` | ||
md C:\azurite | ||
cd "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\Extensions\Microsoft\Azure Storage Emulator" | ||
azurite --silent --location c:\azurite --debug c:\azurite\debug.log | ||
``` | ||
|
||
<div style="margin-left:18px;"> | ||
Noting this is only required to be performed once, it will then be listening on ports - 10000, 10001 and 10002<br /> | ||
when debugging is started from MS Visual Studio by selecting CDR.GetDataRecipients as the startup project<br /> | ||
(by starting a debug instance using F5 or Debug > Start Debugging) | ||
<br /> | ||
</div> | ||
<div style="margin-left:18px;margin-bottom:6px;"> | ||
or by using a MS Windows command prompt:<br /> | ||
</div> | ||
|
||
``` | ||
navigate to .\mock-data-holder-energy\Source\CDR.GetDataRecipients<br /> | ||
func start --verbose<br /> | ||
``` | ||
|
||
<p>3) Open the Mock Data Holder Energy in MS Visual Studio, select CDR.GetDataRecipients as the startup project.</p> | ||
|
||
<p>4) Start each debug instances (F5 or Debug > Start Debugging), this will simulate the discovery of Data Recipients and the</p> | ||
<div style="margin-left:18px;margin-top:-12px;"> | ||
updating of the data in the Mock Data Holder Energy repositories. | ||
</div> | ||
|
||
<div style="margin-left:18px;margin-top:12px;margin-bottom:6px;"> | ||
Noting the below sql scripts are used to observe the results.<br /> | ||
</div> | ||
|
||
``` | ||
SELECT * FROM [cdr-mdhe].[dbo].[LegalEntity] | ||
SELECT * FROM [cdr-mdhe].[dbo].[Brand] | ||
SELECT * FROM [cdr-mdhe].[dbo].[SoftwareProduct] | ||
SELECT * FROM [cdr-mdhe].[dbo].[LogEvents_DRService] | ||
``` | ||
|
||
<h2>To Build Azure Functions</h2> | ||
<div style="margin-left:18px;"> | ||
dotnet SDK 6.0.30x or higher is required. Latest SDK can be found from the link https://microsoft.com/net | ||
<br /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.