- Include root in valid directories
- AppSetting bug fix - Updated testes with base test class and editor configuration changes - Created new server and wafer counter tasks json files and pipelines to match
This commit is contained in:
2
Wafer-Counter/.vscode/launch.json
vendored
2
Wafer-Counter/.vscode/launch.json
vendored
@ -8,7 +8,7 @@
|
||||
"name": ".NET Core Launch (web)",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
"preLaunchTask": "Build",
|
||||
// If you have changed target frameworks, make sure to update the program path.
|
||||
"program": "${workspaceFolder}/bin/Debug/net8.0/OI.Metrology.Wafer.Counter.dll",
|
||||
"args": [],
|
||||
|
416
Wafer-Counter/.vscode/tasks.json
vendored
416
Wafer-Counter/.vscode/tasks.json
vendored
@ -1,70 +1,167 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"inputs": [
|
||||
{
|
||||
"default": "Development",
|
||||
"description": "Which ASP Net Core Environment?",
|
||||
"id": "ASPNETCORE_ENVIRONMENT",
|
||||
"options": [
|
||||
"Development",
|
||||
"Production"
|
||||
],
|
||||
"type": "pickString"
|
||||
},
|
||||
{
|
||||
"default": "${input:AssemblyTitle}",
|
||||
"description": "What Assembly Title?",
|
||||
"id": "AssemblyTitle",
|
||||
"type": "promptString"
|
||||
},
|
||||
{
|
||||
"default": "{Build.BuildId}",
|
||||
"description": "Which Build BuildId?",
|
||||
"id": "Build.BuildId",
|
||||
"type": "promptString"
|
||||
},
|
||||
{
|
||||
"default": "{Build.Reason}",
|
||||
"description": "Which Build Reason?",
|
||||
"id": "Build.Reason",
|
||||
"type": "promptString"
|
||||
},
|
||||
{
|
||||
"default": "{Build.Repository.Id}",
|
||||
"description": "Which Build Repository Id?",
|
||||
"id": "Build.Repository.Id",
|
||||
"type": "promptString"
|
||||
},
|
||||
{
|
||||
"default": "{Build.Repository.Name}",
|
||||
"description": "Which Build Repository Name?",
|
||||
"id": "Build.Repository.Name",
|
||||
"type": "promptString"
|
||||
},
|
||||
{
|
||||
"default": "{Build.SourceVersion}",
|
||||
"description": "Which Build Source Version?",
|
||||
"id": "Build.SourceVersion",
|
||||
"type": "promptString"
|
||||
},
|
||||
{
|
||||
"default": "Debug",
|
||||
"description": "Which Configuration?",
|
||||
"id": "Configuration",
|
||||
"options": [
|
||||
"Debug",
|
||||
"Release"
|
||||
],
|
||||
"type": "pickString"
|
||||
},
|
||||
{
|
||||
"default": "net8.0",
|
||||
"description": "Which Core Version?",
|
||||
"id": "CoreVersion",
|
||||
"options": [
|
||||
"net8.0"
|
||||
],
|
||||
"type": "pickString"
|
||||
},
|
||||
{
|
||||
"default": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe",
|
||||
"description": "Which MS Build?",
|
||||
"id": "MSBuild",
|
||||
"type": "promptString"
|
||||
},
|
||||
{
|
||||
"default": "https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/",
|
||||
"description": "Which Nuget Source?",
|
||||
"id": "NugetSource",
|
||||
"type": "promptString"
|
||||
},
|
||||
{
|
||||
"default": "win-x64",
|
||||
"description": "Which Runtime?",
|
||||
"id": "Runtime",
|
||||
"options": [
|
||||
"win-x64",
|
||||
"win-x32",
|
||||
"linux-x64",
|
||||
"linux-x32"
|
||||
],
|
||||
"type": "pickString"
|
||||
},
|
||||
{
|
||||
"default": "L:/",
|
||||
"description": "Which System DefaultWorkingDirectory?",
|
||||
"id": "System.DefaultWorkingDirectory",
|
||||
"options": [
|
||||
"L:/",
|
||||
"D:/",
|
||||
"C:/"
|
||||
],
|
||||
"type": "pickString"
|
||||
},
|
||||
{
|
||||
"default": "v4.8",
|
||||
"description": "Which Core Target Framework Version?",
|
||||
"id": "TargetFrameworkVersion",
|
||||
"options": [
|
||||
"v4.8"
|
||||
],
|
||||
"type": "pickString"
|
||||
}
|
||||
],
|
||||
"tasks": [
|
||||
{
|
||||
"label": "dotnetRunDebug",
|
||||
"command": "dotnet OI.Metrology.Wafer.Counter.dll",
|
||||
"dependsOn": "build",
|
||||
"problemMatcher": [],
|
||||
"type": "shell",
|
||||
"label": "Dotnet Run Debug",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/bin/Debug/net8.0"
|
||||
}
|
||||
"cwd": "${workspaceFolder}/bin/Debug/net8.0"
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"type": "shell"
|
||||
},
|
||||
{
|
||||
"label": "build",
|
||||
"args": [
|
||||
"build"
|
||||
],
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"label": "Build",
|
||||
"problemMatcher": "$msCompile",
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"build",
|
||||
"${workspaceFolder}/OI.Metrology.Wafer.Counter.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
"${workspaceFolder}/../Tests/OI.Metrology.Tests.csproj"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
"command": "dotnet",
|
||||
"label": "Build Tests",
|
||||
"problemMatcher": "$msCompile",
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"label": "buildTests",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"build",
|
||||
"${workspaceFolder}/../Tests/OI.Metrology.Tests.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
"test",
|
||||
"${workspaceFolder}/../Tests/OI.Metrology.Tests.csproj"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
"command": "dotnet",
|
||||
"label": "Test Debug",
|
||||
"problemMatcher": "$msCompile",
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"label": "testDebug",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"test",
|
||||
"${workspaceFolder}/../Tests/OI.Metrology.Tests.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "testRelease",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"test",
|
||||
"${workspaceFolder}/../Tests/OI.Metrology.Tests.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary",
|
||||
"-c",
|
||||
"Release"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
"command": "dotnet",
|
||||
"label": "Test Release",
|
||||
"problemMatcher": "$msCompile",
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"label": "Format",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"format",
|
||||
"--report",
|
||||
@ -74,27 +171,24 @@
|
||||
"--severity",
|
||||
"warn"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
"command": "dotnet",
|
||||
"label": "Format",
|
||||
"problemMatcher": "$msCompile",
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"label": "Format-Whitespace",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"format",
|
||||
"whitespace"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
"command": "dotnet",
|
||||
"label": "Format Whitespace",
|
||||
"problemMatcher": "$msCompile",
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"label": "publish",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"publish",
|
||||
"${workspaceFolder}/OI.Metrology.Wafer.Counter.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary",
|
||||
"--configuration",
|
||||
"Release",
|
||||
"--runtime",
|
||||
@ -103,17 +197,14 @@
|
||||
"-o",
|
||||
"D:/web-sites/OI-Metrology/oo-8e5dd137-_______-OI-Metrology-Release/Wafer-Counter"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
"command": "dotnet",
|
||||
"label": "Publish",
|
||||
"problemMatcher": "$msCompile",
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"label": "Publish AOT",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"publish",
|
||||
"${workspaceFolder}/OI.Metrology.Wafer.Counter.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary",
|
||||
"--configuration",
|
||||
"Release",
|
||||
"--runtime",
|
||||
@ -121,53 +212,206 @@
|
||||
"-p:PublishAot=true",
|
||||
"/property:GenerateFullPaths=true"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
"command": "dotnet",
|
||||
"label": "Publish AOT",
|
||||
"problemMatcher": "$msCompile",
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"label": "old-watch",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"watch",
|
||||
"run",
|
||||
"--project",
|
||||
"${workspaceFolder}/OI.Metrology.Wafer.Counter.csproj"
|
||||
"run"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
"command": "dotnet",
|
||||
"label": "Old Watch",
|
||||
"problemMatcher": "$msCompile",
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"label": "watch",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"watch",
|
||||
"--launch-profile",
|
||||
"http",
|
||||
"run",
|
||||
"--project",
|
||||
"${workspaceFolder}/OI.Metrology.Wafer.Counter.csproj",
|
||||
"--verbose"
|
||||
],
|
||||
"isBackground": true,
|
||||
"command": "dotnet",
|
||||
"dependsOn": [
|
||||
"build"
|
||||
"Build"
|
||||
],
|
||||
"isBackground": true,
|
||||
"label": "Watch",
|
||||
"problemMatcher": {
|
||||
"fileLocation": "relative",
|
||||
"pattern": {
|
||||
"regexp": "^([^\\s].*)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\):\\s+(error|warning|info)\\s+(TS\\d+)\\s*:\\s*(.*)$",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"severity": 3,
|
||||
"code": 4,
|
||||
"message": 5
|
||||
},
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": "^.*Shutdown requested.*",
|
||||
"endsPattern": "^.*Application started.*"
|
||||
},
|
||||
"fileLocation": "relative",
|
||||
"pattern": {
|
||||
"code": 4,
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 5,
|
||||
"regexp": "^([^\\s].*)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\):\\s+(error|warning|info)\\s+(TS\\d+)\\s*:\\s*(.*)$",
|
||||
"severity": 3
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"command": "echo Assembly Title: ${input:AssemblyTitle} & echo Build Id: ${input:Build.BuildId} & echo Build Reason: ${input:Build.Reason} & echo Repo Id: ${input:Build.Repository.Id} & echo Repo Name: ${input:Build.Repository.Name} & echo Source Version: ${input:Build.SourceVersion} & echo Configuration: ${input:Configuration} & echo Core Version: ${input:CoreVersion} & echo Nuget Source: ${input:NugetSource} & echo Runtime: ${input:Runtime}",
|
||||
"label": "Echo Check",
|
||||
"problemMatcher": [],
|
||||
"type": "shell"
|
||||
},
|
||||
{
|
||||
"command": "dotnet user-secrets init & dotnet user-secrets set BuildNumber ${input:Build.BuildId} & dotnet user-secrets set GitCommit ${input:Build.SourceVersion} & dotnet user-secrets list",
|
||||
"label": "Server - Safe storage of app secrets",
|
||||
"problemMatcher": [],
|
||||
"type": "shell"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"build",
|
||||
"--configuration",
|
||||
"${input:Configuration}",
|
||||
"--source",
|
||||
"${input:NugetSource}"
|
||||
],
|
||||
"command": "dotnet",
|
||||
"label": "Wafer Counter - Build",
|
||||
"problemMatcher": "$msCompile",
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"build",
|
||||
"${workspaceFolder}/../Tests/OI.Metrology.Tests.csproj",
|
||||
"--configuration",
|
||||
"${input:Configuration}",
|
||||
"--source",
|
||||
"${input:NugetSource}"
|
||||
],
|
||||
"command": "dotnet",
|
||||
"label": "Tests - Build",
|
||||
"problemMatcher": "$msCompile",
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"test",
|
||||
"${workspaceFolder}/../Tests/OI.Metrology.Tests.csproj",
|
||||
"--configuration",
|
||||
"${input:Configuration}"
|
||||
],
|
||||
"command": "dotnet",
|
||||
"label": "Tests - Test",
|
||||
"problemMatcher": "$msCompile",
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"publish",
|
||||
"--configuration",
|
||||
"${input:Configuration}",
|
||||
"--runtime",
|
||||
"${input:Runtime}",
|
||||
"--self-contained"
|
||||
],
|
||||
"command": "dotnet",
|
||||
"label": "Wafer-Counter - Publish",
|
||||
"problemMatcher": "$msCompile",
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"publish",
|
||||
"--configuration",
|
||||
"${input:Configuration}",
|
||||
"--runtime",
|
||||
"${input:Runtime}",
|
||||
"-p:PublishAot=true"
|
||||
],
|
||||
"command": "dotnet",
|
||||
"label": "Wafer-Counter - AOT Publish",
|
||||
"problemMatcher": "$msCompile",
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"command": "(robocopy /MIR \"bin/${input:Configuration}/${input:CoreVersion}/${input:Runtime}/publish\" \"D:/${input:CoreVersion}/${input:Runtime}/${input:Build.Repository.Name}/${input:Build.BuildId}/${input:Configuration}-${input:AssemblyTitle}-AOT\") ^& IF %ERRORLEVEL% LEQ 7 exit 0",
|
||||
"label": "Copy Files to: D:/",
|
||||
"problemMatcher": [],
|
||||
"type": "shell"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"tool",
|
||||
"restore"
|
||||
],
|
||||
"command": "dotnet",
|
||||
"label": "Tool Restore",
|
||||
"problemMatcher": [],
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"ReportGenerator",
|
||||
"-reports:${input:System.DefaultWorkingDirectory}/TestResults/**/coverage.cobertura.xml",
|
||||
"-targetDir:${input:Build.ArtifactStagingDirectory}/Coverage",
|
||||
"-reportTypes:Html_Dark"
|
||||
],
|
||||
"command": "dotnet",
|
||||
"label": "Report Generator",
|
||||
"problemMatcher": [],
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"clean",
|
||||
"${workspaceFolder}/../Tests/OI.Metrology.Tests.csproj",
|
||||
"--configuration",
|
||||
"${input:Configuration}"
|
||||
],
|
||||
"command": "dotnet",
|
||||
"label": "Tests - Clean",
|
||||
"problemMatcher": "$msCompile",
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"clean",
|
||||
"--configuration",
|
||||
"${input:Configuration}"
|
||||
],
|
||||
"command": "dotnet",
|
||||
"label": "Wafer Counter - Clean",
|
||||
"problemMatcher": "$msCompile",
|
||||
"type": "process"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
"Wafer-Counter - Publish",
|
||||
"Tool Restore",
|
||||
"Report Generator"
|
||||
],
|
||||
"command": "echo",
|
||||
"dependsOn": [
|
||||
"Echo Check",
|
||||
"Server - Safe storage of app secrets",
|
||||
"Wafer Counter - Build",
|
||||
"Tests - Build",
|
||||
"Tests - Test",
|
||||
"Wafer-Counter - AOT Publish",
|
||||
"Copy Files to: D:/",
|
||||
"Tests - Clean",
|
||||
"Wafer Counter - Clean"
|
||||
],
|
||||
"dependsOrder": "sequence",
|
||||
"label": "Pipeline",
|
||||
"problemMatcher": [],
|
||||
"type": "shell"
|
||||
}
|
||||
]
|
||||
],
|
||||
"version": "2.0.0"
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using OI.Metrology.Shared.Models;
|
||||
using OI.Metrology.Shared.Models.Stateless;
|
||||
using OI.Metrology.Wafer.Counter.Helper;
|
||||
|
||||
namespace OI.Metrology.Wafer.Counter.ApiControllers;
|
||||
|
||||
[Route("api/v1/ado")]
|
||||
public class AzureDevOpsController : Controller, IAzureDevOpsController<IResult>
|
||||
{
|
||||
|
||||
private readonly IAzureDevOpsRepository _AzureDevOpsRepository;
|
||||
|
||||
public AzureDevOpsController(IAzureDevOpsRepository azureDevOpsRepository) =>
|
||||
_AzureDevOpsRepository = azureDevOpsRepository;
|
||||
|
||||
[HttpPost("save")]
|
||||
public IResult Save()
|
||||
{
|
||||
PollValue? pollValue = ParameterHelper.GetPollValue(Request.HttpContext.Connection?.RemoteIpAddress, Request.Body);
|
||||
ArgumentNullException.ThrowIfNull(pollValue);
|
||||
_AzureDevOpsRepository.Save(pollValue);
|
||||
return Results.Ok();
|
||||
}
|
||||
|
||||
}
|
@ -2,6 +2,7 @@ using OI.Metrology.Shared.Models;
|
||||
using System.Collections.Specialized;
|
||||
using System.Net;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Web;
|
||||
|
||||
namespace OI.Metrology.Wafer.Counter.Helper;
|
||||
@ -29,7 +30,9 @@ public class ParameterHelper
|
||||
{
|
||||
CharacterizationParameters? result;
|
||||
Dictionary<string, string?> keyValuePairs = GetKeyValuePairs(queryString);
|
||||
string json = JsonSerializer.Serialize(keyValuePairs, new JsonSerializerOptions() { WriteIndented = true });
|
||||
#pragma warning disable CS8620
|
||||
string json = JsonSerializer.Serialize(keyValuePairs, DictionaryStringStringSourceGenerationContext.Default.DictionaryStringString);
|
||||
#pragma warning restore CS8620
|
||||
result = string.IsNullOrEmpty(json) ? null : JsonSerializer.Deserialize(json, CharacterizationParametersSourceGenerationContext.Default.CharacterizationParameters);
|
||||
return result;
|
||||
}
|
||||
@ -68,7 +71,9 @@ public class ParameterHelper
|
||||
PollValue? result;
|
||||
string? queryString = GetQueryString(stream);
|
||||
Dictionary<string, string?> keyValuePairs = GetKeyValuePairs(queryString);
|
||||
string json = JsonSerializer.Serialize(keyValuePairs, new JsonSerializerOptions() { WriteIndented = true });
|
||||
#pragma warning disable CS8620
|
||||
string json = JsonSerializer.Serialize(keyValuePairs, DictionaryStringStringSourceGenerationContext.Default.DictionaryStringString);
|
||||
#pragma warning restore CS8620
|
||||
result = string.IsNullOrEmpty(json) ? null : JsonSerializer.Deserialize(json, PollValueSourceGenerationContext.Default.PollValue);
|
||||
if (result is not null)
|
||||
{
|
||||
@ -79,4 +84,10 @@ public class ParameterHelper
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(Dictionary<string, string>))]
|
||||
public partial class DictionaryStringStringSourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
@ -3,8 +3,7 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace OI.Metrology.Wafer.Counter.Models;
|
||||
|
||||
public record AppSettings(string AzureDevOpsDestinationDirectory,
|
||||
string BuildNumber,
|
||||
public record AppSettings(string BuildNumber,
|
||||
string Company,
|
||||
string EcCharacterizationSi,
|
||||
string EcMesaFileShareCharacterizationSi,
|
||||
@ -37,7 +36,7 @@ public record AppSettings(string AzureDevOpsDestinationDirectory,
|
||||
public static AppSettings Get(IConfigurationRoot configurationRoot)
|
||||
{
|
||||
AppSettings result;
|
||||
AppSettings? appSettings = configurationRoot.GetSection(nameof(AppSettings)).Get<AppSettings>();
|
||||
AppSettings? appSettings = configurationRoot.Get<AppSettings>();
|
||||
#pragma warning restore IL3050, IL2026
|
||||
if (appSettings is null
|
||||
|| appSettings?.Company is null)
|
||||
@ -53,8 +52,7 @@ public record AppSettings(string AzureDevOpsDestinationDirectory,
|
||||
}
|
||||
throw new NotSupportedException($"Not found!{Environment.NewLine}{string.Join(Environment.NewLine, paths.Distinct())}");
|
||||
}
|
||||
result = new(appSettings.AzureDevOpsDestinationDirectory,
|
||||
appSettings.BuildNumber,
|
||||
result = new(appSettings.BuildNumber,
|
||||
appSettings.Company,
|
||||
appSettings.EcCharacterizationSi,
|
||||
appSettings.EcMesaFileShareCharacterizationSi,
|
||||
|
@ -27,7 +27,6 @@ public class Program
|
||||
_ = webApplicationBuilder.Services.AddHttpClient();
|
||||
_ = webApplicationBuilder.Services.AddSingleton(_ => appSettings);
|
||||
_ = webApplicationBuilder.Services.AddSingleton<IFileShareRepository, FileShareRepository>();
|
||||
_ = webApplicationBuilder.Services.AddSingleton<IAzureDevOpsRepository, AzureDevOpsRepository>();
|
||||
_ = webApplicationBuilder.Services.AddSingleton<IWaferCounterRepository, WaferCounterRepository>();
|
||||
_ = webApplicationBuilder.Services.AddSingleton<IAppSettingsRepository<AppSettings>>(_ => appSettingsRepository);
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
using OI.Metrology.Shared.Models;
|
||||
using OI.Metrology.Shared.Models.Stateless;
|
||||
using OI.Metrology.Wafer.Counter.Models;
|
||||
|
||||
namespace OI.Metrology.Wafer.Counter.Repository;
|
||||
|
||||
public class AzureDevOpsRepository : IAzureDevOpsRepository
|
||||
{
|
||||
|
||||
private readonly AppSettings _AppSettings;
|
||||
|
||||
public AzureDevOpsRepository(AppSettings appSettings) =>
|
||||
_AppSettings = appSettings;
|
||||
|
||||
void IAzureDevOpsRepository.Save(PollValue pollValue)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(pollValue.Id);
|
||||
ArgumentNullException.ThrowIfNull(pollValue.Page);
|
||||
string directory = Path.Combine(_AppSettings.AzureDevOpsDestinationDirectory, pollValue.Page, pollValue.Id.Value.ToString());
|
||||
if (!Directory.Exists(directory))
|
||||
_ = Directory.CreateDirectory(directory);
|
||||
File.WriteAllText(Path.Combine(directory, $"{pollValue.Time}.json"), pollValue.Json is null ? string.Empty : pollValue.Json);
|
||||
}
|
||||
|
||||
}
|
@ -107,7 +107,7 @@ public class FileShareRepository : IFileShareRepository
|
||||
|
||||
private static ReadOnlyCollection<string> GetValidDirectories(string equipmentDirectory, DateTime startDateTime, DateTime endDateTime)
|
||||
{
|
||||
List<string> results = [];
|
||||
List<string> results = [equipmentDirectory];
|
||||
DateTime dateTime;
|
||||
string weekOfYear;
|
||||
Calendar calendar = new CultureInfo("en-US").Calendar;
|
||||
|
158
Wafer-Counter/wafer-counter-pipeline.yml
Normal file
158
Wafer-Counter/wafer-counter-pipeline.yml
Normal file
@ -0,0 +1,158 @@
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
paths:
|
||||
include:
|
||||
- Shared
|
||||
- Wafer-Counter
|
||||
|
||||
variables:
|
||||
runtime: 'win-x64'
|
||||
coreVersion: 'net8.0'
|
||||
nugetSource: 'https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/'
|
||||
|
||||
stages:
|
||||
- stage: Development
|
||||
displayName: Development
|
||||
pool:
|
||||
name: 'OpenInsight Metrology Viewer'
|
||||
demands: OpenInsight-Metrology-Viewer-Wafer-Counter-Development
|
||||
variables:
|
||||
ASPNETCORE_ENVIRONMENT: 'Development'
|
||||
assemblyTitle: 'OI.Metrology.Wafer.Counter'
|
||||
configuration: 'Debug'
|
||||
jobs:
|
||||
- job: DebugDotnet
|
||||
steps:
|
||||
- script: |
|
||||
echo Assembly Title: $(AssemblyTitle)
|
||||
echo Build Id: $(Build.BuildId)
|
||||
echo Build Reason: $(Build.Reason)
|
||||
echo Repo Id: $(Build.Repository.Id)
|
||||
echo Repo Name: $(Build.Repository.Name)
|
||||
echo Source Version: $(Build.SourceVersion)
|
||||
echo Configuration: $(Configuration)
|
||||
echo Core Version: $(CoreVersion)
|
||||
echo Nuget Source: $(NugetSource)
|
||||
echo Runtime: $(Runtime)
|
||||
displayName: 'Echo Check'
|
||||
|
||||
- script: |
|
||||
dotnet user-secrets init
|
||||
dotnet user-secrets set BuildNumber $(Build.BuildId)
|
||||
dotnet user-secrets set GitCommit $(Build.SourceVersion)
|
||||
dotnet user-secrets list
|
||||
workingDirectory: Wafer-Counter
|
||||
displayName: 'Wafer Counter - Safe storage of app secrets'
|
||||
|
||||
- script: dotnet build --configuration $(Configuration) --source $(NugetSource)
|
||||
workingDirectory: Wafer-Counter
|
||||
displayName: 'Wafer Counter - Build'
|
||||
|
||||
- script: dotnet build --configuration $(Configuration) --source $(NugetSource)
|
||||
workingDirectory: Tests
|
||||
displayName: 'Tests - Build'
|
||||
|
||||
- script: dotnet test --configuration $(Configuration)
|
||||
workingDirectory: Tests
|
||||
displayName: 'Tests - Test'
|
||||
|
||||
- script: dotnet publish --configuration $(Configuration)
|
||||
workingDirectory: Wafer-Counter
|
||||
displayName: 'Wafer-Counter - Publish'
|
||||
enabled: false
|
||||
|
||||
- script: dotnet publish --configuration $(Configuration) --runtime $(Runtime) -p:PublishAot=true
|
||||
workingDirectory: Wafer-Counter
|
||||
displayName: 'Wafer-Counter - AOT Publish'
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy Files to: D:\'
|
||||
inputs:
|
||||
Contents: '*'
|
||||
SourceFolder: 'Wafer-Counter\bin\$(Configuration)\$(CoreVersion)\$(Runtime)\publish'
|
||||
TargetFolder: 'D:\$(CoreVersion)\$(Runtime)\$(Build.Repository.Name)\$(Build.BuildId)\$(Configuration)-$(AssemblyTitle)-AOT'
|
||||
OverWrite: true
|
||||
|
||||
- script: dotnet clean --configuration $(Configuration)
|
||||
workingDirectory: Tests
|
||||
displayName: 'Tests - Clean'
|
||||
|
||||
- script: dotnet clean --configuration $(Configuration)
|
||||
workingDirectory: Wafer-Counter
|
||||
displayName: 'Wafer Counter - Clean'
|
||||
|
||||
- stage: Release
|
||||
displayName: Release
|
||||
pool:
|
||||
name: 'OpenInsight Metrology Viewer'
|
||||
demands: OpenInsight-Metrology-Viewer-Wafer-Counter
|
||||
variables:
|
||||
ASPNETCORE_ENVIRONMENT: 'Production'
|
||||
assemblyTitle: 'OI.Metrology.Wafer.Counter'
|
||||
configuration: 'Release'
|
||||
jobs:
|
||||
- job: ReleaseDotnet
|
||||
steps:
|
||||
- script: |
|
||||
echo Assembly Title: $(AssemblyTitle)
|
||||
echo Build Id: $(Build.BuildId)
|
||||
echo Build Reason: $(Build.Reason)
|
||||
echo Repo Id: $(Build.Repository.Id)
|
||||
echo Repo Name: $(Build.Repository.Name)
|
||||
echo Source Version: $(Build.SourceVersion)
|
||||
echo Configuration: $(Configuration)
|
||||
echo Core Version: $(CoreVersion)
|
||||
echo Nuget Source: $(NugetSource)
|
||||
echo Runtime: $(Runtime)
|
||||
displayName: 'Echo Check'
|
||||
|
||||
- script: |
|
||||
dotnet user-secrets init
|
||||
dotnet user-secrets set BuildNumber $(Build.BuildId)
|
||||
dotnet user-secrets set GitCommit $(Build.SourceVersion)
|
||||
dotnet user-secrets list
|
||||
workingDirectory: Wafer-Counter
|
||||
displayName: 'Wafer Counter - Safe storage of app secrets'
|
||||
|
||||
- script: dotnet build --configuration $(Configuration) --source $(NugetSource)
|
||||
workingDirectory: Wafer-Counter
|
||||
displayName: 'Wafer Counter - Build'
|
||||
|
||||
- script: dotnet build --configuration $(Configuration) --source $(NugetSource)
|
||||
workingDirectory: Tests
|
||||
displayName: 'Tests - Build'
|
||||
|
||||
- script: dotnet test --configuration $(Configuration)
|
||||
workingDirectory: Tests
|
||||
displayName: 'Tests - Test'
|
||||
|
||||
- script: dotnet publish --configuration $(Configuration)
|
||||
workingDirectory: Wafer-Counter
|
||||
displayName: 'Wafer-Counter - Publish'
|
||||
enabled: false
|
||||
|
||||
- script: dotnet publish --configuration $(Configuration) --runtime $(Runtime) -p:PublishAot=true
|
||||
workingDirectory: Wafer-Counter
|
||||
displayName: 'Wafer-Counter - AOT Publish'
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy Files to: D:\'
|
||||
inputs:
|
||||
Contents: '*'
|
||||
SourceFolder: 'Wafer-Counter\bin\$(Configuration)\$(CoreVersion)\$(Runtime)\publish'
|
||||
TargetFolder: 'D:\$(CoreVersion)\$(Runtime)\$(Build.Repository.Name)\$(Build.BuildId)\$(Configuration)-$(AssemblyTitle)-AOT'
|
||||
OverWrite: true
|
||||
|
||||
- script: dotnet clean --configuration $(Configuration)
|
||||
workingDirectory: Tests
|
||||
displayName: 'Tests - Clean'
|
||||
|
||||
- script: dotnet clean --configuration $(Configuration)
|
||||
workingDirectory: Wafer-Counter
|
||||
displayName: 'Wafer Counter - Clean'
|
||||
|
||||
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
|
||||
displayName: 'Force Fail'
|
||||
enabled: false
|
Reference in New Issue
Block a user