Removed Infineon.Mesa.gpcl6 and added Includes
Bug in yml dotnet tool PackageReference arrangement RDS Blank Change int dotnet test nuget ^ [spcepiworld].[dbo].[evnt_inf] Assembly Version WS Result bug fix and Nuget bump, PSN, Reactor and Extra RDS rule OpenInsightApi and testRunTitle editorconfig bugs Fix Type serializerValue RDS oversight PropertyNameCaseInsensitive Save check for file already present NoWaitDirectory MoveArchive allow empty directory and continueOnError for clean files CreatePointerFile and more on NoWaitDirectory
This commit is contained in:
parent
7248a46452
commit
c507cd4028
11
.gitignore
vendored
11
.gitignore
vendored
@ -331,10 +331,11 @@ ASALocalRun/
|
||||
##
|
||||
## Visual Studio Code
|
||||
##
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
*/!.vscode/extensions.json
|
||||
*/!.vscode/launch.json
|
||||
*/!.vscode/settings.json
|
||||
*/!.vscode/tasks.json
|
||||
*/.vscode/*
|
||||
*/.vscode/ReportGenerator/*
|
||||
|
||||
*.lnk
|
||||
|
172
.groovy
172
.groovy
@ -1,172 +0,0 @@
|
||||
#!/usr/bin/env groovy
|
||||
/* groovylint-disable CompileStatic, ConsecutiveStringConcatenation, DuplicateNumberLiteral, DuplicateStringLiteral, LineLength, NestedBlockDepth, NoDef, VariableTypeRequired */
|
||||
import groovy.transform.Field
|
||||
|
||||
@Field String _DDrive = 'D:/'
|
||||
@Field String _AssemblyName = '...'
|
||||
@Field String _TargetLocation = '...'
|
||||
@Field String _GitCommitSeven = '...'
|
||||
@Field String _GitName = 'MET08DDUPSFS6420'
|
||||
@Field String _TestProjectDirectory = 'Adaptation'
|
||||
@Field String _AgentStaging = 'mestsa07ec-ecmeseaf'
|
||||
@Field String _DDriveNet = "${_DDrive}Framework4.8"
|
||||
@Field String _AgentProduction = 'messa08ec-ecmeseaf'
|
||||
@Field String _AgentDevelopment = 'mestsa003-mesedasvc'
|
||||
@Field String _ProgramFilesDotnet = 'C:/Program Files/dotnet/dotnet.exe'
|
||||
@Field String _ProgramFilesMSBuild = 'C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe'
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label env.JENKINS_ENVIRONMENT == 'Development' ? _AgentDevelopment : env.JENKINS_ENVIRONMENT == 'Staging' ? _AgentStaging : env.JENKINS_ENVIRONMENT == 'Production' ? _AgentProduction : 'Else'
|
||||
}
|
||||
parameters {
|
||||
string(name: 'GIT_SERVER', defaultValue: env.JENKINS_ENVIRONMENT == 'Development' ? 'mestsa003.infineon.com' : 'mestsa07ec.ec.local', description: 'git server')
|
||||
string(name: 'DEFAULT_FILE_SERVER', defaultValue: env.JENKINS_ENVIRONMENT == 'Development' ? 'messv02ecc1_ec_local' : 'messv02ecc1.ec.local', description: 'Default file server...')
|
||||
}
|
||||
stages {
|
||||
stage('Git') {
|
||||
steps {
|
||||
bat(returnStatus: true, script: 'git init')
|
||||
bat(returnStatus: true, script: 'git remote add origin \\\\' + params.GIT_SERVER + '\\Git\\' + _GitName + '.git')
|
||||
bat(returnStatus: true, script: 'git pull origin master')
|
||||
}
|
||||
}
|
||||
stage('Setup') {
|
||||
steps {
|
||||
script {
|
||||
_AssemblyName = "${env.JOB_NAME}"
|
||||
_GitCommitSeven = '1234567'
|
||||
// _GitCommitSeven = env.GIT_COMMIT.substring(0, 7)
|
||||
def files = findFiles(glob: '*.csproj')
|
||||
if (files.length != 1) {
|
||||
error("Build failed because couldn't find a *.csproj file")
|
||||
}
|
||||
echo """
|
||||
${files[0].name}
|
||||
${files[0].path}
|
||||
${files[0].directory}
|
||||
${files[0].length}
|
||||
${files[0].lastModified}
|
||||
"""
|
||||
_AssemblyName = files[0].name.split('[.]csproj')[0]
|
||||
_TargetLocation = "\\\\${params.DEFAULT_FILE_SERVER}\\EC_EAFRepository\\${env.JENKINS_ENVIRONMENT}\\DeploymentStorage\\Adaptation_${_AssemblyName}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Info') {
|
||||
steps {
|
||||
echo "_AssemblyName ${_AssemblyName}" // ...
|
||||
echo "BUILD_NUMBER ${env.BUILD_NUMBER}" // 11
|
||||
echo "DEFAULT_FILE_SERVER ${params.DEFAULT_FILE_SERVER}" // 11
|
||||
echo "GIT_BRANCH ${env.GIT_BRANCH}" // origin/master
|
||||
echo "GIT_COMMIT ${env.GIT_COMMIT}" // 73b814069f2cf0173a62a8228815a9bc9ba93c41
|
||||
echo "GIT_SERVER ${params.GIT_SERVER}" // ...
|
||||
echo "GIT_URL ${env.GIT_URL}" // D:\ProgramData\Git\....git
|
||||
echo "JENKINS_ENVIRONMENT ${env.JENKINS_ENVIRONMENT}" // 11
|
||||
echo "JENKINS_URL ${env.JENKINS_URL}" // http://localhost:8080/
|
||||
echo "JOB_NAME ${env.JOB_NAME}" // ...
|
||||
echo "WORKSPACE ${env.WORKSPACE}" // D:\.jenkins\_\...
|
||||
}
|
||||
}
|
||||
// stage('Restore') {
|
||||
// steps {
|
||||
// bat(returnStatus: true, script: 'dotnet --info')
|
||||
// }
|
||||
// }
|
||||
stage('Safe storage of app secrets') {
|
||||
steps {
|
||||
dir(_TestProjectDirectory) {
|
||||
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
|
||||
'user-secrets init')
|
||||
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
|
||||
'user-secrets set "BuildNumber" "' + env.BUILD_NUMBER + '"')
|
||||
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
|
||||
'user-secrets set "GitCommitSeven" "' + _GitCommitSeven + '"')
|
||||
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
|
||||
'user-secrets set "Server" "' + params.DEFAULT_FILE_SERVER + '"')
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Core Build') {
|
||||
steps {
|
||||
echo "Build number is ${currentBuild.number}"
|
||||
dir(_TestProjectDirectory) {
|
||||
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
|
||||
'build --runtime win-x64 --self-contained --verbosity quiet')
|
||||
}
|
||||
}
|
||||
}
|
||||
// stage('Test') {
|
||||
// options {
|
||||
// timeout(time: 10, unit: 'MINUTES')
|
||||
// }
|
||||
// steps {
|
||||
// dir(_TestProjectDirectory) {
|
||||
// bat('dotnet --info')
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
stage('Framework Build') {
|
||||
steps {
|
||||
echo "Build number is ${currentBuild.number}"
|
||||
bat(returnStatus: true, script: '"' + _ProgramFilesMSBuild + '" ' +
|
||||
'/target:Restore ' +
|
||||
'/detailedsummary ' +
|
||||
'/consoleloggerparameters:PerformanceSummary;ErrorsOnly; ' +
|
||||
'/property:Configuration=Debug;TargetFrameworkVersion=v4.8 ' +
|
||||
_AssemblyName + '.csproj')
|
||||
bat(returnStatus: true, script: '"' + _ProgramFilesMSBuild + '" ' +
|
||||
'/target:Build ' +
|
||||
'/detailedsummary ' +
|
||||
'/consoleloggerparameters:PerformanceSummary;ErrorsOnly; ' +
|
||||
'/property:Configuration=Debug;TargetFrameworkVersion=v4.8 ' +
|
||||
_AssemblyName + '.csproj')
|
||||
}
|
||||
}
|
||||
stage('Commit Id') {
|
||||
steps {
|
||||
dir('bin/Debug') {
|
||||
writeFile file: "${_AssemblyName}.txt", text: "${env.GIT_COMMIT}-${env.BUILD_NUMBER}-${env.GIT_URL}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Package') {
|
||||
steps {
|
||||
fileOperations([fileZipOperation(folderPath: 'bin/Debug', outputFolderPath: "${_DDriveNet}/${_GitCommitSeven}-${env.BUILD_NUMBER}-${env.JOB_NAME}-Debug")])
|
||||
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*", renameFiles: false, sourceCaptureExpression: '', targetLocation: "${_DDriveNet}/${_GitCommitSeven}-${env.BUILD_NUMBER}-${env.JOB_NAME}-Debug", targetNameExpression: '')])
|
||||
}
|
||||
}
|
||||
// stage('Force Fail') {
|
||||
// steps {
|
||||
// error("Build failed because of this and that..")
|
||||
// }
|
||||
// }
|
||||
stage('Copy Files to: file-share') {
|
||||
steps {
|
||||
dir('bin/Debug') {
|
||||
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.txt", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
|
||||
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.dll", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
|
||||
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.exe", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
|
||||
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.pdb", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
dir('bin') {
|
||||
deleteDir()
|
||||
}
|
||||
dir('obj') {
|
||||
deleteDir()
|
||||
}
|
||||
dir(_TestProjectDirectory + '/bin') {
|
||||
deleteDir()
|
||||
}
|
||||
dir(_TestProjectDirectory + '/obj') {
|
||||
deleteDir()
|
||||
}
|
||||
// cleanWs()
|
||||
}
|
||||
}
|
||||
}
|
12
Adaptation/.config/dotnet-tools.json
Normal file
12
Adaptation/.config/dotnet-tools.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"dotnet-reportgenerator-globaltool": {
|
||||
"version": "5.1.15",
|
||||
"commands": [
|
||||
"reportgenerator"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -76,12 +76,15 @@ csharp_using_directive_placement = outside_namespace
|
||||
dotnet_code_quality_unused_parameters = all
|
||||
dotnet_code_quality_unused_parameters = non_public # IDE0060: Remove unused parameter
|
||||
dotnet_code_quality.CAXXXX.api_surface = private, internal
|
||||
dotnet_diagnostic.CA1816.severity = none # CA1816: Call GC.SuppressFinalize correctly
|
||||
dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array allocations
|
||||
dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available
|
||||
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
|
||||
dotnet_diagnostic.CA1846.severity = none # CA1846: Prefer AsSpan over Substring
|
||||
dotnet_diagnostic.CA1847.severity = none # CA1847: Use string.Contains(char) instead of string.Contains(string) with single characters
|
||||
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
|
||||
dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant.
|
||||
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2");
|
||||
dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant.
|
||||
dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary
|
||||
dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed
|
||||
dotnet_diagnostic.IDE0049.severity = warning # Use language keywords instead of framework type names for type references (IDE0049)
|
||||
|
6
Adaptation/.vscode/Reactor.js
vendored
6
Adaptation/.vscode/Reactor.js
vendored
@ -9,8 +9,8 @@ getValue(self, self.length, $('dcp.TENCOR1/pcl/MesEntity', ''), $('dcp.TENCOR1/p
|
||||
function getValue(value, length, mesEntity, recipe, processJobId) {
|
||||
if (recipe.toUpperCase() === 'adsf')
|
||||
return mesEntity;
|
||||
else if (length !== 0 || processJobId === '-')
|
||||
return value;
|
||||
else
|
||||
else if (length === 0)
|
||||
return processJobId;
|
||||
else
|
||||
return value;
|
||||
}
|
2
Adaptation/.vscode/launch.json
vendored
2
Adaptation/.vscode/launch.json
vendored
@ -4,7 +4,7 @@
|
||||
"name": ".NET Core Attach",
|
||||
"type": "coreclr",
|
||||
"request": "attach",
|
||||
"processId": 20888
|
||||
"processId": 13036
|
||||
}
|
||||
]
|
||||
}
|
||||
|
6
Adaptation/.vscode/psn.js
vendored
6
Adaptation/.vscode/psn.js
vendored
@ -9,8 +9,8 @@ getValue(self, self.length, getContextData('2', 'cds.PRODUCT', ''), $('dcp.TENCO
|
||||
function getValue(value, length, product, recipe) {
|
||||
if (recipe.toUpperCase() === 'asdf')
|
||||
return 'asdf';
|
||||
else if (length !== 0 || product === '-')
|
||||
return value;
|
||||
else
|
||||
else if (length === 0)
|
||||
return product;
|
||||
else
|
||||
return value;
|
||||
}
|
1
Adaptation/.vscode/settings.json
vendored
1
Adaptation/.vscode/settings.json
vendored
@ -22,6 +22,7 @@
|
||||
"TIBCO",
|
||||
"Villach"
|
||||
],
|
||||
"coverage-gutters.coverageBaseDir": "../../../../MET08DDUPSFS6420/05_TestResults/TestResults/**",
|
||||
"workbench.colorCustomizations": {
|
||||
"activityBar.activeBackground": "#7933a3",
|
||||
"activityBar.activeBorder": "#31240f",
|
||||
|
@ -115,7 +115,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
}
|
||||
}
|
||||
|
||||
private void MoveArchive(DateTime dateTime)
|
||||
private void MoveArchive(string reportFullPath, DateTime dateTime)
|
||||
{
|
||||
if (dateTime == DateTime.MinValue)
|
||||
{ }
|
||||
@ -128,13 +128,18 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
string jobIdDirectory = Path.Combine(_JobIdParentDirectory, _Logistics.JobID);
|
||||
if (!Directory.Exists(jobIdDirectory))
|
||||
_ = Directory.CreateDirectory(jobIdDirectory);
|
||||
string[] matchDirectories = new string[] { GetDirectoriesRecursively(jobIdDirectory, logisticsSequence).FirstOrDefault() };
|
||||
if ((matchDirectories is null) || matchDirectories.Length != 1)
|
||||
if (!Directory.GetDirectories(jobIdDirectory).Any())
|
||||
File.Copy(reportFullPath, Path.Combine(destinationArchiveDirectory, Path.GetFileName(reportFullPath)));
|
||||
else
|
||||
{
|
||||
string[] matchDirectories = GetDirectoriesRecursively(jobIdDirectory, logisticsSequence).ToArray();
|
||||
if (matchDirectories.Length != 1)
|
||||
throw new Exception("Didn't find directory by logistics sequence");
|
||||
string sourceDirectory = Path.GetDirectoryName(matchDirectories[0]);
|
||||
destinationArchiveDirectory = Path.Combine(destinationArchiveDirectory, Path.GetFileName(sourceDirectory));
|
||||
Directory.Move(sourceDirectory, destinationArchiveDirectory);
|
||||
}
|
||||
}
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
{
|
||||
@ -146,7 +151,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
List<Shared.Properties.IDescription> descriptions = GetDuplicatorDescriptions(jsonElements);
|
||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||
MoveArchive(dateTime);
|
||||
MoveArchive(reportFullPath, dateTime);
|
||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||
return results;
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
|
||||
@ -153,18 +154,36 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
return results;
|
||||
}
|
||||
|
||||
private void MoveCollection(DateTime dateTime, List<(string matchingFile, string checkFile)> collection)
|
||||
private static List<(string, string, string, string, string)> GetCollection(List<(string matchingFile, string checkFile)> collection)
|
||||
{
|
||||
long preWait;
|
||||
List<(string, string, string, string, string)> results = new();
|
||||
string errFile;
|
||||
string checkDirectory;
|
||||
string noWaitDirectory;
|
||||
foreach ((string matchingFile, string checkFile) in collection)
|
||||
{
|
||||
errFile = string.Concat(checkFile, ".err");
|
||||
checkDirectory = Path.GetDirectoryName(checkFile);
|
||||
if (!Directory.Exists(checkDirectory))
|
||||
_ = Directory.CreateDirectory(checkDirectory);
|
||||
noWaitDirectory = Path.Combine(checkDirectory, "NoWaitDirectory");
|
||||
results.Add(new(matchingFile, checkFile, errFile, checkDirectory, noWaitDirectory));
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
private void MoveCollection(DateTime dateTime, List<(string matchingFile, string checkFile)> collection)
|
||||
{
|
||||
long preWait;
|
||||
List<(string checkFile, string errFile)> postCollection = new();
|
||||
foreach ((string matchingFile, string checkFile, string errFile, string checkDirectory, string noWaitDirectory) in GetCollection(collection))
|
||||
{
|
||||
File.Move(matchingFile, checkFile);
|
||||
if (Directory.Exists(noWaitDirectory))
|
||||
{
|
||||
postCollection.Add(new(checkFile, errFile));
|
||||
continue;
|
||||
}
|
||||
if (_FileConnectorConfiguration?.FileHandleWaitTime is null)
|
||||
preWait = DateTime.Now.AddMilliseconds(1234).Ticks;
|
||||
else
|
||||
@ -182,10 +201,45 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
if (!File.Exists(checkFile))
|
||||
break;
|
||||
if (new TimeSpan(DateTime.Now.Ticks - dateTime.Ticks).TotalSeconds > _BreakAfterSeconds)
|
||||
throw new Exception($"Not all files were consumned after {_BreakAfterSeconds} second(s)!");
|
||||
throw new Exception($"Not all files were consumed after {_BreakAfterSeconds} second(s)!");
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
}
|
||||
if (postCollection.Any())
|
||||
{
|
||||
Thread.Sleep(500);
|
||||
StringBuilder stringBuilder = new();
|
||||
foreach ((string checkFile, string errFile) in postCollection)
|
||||
{
|
||||
if (File.Exists(errFile))
|
||||
_ = stringBuilder.AppendLine(File.ReadAllText(errFile));
|
||||
if (File.Exists(checkFile))
|
||||
_ = stringBuilder.AppendLine($"<{checkFile}> was not consumed by the end!");
|
||||
}
|
||||
if (stringBuilder.Length > 0)
|
||||
throw new Exception(stringBuilder.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private static void CreatePointerFile(int numberLength, string parentDirectory, List<string> matchingFiles)
|
||||
{
|
||||
#nullable enable
|
||||
string checkFile;
|
||||
string writeFile;
|
||||
string? directoryName;
|
||||
int parentDirectoryLength = parentDirectory.Length;
|
||||
foreach (string matchingFile in matchingFiles)
|
||||
{
|
||||
directoryName = Path.GetDirectoryName(matchingFile);
|
||||
if (directoryName is null)
|
||||
continue;
|
||||
checkFile = $"{matchingFile[0]}{directoryName.Substring(parentDirectoryLength + numberLength + 1)}";
|
||||
writeFile = Path.Combine(parentDirectory, $"{directoryName.Substring(parentDirectory.Length + 1, numberLength)}.txt");
|
||||
if (File.Exists(writeFile))
|
||||
continue;
|
||||
File.AppendAllLines(writeFile, new string[] { parentDirectory, matchingFile, directoryName, checkFile });
|
||||
}
|
||||
#nullable disable
|
||||
}
|
||||
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
@ -201,6 +255,9 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
List<string> matchingFiles = GetMatchingFiles(ticks, reportFullPath, searchDirectories);
|
||||
if (matchingFiles.Count != searchDirectories.Count)
|
||||
throw new Exception($"Didn't find all files after {_BreakAfterSeconds} second(s)!");
|
||||
try
|
||||
{ CreatePointerFile(numberLength, parentParentDirectory, matchingFiles); }
|
||||
catch (Exception) { }
|
||||
List<(string matchingFile, string checkFile)> collection = GetCollection(numberLength, parentParentDirectory, matchingFiles);
|
||||
MoveCollection(dateTime, collection);
|
||||
return results;
|
||||
|
@ -6,6 +6,7 @@ using Adaptation.Shared.Methods;
|
||||
using Adaptation.Shared.Metrology;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@ -18,6 +19,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
|
||||
private readonly string _IqsConnectionString;
|
||||
private readonly string _OpenInsightFilePattern;
|
||||
private readonly string _OpenInsightApiECDirectory;
|
||||
private readonly string _OpenInsightApiIFXDirectory;
|
||||
|
||||
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
|
||||
base(new Description(), false, smtp, fileParameter, cellInstanceName, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted)
|
||||
@ -31,6 +34,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
if (!_IsDuplicator)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
_OpenInsightApiIFXDirectory = @"\\messdv002.na.infineon.com\Candela\Archive\API";
|
||||
_OpenInsightApiECDirectory = @"\\messv02ecc1.ec.local\EC_Metrology_Si\Archive\API";
|
||||
_IqsConnectionString = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "IQS.ConnectionString");
|
||||
_OpenInsightFilePattern = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.FilePattern");
|
||||
}
|
||||
@ -230,7 +235,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, List<pcl.Description> descriptions, Test[] tests)
|
||||
private void SaveOpenInsightFile(string reportFullPath, DateTime dateTime, string logistics, List<pcl.Description> descriptions, Test[] tests)
|
||||
{
|
||||
bool isDummyRun = false;
|
||||
List<(Shared.Properties.IScopeInfo, string)> collection = new();
|
||||
@ -247,17 +252,22 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
string lines = GetLines(_Logistics, descriptions);
|
||||
if (!string.IsNullOrEmpty(lines))
|
||||
{
|
||||
int? count;
|
||||
long? subGroupId;
|
||||
long breakAfter = dateTime.AddSeconds(_BreakAfterSeconds).Ticks;
|
||||
long preWait = _FileConnectorConfiguration?.FileHandleWaitTime is null ? dateTime.AddMilliseconds(1234).Ticks : dateTime.AddMilliseconds(_FileConnectorConfiguration.FileHandleWaitTime.Value).Ticks;
|
||||
if (string.IsNullOrEmpty(descriptions[0].Reactor) || string.IsNullOrEmpty(descriptions[0].PSN) || string.IsNullOrEmpty(descriptions[0].RDS))
|
||||
subGroupId = null;
|
||||
if (string.IsNullOrEmpty(descriptions[0].Reactor) || string.IsNullOrEmpty(descriptions[0].PSN))
|
||||
(subGroupId, count) = (null, null);
|
||||
else
|
||||
(subGroupId, string _) = FromIQS.GetCommandText(_IqsConnectionString, _Logistics, descriptions[0], breakAfter, preWait);
|
||||
(subGroupId, count, string _) = FromIQS.GetCommandText(_IqsConnectionString, _Logistics, descriptions[0], breakAfter, preWait);
|
||||
if (subGroupId is null)
|
||||
collection.Add(new(new ScopeInfo(tests[0], _OpenInsightFilePattern), lines));
|
||||
else
|
||||
else if (count is null)
|
||||
collection.Add(new(new ScopeInfo(tests[0], $"{subGroupId.Value} {_OpenInsightFilePattern}"), lines));
|
||||
else
|
||||
collection.Add(new(new ScopeInfo(tests[0], $"{subGroupId.Value} E{count.Value} {_OpenInsightFilePattern}"), lines));
|
||||
string weekOfYear = _Calendar.GetWeekOfYear(_Logistics.DateTimeFromSequence, CalendarWeekRule.FirstDay, DayOfWeek.Sunday).ToString("00");
|
||||
FromIQS.Save(_OpenInsightApiECDirectory, _OpenInsightApiIFXDirectory, _Logistics, reportFullPath, logistics, descriptions.First(), lines, subGroupId, weekOfYear);
|
||||
}
|
||||
}
|
||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||
@ -274,7 +284,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
List<pcl.Description> descriptions = pcl.ProcessData.GetDescriptions(jsonElements);
|
||||
Test[] tests = (from l in descriptions select (Test)l.Test).ToArray();
|
||||
if (_IsEAFHosted && _FileConnectorConfiguration.FileScanningIntervalInSeconds > 0)
|
||||
SaveOpenInsightFile(reportFullPath, dateTime, descriptions, tests);
|
||||
SaveOpenInsightFile(reportFullPath, dateTime, pdsf.Item1, descriptions, tests);
|
||||
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(pdsf.Item1, tests, jsonElements, new List<FileInfo>());
|
||||
return results;
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
@ -29,7 +30,12 @@ public class FromIQS
|
||||
.AppendLine(" pl.f_name pl_name, ")
|
||||
.AppendLine(" pd.f_name pd_name, ")
|
||||
.AppendLine(" td.f_test td_test, ")
|
||||
.AppendLine(" td.f_name td_name ")
|
||||
.AppendLine(" td.f_name td_name, ")
|
||||
.AppendLine(" (select count(ev.f_evnt) ")
|
||||
.AppendLine(" from [spcepiworld].[dbo].[evnt_inf] ev ")
|
||||
.AppendLine(" where ev.f_prcs = rd.f_prcs ")
|
||||
.AppendLine(" and ev.f_part = pd.f_part ")
|
||||
.AppendLine(" and ev.f_sgtm = se.f_sgtm) ev_count ")
|
||||
.AppendLine(" from [spcepiworld].[dbo].[sgrp_ext] se ")
|
||||
.AppendLine(" join [spcepiworld].[dbo].[prcs_dat] rd ")
|
||||
.AppendLine(" on se.f_prcs = rd.f_prcs ")
|
||||
@ -44,12 +50,13 @@ public class FromIQS
|
||||
.AppendLine(" where se.f_flag = 0 ");
|
||||
if (subGroupId is not null)
|
||||
_ = result.Append(" and se.f_sgrp = ").Append(subGroupId).AppendLine(" ");
|
||||
if (!string.IsNullOrEmpty(description.RDS))
|
||||
_ = result.Append(" and pl.f_name = '").Append(description.RDS).AppendLine("' ");
|
||||
_ = result
|
||||
.Append(" and rd.f_name = '").Append(description.Reactor).AppendLine("' ")
|
||||
.Append(" and pd.f_name = '").Append(description.PSN).AppendLine("' ")
|
||||
.AppendLine(" and jd.f_name in ('TENCOR1', 'TENCOR2', 'TENCOR3') ")
|
||||
.Append(" and jd.f_name = '").Append(logistics.MesEntity).AppendLine("' ")
|
||||
.Append(" and pl.f_name = '").Append(description.RDS).AppendLine("' ")
|
||||
.Append(" and dateadd(HH, -7, (dateadd(SS, convert(bigint, se.f_sgtm), '19700101'))) = '").Append(dateTime).AppendLine("' ")
|
||||
.AppendLine(" for json path ");
|
||||
return result.ToString();
|
||||
@ -67,9 +74,10 @@ public class FromIQS
|
||||
return stringBuilder;
|
||||
}
|
||||
|
||||
internal static (long?, string) GetCommandText(string connectionString, Logistics logistics, pcl.Description description, long breakAfter, long preWait)
|
||||
internal static (long?, int?, string) GetCommandText(string connectionString, Logistics logistics, pcl.Description description, long breakAfter, long preWait)
|
||||
{
|
||||
string dateTime;
|
||||
int? count = null;
|
||||
string commandText;
|
||||
long? result = null;
|
||||
string dateFormat = pcl.Description.GetDateFormat();
|
||||
@ -113,10 +121,99 @@ public class FromIQS
|
||||
{
|
||||
result = subGroupId;
|
||||
commandText = GetCommandText(logistics, description, dateTime, subGroupId);
|
||||
if (jsonProperties.Any() && jsonProperties[10].Name == "ev_count" && int.TryParse(jsonProperties[10].Value.ToString(), out int evCount))
|
||||
count = evCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
return new(result, commandText);
|
||||
return new(result, count, commandText);
|
||||
}
|
||||
|
||||
private static string GetJson(Logistics logistics, string logisticLines, pcl.Description description)
|
||||
{
|
||||
string result;
|
||||
StringBuilder stringBuilder = new();
|
||||
var @object = new
|
||||
{
|
||||
description.MesEntity,
|
||||
description.Employee,
|
||||
// description.Layer,
|
||||
description.PSN,
|
||||
description.RDS,
|
||||
description.Reactor,
|
||||
description.Recipe,
|
||||
// description.Zone,
|
||||
logistics.DateTimeFromSequence.Ticks
|
||||
};
|
||||
string[] pair;
|
||||
string safeValue;
|
||||
string[] segments;
|
||||
string serializerValue;
|
||||
foreach (string line in logisticLines.Split(new string[] { Environment.NewLine }, StringSplitOptions.None))
|
||||
{
|
||||
segments = line.Split('\t');
|
||||
if (segments.Length < 2)
|
||||
continue;
|
||||
segments = segments[1].Split(';');
|
||||
_ = stringBuilder.Append('{');
|
||||
foreach (string segment in segments)
|
||||
{
|
||||
pair = segment.Split('=');
|
||||
if (pair.Length != 2 || pair[0].Length < 3)
|
||||
continue;
|
||||
serializerValue = JsonSerializer.Serialize(pair[1]);
|
||||
safeValue = serializerValue.Substring(1, serializerValue.Length - 2);
|
||||
_ = stringBuilder.Append('"').Append(pair[0].Substring(2)).Append('"').Append(':').Append('"').Append(safeValue).Append('"').Append(',');
|
||||
}
|
||||
if (stringBuilder.Length > 0)
|
||||
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||
_ = stringBuilder.Append('}').Append(',');
|
||||
}
|
||||
if (stringBuilder.Length > 0)
|
||||
_ = stringBuilder.Remove(stringBuilder.Length - 1, 1);
|
||||
_ = stringBuilder.Append(']').Append('}');
|
||||
_ = stringBuilder.Insert(0, ",\"Logistics\":[");
|
||||
string json = JsonSerializer.Serialize(@object);
|
||||
_ = stringBuilder.Insert(0, json.Substring(0, json.Length - 1));
|
||||
JsonElement? jsonElement = JsonSerializer.Deserialize<JsonElement>(stringBuilder.ToString());
|
||||
result = jsonElement is null ? "{}" : JsonSerializer.Serialize(jsonElement, new JsonSerializerOptions { WriteIndented = true });
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static void Save(string openInsightApiECDirectory, string openInsightApiIFXDirectory, Logistics logistics, string reportFullPath, string logisticLines, pcl.Description description, string lines, long? subGroupId, string weekOfYear)
|
||||
{
|
||||
string checkFile;
|
||||
string fileName = Path.GetFileName(reportFullPath);
|
||||
string json = GetJson(logistics, logisticLines, description);
|
||||
string? ecPathRoot = Path.GetPathRoot(openInsightApiECDirectory);
|
||||
string? ifxPathRoot = Path.GetPathRoot(openInsightApiIFXDirectory);
|
||||
bool ecExists = ecPathRoot is not null && Directory.Exists(ecPathRoot);
|
||||
bool ifxExists = ifxPathRoot is not null && Directory.Exists(ifxPathRoot);
|
||||
string weekYear = $"{logistics.DateTimeFromSequence:yyyy}_Week_{weekOfYear}";
|
||||
string ecDirectory = Path.Combine(openInsightApiECDirectory, weekYear, $"-{description.PSN}", $"-{description.Reactor}", $"-{description.RDS}", $"-{subGroupId}");
|
||||
string ifxDirectory = Path.Combine(openInsightApiIFXDirectory, weekYear, $"-{description.PSN}", $"-{description.Reactor}", $"-{description.RDS}", $"-{subGroupId}");
|
||||
if (ecExists && !Directory.Exists(ecDirectory))
|
||||
_ = Directory.CreateDirectory(ecDirectory);
|
||||
if (ifxExists && !Directory.Exists(ifxDirectory))
|
||||
_ = Directory.CreateDirectory(ifxDirectory);
|
||||
checkFile = Path.Combine(ecDirectory, fileName);
|
||||
if (ecExists && !File.Exists(checkFile))
|
||||
File.Copy(reportFullPath, checkFile);
|
||||
checkFile = Path.Combine(ifxDirectory, fileName);
|
||||
if (ifxExists && !File.Exists(checkFile))
|
||||
File.Copy(reportFullPath, checkFile);
|
||||
checkFile = Path.Combine(ecDirectory, $"{logistics.DateTimeFromSequence.Ticks}.txt");
|
||||
if (ecExists && !File.Exists(checkFile))
|
||||
File.WriteAllText(checkFile, lines);
|
||||
checkFile = Path.Combine(ifxDirectory, $"{logistics.DateTimeFromSequence.Ticks}.txt");
|
||||
if (ifxExists && !File.Exists(checkFile))
|
||||
File.WriteAllText(checkFile, lines);
|
||||
checkFile = Path.Combine(ecDirectory, $"{logistics.DateTimeFromSequence.Ticks}.json");
|
||||
if (ecExists && !File.Exists(checkFile))
|
||||
File.WriteAllText(checkFile, json);
|
||||
checkFile = Path.Combine(ifxDirectory, $"{logistics.DateTimeFromSequence.Ticks}.json");
|
||||
if (ifxExists && !File.Exists(checkFile))
|
||||
File.WriteAllText(checkFile, json);
|
||||
}
|
||||
|
||||
#nullable disable
|
||||
|
@ -30,9 +30,6 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
if (!_IsDuplicator)
|
||||
throw new Exception(cellInstanceConnectionName);
|
||||
_OpenInsightMetrologyViewerAPI = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "OpenInsight.MetrologyViewerAPI");
|
||||
string barcode = TestMe.GetBarcode("192.168.0.121");
|
||||
if (string.IsNullOrEmpty(barcode))
|
||||
{ }
|
||||
}
|
||||
|
||||
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception)
|
||||
|
@ -1,105 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Net.Http;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace Adaptation.FileHandlers.OpenInsightMetrologyViewer;
|
||||
|
||||
public class TestMe
|
||||
{
|
||||
|
||||
private static List<string> GetURLCollection(string barcodeServerIP)
|
||||
{
|
||||
List<string> results = new();
|
||||
int weekOfYear;
|
||||
string checkURL;
|
||||
DateTime dateTime;
|
||||
string weekDirectory;
|
||||
string weekOfYearPadded;
|
||||
string lastURL = string.Empty;
|
||||
Calendar calendar = new CultureInfo("en-US").Calendar;
|
||||
for (int i = 1; i < 3; i++)
|
||||
{
|
||||
if (i == 1)
|
||||
dateTime = DateTime.Now;
|
||||
else
|
||||
dateTime = DateTime.Now.AddHours(-4);
|
||||
weekOfYear = calendar.GetWeekOfYear(dateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday) - 1;
|
||||
weekOfYearPadded = weekOfYear.ToString("00");
|
||||
weekDirectory = $"{dateTime:yyyy}_Week_{weekOfYearPadded}/{dateTime:yyyy-MM-dd}";
|
||||
checkURL = string.Concat("http://", barcodeServerIP, '/', weekDirectory);
|
||||
if (i == 1 || checkURL != lastURL)
|
||||
{
|
||||
results.Add(string.Concat(checkURL, "/A"));
|
||||
results.Add(string.Concat(checkURL, "/B"));
|
||||
}
|
||||
lastURL = checkURL;
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
private static List<string> GetURLPossible(HttpClient httpClient, List<string> urlCollection, JsonSerializerOptions propertyNameCaseInsensitiveJsonSerializerOptions)
|
||||
{
|
||||
List<string> results = new();
|
||||
string json;
|
||||
NginxFileSystem[] nginxFileSystemCollection;
|
||||
DateTime minimumDateTime = DateTime.Now.AddHours(-4);
|
||||
string nginxFormat = "ddd, dd MMM yyyy HH:mm:ss zzz";
|
||||
foreach (string url in urlCollection)
|
||||
{
|
||||
try
|
||||
{
|
||||
json = httpClient.GetStringAsync(url).Result;
|
||||
nginxFileSystemCollection = JsonSerializer.Deserialize<NginxFileSystem[]>(json, propertyNameCaseInsensitiveJsonSerializerOptions);
|
||||
foreach (NginxFileSystem nginxFileSystem in nginxFileSystemCollection)
|
||||
{
|
||||
if (!DateTime.TryParseExact(nginxFileSystem.MTime.Replace("GMT", "+00:00"), nginxFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime dateTime))
|
||||
continue;
|
||||
if (dateTime < minimumDateTime)
|
||||
continue;
|
||||
results.Add(string.Concat(url, '/', nginxFileSystem.Name));
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
private static List<(string, BarcodeRecord)> GetBarcodePossible(HttpClient httpClient, JsonSerializerOptions propertyNameCaseInsensitiveJsonSerializerOptions, List<string> possibleURLCollection)
|
||||
{
|
||||
List<(string, BarcodeRecord)> results = new();
|
||||
string json;
|
||||
BarcodeRecord barcodeRecord;
|
||||
foreach (string possibleURL in possibleURLCollection)
|
||||
{
|
||||
try
|
||||
{
|
||||
json = httpClient.GetStringAsync(possibleURL).Result;
|
||||
barcodeRecord = JsonSerializer.Deserialize<BarcodeRecord>(json, propertyNameCaseInsensitiveJsonSerializerOptions);
|
||||
results.Add(new(possibleURL, barcodeRecord));
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
public static string GetBarcode(string barcodeServerIP)
|
||||
{
|
||||
string result = string.Empty;
|
||||
using HttpClient httpClient = new();
|
||||
List<string> urlCollection = GetURLCollection(barcodeServerIP);
|
||||
JsonSerializerOptions propertyNameCaseInsensitiveJsonSerializerOptions = new() { PropertyNameCaseInsensitive = true };
|
||||
List<string> possibleURLCollection = GetURLPossible(httpClient, urlCollection, propertyNameCaseInsensitiveJsonSerializerOptions);
|
||||
List<(string, BarcodeRecord)> possibleBarcodeCollection = GetBarcodePossible(httpClient, propertyNameCaseInsensitiveJsonSerializerOptions, possibleURLCollection);
|
||||
foreach ((string url, BarcodeRecord barcodeRecord) in possibleBarcodeCollection)
|
||||
{
|
||||
if (string.IsNullOrEmpty(url) || string.IsNullOrEmpty(barcodeRecord.Barcode))
|
||||
continue;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
@ -298,7 +298,7 @@ public class WSRequest
|
||||
if (!wsResults.Success)
|
||||
throw new Exception(wsResults.ToString());
|
||||
}
|
||||
WS.Results metrologyWSRequest = JsonSerializer.Deserialize<WS.Results>(json);
|
||||
WS.Results metrologyWSRequest = JsonSerializer.Deserialize<WS.Results>(json, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
long wsResultsHeaderID = metrologyWSRequest.HeaderID;
|
||||
string[] pclFiles = Directory.GetFiles(matchDirectory, "*.pcl", SearchOption.TopDirectoryOnly);
|
||||
if (pclFiles.Length != 1)
|
||||
|
@ -118,7 +118,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
if (!Directory.Exists(jobIdDirectory))
|
||||
_ = Directory.CreateDirectory(jobIdDirectory);
|
||||
string[] matchDirectories = GetInProcessDirectory(jobIdDirectory);
|
||||
if ((matchDirectories is null) || matchDirectories.Length != 1)
|
||||
if (matchDirectories.Length != 1)
|
||||
throw new Exception("Didn't find directory by logistics sequence");
|
||||
if (fileInfo.Exists && fileInfo.LastWriteTime < fileInfo.CreationTime)
|
||||
File.SetLastWriteTime(reportFullPath, fileInfo.CreationTime);
|
||||
|
@ -250,11 +250,11 @@ public class ProcessData : IProcessData
|
||||
return result;
|
||||
}
|
||||
|
||||
private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments)
|
||||
private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments, bool hasRDS)
|
||||
{
|
||||
string rds;
|
||||
string reactor;
|
||||
if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText))
|
||||
if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText) || (segments.Length > 1 && !hasRDS))
|
||||
reactor = defaultReactor;
|
||||
else
|
||||
reactor = segments[0];
|
||||
@ -270,11 +270,11 @@ public class ProcessData : IProcessData
|
||||
return new(reactor, rds);
|
||||
}
|
||||
|
||||
private static (string, string) GetLayerAndPSN(string defaultLayer, string defaultPSN, string[] segments)
|
||||
private static (string, string) GetLayerAndPSN(string defaultLayer, string defaultPSN, string[] segments, bool hasRDS)
|
||||
{
|
||||
string psn;
|
||||
string layer;
|
||||
if (segments.Length <= 2)
|
||||
if (segments.Length <= 2 || (segments.Length > 1 && !hasRDS))
|
||||
{
|
||||
psn = defaultPSN;
|
||||
layer = defaultLayer;
|
||||
@ -356,8 +356,9 @@ public class ProcessData : IProcessData
|
||||
if (lot.Length > 2 && lot[0] == '1' && (lot[1] == 'T' || lot[1] == 't'))
|
||||
lot = lot.Substring(2);
|
||||
string[] segments = lot.Split('-');
|
||||
(reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, lot, segments);
|
||||
(layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments);
|
||||
bool hasRDS = Regex.IsMatch(lot, "[-]?[0-9]{5,}[-]?");
|
||||
(reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, lot, segments, hasRDS);
|
||||
(layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments, hasRDS);
|
||||
zone = GetZone(segments);
|
||||
employee = defaultEmployee;
|
||||
}
|
||||
|
179
Adaptation/MET08DDUPSFS6420-Development.yml
Normal file
179
Adaptation/MET08DDUPSFS6420-Development.yml
Normal file
@ -0,0 +1,179 @@
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- development
|
||||
paths:
|
||||
include:
|
||||
- "Adaptation/*"
|
||||
|
||||
pool:
|
||||
name: Mesa-Windows-Service
|
||||
demands: MET08DDUPSFS6420-Development
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
set coreVersion=net6.0
|
||||
echo %coreVersion%
|
||||
echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
|
||||
echo $(CoreVersion)
|
||||
displayName: CoreVersion
|
||||
|
||||
- script: |
|
||||
set configuration=Debug
|
||||
echo %configuration%
|
||||
echo ##vso[task.setvariable variable=Configuration;]%configuration%
|
||||
echo ($Configuration)
|
||||
displayName: Configuration
|
||||
|
||||
- script: |
|
||||
set nugetSource=https://messa017.infineon.com/v3/index.json
|
||||
echo %nugetSource%
|
||||
echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
|
||||
echo $(NugetSource)
|
||||
displayName: NugetSource
|
||||
|
||||
- script: |
|
||||
set gitCommit=$(Build.SourceVersion)
|
||||
set gitCommitSeven=%gitCommit:~0,7%
|
||||
echo %gitCommitSeven%
|
||||
echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
|
||||
echo $(GitCommitSeven)
|
||||
displayName: GitCommitSeven
|
||||
|
||||
- script: |
|
||||
echo $(Build.BuildId)
|
||||
echo $(Build.Reason)
|
||||
echo $(Build.Repository.Id)
|
||||
echo $(Build.Repository.Name)
|
||||
echo $(Build.SourceVersion)
|
||||
echo $(CoreVersion)
|
||||
echo $(Configuration)
|
||||
echo $(NugetSource)
|
||||
echo $(GitCommitSeven)
|
||||
REM echo $(pipelinePassword)
|
||||
displayName: "Echo Check"
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
||||
displayName: "Nuget Clear"
|
||||
# enabled: false
|
||||
|
||||
- script: |
|
||||
"C:\program files\dotnet\dotnet.exe" user-secrets init
|
||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
|
||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommitSeven" "$(GitCommitSeven)"
|
||||
"C:\program files\dotnet\dotnet.exe" user-secrets list
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Safe storage of app secrets - Adaptation"
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: "Copy Files to: - GhostPCL"
|
||||
inputs:
|
||||
SourceFolder: '\\messv02ecc1.ec.local\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL\gpcl6win64'
|
||||
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
|
||||
OverWrite: true
|
||||
enabled: false
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: "Copy Files to: - LincPDFC"
|
||||
inputs:
|
||||
SourceFolder: '\\messv02ecc1.ec.local\EC_EAFRepository\Staging\DeploymentStorage\LincPDFC\v2.6.6.21'
|
||||
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
|
||||
OverWrite: true
|
||||
enabled: false
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: "Copy Files to: - PDF-Text-Stripper"
|
||||
inputs:
|
||||
SourceFolder: '\\messv02ecc1.ec.local\EC_EAFRepository\Staging\DeploymentStorage\PDF-Text-Stripper\v4.8.0.1'
|
||||
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
|
||||
OverWrite: true
|
||||
enabled: false
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Build - Adaptation"
|
||||
|
||||
- powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
|
||||
workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)"
|
||||
displayName: "PowerShell Script"
|
||||
continueOnError: true
|
||||
|
||||
- script: "dotnet test --configuration $(Configuration)"
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Test"
|
||||
|
||||
- script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)'
|
||||
displayName: "Move Results"
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" tool restore'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Tool Restore"
|
||||
enabled: false
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Report Generator"
|
||||
enabled: false
|
||||
|
||||
- task: PublishTestResults@2
|
||||
displayName: "Publish Test Results **/*.trx"
|
||||
inputs:
|
||||
testResultsFormat: VSTest
|
||||
testResultsFiles: "**/*.trx"
|
||||
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
|
||||
searchFolder: "$(System.DefaultWorkingDirectory)"
|
||||
|
||||
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
|
||||
displayName: "Create work item"
|
||||
inputs:
|
||||
teamProject: "Mesa_FI"
|
||||
workItemType: Bug
|
||||
title: $(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)
|
||||
assignedTo: "$(Build.RequestedForId)"
|
||||
enabled: false
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" publish --configuration $(Configuration) --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Adaptation --source $(NugetSource)'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Publish"
|
||||
enabled: false
|
||||
|
||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources=$(NugetSource)'
|
||||
displayName: "MSBuild Restore"
|
||||
|
||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
|
||||
displayName: MSBuild
|
||||
|
||||
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)-$(Build.Repository.Name)>bin\$(Configuration)\$(Build.Repository.Name).txt'
|
||||
displayName: "Commit Id"
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy Files to: D:\Framework4.8'
|
||||
inputs:
|
||||
SourceFolder: 'bin\$(Configuration)'
|
||||
Contents: "*$(Build.Repository.Name)*"
|
||||
TargetFolder: 'D:\Framework4.8\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)'
|
||||
OverWrite: true
|
||||
enabled: false
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy Files to: \\messv02ecc1.ec.local\EC_EAFRepository'
|
||||
inputs:
|
||||
SourceFolder: 'bin\$(Configuration)'
|
||||
Contents: "*$(Build.Repository.Name)*"
|
||||
TargetFolder: '\\messv02ecc1.ec.local\EC_EAFRepository\Staging\DeploymentStorage\Adaptation_$(Build.Repository.Name)'
|
||||
OverWrite: true
|
||||
enabled: false
|
||||
|
||||
- script: |
|
||||
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Clean - Tests"
|
||||
|
||||
- script: |
|
||||
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Clean - Adaptation"
|
||||
|
||||
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
|
||||
displayName: "Force Fail"
|
||||
enabled: false
|
@ -33,49 +33,8 @@
|
||||
<DefineConstants>Linux</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
|
||||
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.1" />
|
||||
<PackageReference Include="System.Data.OleDb" Version="6.0.0" />
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.4" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
|
||||
<PackageReference Include="System.Text.Json" Version="6.0.6" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.collector" Version="3.1.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FFMpegCore" Version="4.8.0" />
|
||||
<PackageReference Include="Infineon.Yoda" Version="5.4.1" />
|
||||
<PackageReference Include="Instances" Version="2.0.0" />
|
||||
<PackageReference Include="RoboSharp" Version="1.2.8" />
|
||||
<PackageReference Include="Tesseract" Version="4.1.1" />
|
||||
<PackageReference Include="Tibco.Rendezvous" Version="8.5.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="External.Common.Logging.Core" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="External.Common.Logging" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="External.log4net" Version="2.0.8"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="coverlet.collector" Version="3.2.0" />
|
||||
<PackageReference Include="FFMpegCore" Version="5.0.2" />
|
||||
<PackageReference Include="IKVM.AWT.WinForms" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="IKVM.OpenJDK.Core" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="IKVM.OpenJDK.Media" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
@ -83,6 +42,41 @@
|
||||
<PackageReference Include="IKVM.OpenJDK.Util" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="IKVM.Runtime" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="Instances" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.3" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.json" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
|
||||
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="7.0.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
|
||||
<PackageReference Include="Pdfbox" Version="1.1.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="RoboSharp" Version="1.2.8" />
|
||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" />
|
||||
<PackageReference Include="System.Data.OleDb" Version="7.0.0" />
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
|
||||
<PackageReference Include="System.Text.Json" Version="7.0.2" />
|
||||
<PackageReference Include="Tesseract" Version="5.2.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Tibco.Rendezvous" Version="8.5.0" />
|
||||
<PackageReference Include="Infineon.Yoda" Version="5.4.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Infineon.Mesa.PDF.Text.Stripper" Version="4.8.0.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="External.Common.Logging.Core" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="External.Common.Logging" Version="3.3.1"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
<PackageReference Include="External.log4net" Version="2.0.8"><NoWarn>NU1701</NoWarn></PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="appsettings.json">
|
||||
@ -92,4 +86,18 @@
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Condition="'$(Configuration)' == 'Debug'" Include="\\mestsa003.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL\gpcl6win64\gpcl6dll64.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Condition="'$(Configuration)' == 'Debug'" Include="\\mestsa003.infineon.com\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL\gpcl6win64\gpcl6win64.exe">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Condition="'$(Configuration)' == 'Release'" Include="\\messv02ecc1.ec.local\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL\gpcl6win64\gpcl6dll64.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Condition="'$(Configuration)' == 'Release'" Include="\\messv02ecc1.ec.local\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL\gpcl6win64\gpcl6win64.exe">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
174
Adaptation/MET08DDUPSFS6420.yml
Normal file
174
Adaptation/MET08DDUPSFS6420.yml
Normal file
@ -0,0 +1,174 @@
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
paths:
|
||||
include:
|
||||
- "Adaptation/*"
|
||||
|
||||
pool:
|
||||
name: Mesa-Windows-Service
|
||||
demands: MET08DDUPSFS6420
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
set coreVersion=net6.0
|
||||
echo %coreVersion%
|
||||
echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
|
||||
echo $(CoreVersion)
|
||||
displayName: CoreVersion
|
||||
|
||||
- script: |
|
||||
set configuration=Release
|
||||
echo %configuration%
|
||||
echo ##vso[task.setvariable variable=Configuration;]%configuration%
|
||||
echo ($Configuration)
|
||||
displayName: Configuration
|
||||
|
||||
- script: |
|
||||
set nugetSource=https://messa08ec.ec.local/v3/index.json
|
||||
echo %nugetSource%
|
||||
echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
|
||||
echo $(NugetSource)
|
||||
displayName: NugetSource
|
||||
|
||||
- script: |
|
||||
set gitCommit=$(Build.SourceVersion)
|
||||
set gitCommitSeven=%gitCommit:~0,7%
|
||||
echo %gitCommitSeven%
|
||||
echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
|
||||
echo $(GitCommitSeven)
|
||||
displayName: GitCommitSeven
|
||||
|
||||
- script: |
|
||||
echo $(Build.BuildId)
|
||||
echo $(Build.Reason)
|
||||
echo $(Build.Repository.Id)
|
||||
echo $(Build.Repository.Name)
|
||||
echo $(Build.SourceVersion)
|
||||
echo $(CoreVersion)
|
||||
echo $(Configuration)
|
||||
echo $(NugetSource)
|
||||
echo $(GitCommitSeven)
|
||||
REM echo $(pipelinePassword)
|
||||
displayName: "Echo Check"
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
||||
displayName: "Nuget Clear"
|
||||
enabled: false
|
||||
|
||||
- script: |
|
||||
"C:\program files\dotnet\dotnet.exe" user-secrets init
|
||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
|
||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommitSeven" "$(GitCommitSeven)"
|
||||
"C:\program files\dotnet\dotnet.exe" user-secrets list
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Safe storage of app secrets - Adaptation"
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: "Copy Files to: - GhostPCL"
|
||||
inputs:
|
||||
SourceFolder: '\\messv02ecc1.ec.local\EC_EAFRepository\Staging\DeploymentStorage\GhostPCL\gpcl6win64'
|
||||
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
|
||||
OverWrite: true
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: "Copy Files to: - LincPDFC"
|
||||
inputs:
|
||||
SourceFolder: '\\messv02ecc1.ec.local\EC_EAFRepository\Staging\DeploymentStorage\LincPDFC\v2.6.6.21'
|
||||
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
|
||||
OverWrite: true
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: "Copy Files to: - PDF-Text-Stripper"
|
||||
inputs:
|
||||
SourceFolder: '\\messv02ecc1.ec.local\EC_EAFRepository\Staging\DeploymentStorage\PDF-Text-Stripper\v4.8.0.1'
|
||||
TargetFolder: 'Adaptation\bin\$(Configuration)\net6.0\win-x64'
|
||||
OverWrite: true
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Build - Adaptation"
|
||||
|
||||
- powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
|
||||
workingDirectory: "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)"
|
||||
displayName: "PowerShell Script"
|
||||
continueOnError: true
|
||||
|
||||
- script: "dotnet test --configuration $(Configuration)"
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Test"
|
||||
|
||||
- script: 'move /y "$(System.DefaultWorkingDirectory)/../../../$(Build.Repository.Name)/05_TestResults/TestResults" $(System.DefaultWorkingDirectory)'
|
||||
displayName: "Move Results"
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" tool restore'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Tool Restore"
|
||||
enabled: false
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:$(System.DefaultWorkingDirectory)/TestResults/**/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Report Generator"
|
||||
enabled: false
|
||||
|
||||
- task: PublishTestResults@2
|
||||
displayName: "Publish Test Results **/*.trx"
|
||||
inputs:
|
||||
testResultsFormat: VSTest
|
||||
testResultsFiles: "**/*.trx"
|
||||
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
|
||||
searchFolder: "$(System.DefaultWorkingDirectory)"
|
||||
|
||||
- task: mspremier.CreateWorkItem.CreateWorkItem-task.CreateWorkItem@1
|
||||
displayName: "Create work item"
|
||||
inputs:
|
||||
teamProject: "Mesa_FI"
|
||||
workItemType: Bug
|
||||
title: $(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)
|
||||
assignedTo: "$(Build.RequestedForId)"
|
||||
enabled: false
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" publish --configuration $(Configuration) --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Adaptation --source $(NugetSource)'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Publish"
|
||||
enabled: false
|
||||
|
||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8 /p:RestoreSources=$(NugetSource)'
|
||||
displayName: "MSBuild Restore"
|
||||
|
||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=$(Configuration);TargetFrameworkVersion=v4.8'
|
||||
displayName: MSBuild
|
||||
|
||||
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)-$(Build.Repository.Name)>bin\$(Configuration)\$(Build.Repository.Name).txt'
|
||||
displayName: "Commit Id"
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy Files to: D:\Framework4.8'
|
||||
inputs:
|
||||
SourceFolder: 'bin\$(Configuration)'
|
||||
Contents: "*$(Build.Repository.Name)*"
|
||||
TargetFolder: 'D:\Framework4.8\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)'
|
||||
OverWrite: true
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy Files to: \\messv02ecc1.ec.local\EC_EAFRepository'
|
||||
inputs:
|
||||
SourceFolder: 'bin\$(Configuration)'
|
||||
Contents: "*$(Build.Repository.Name)*"
|
||||
TargetFolder: '\\messv02ecc1.ec.local\EC_EAFRepository\Staging\DeploymentStorage\Adaptation_$(Build.Repository.Name)'
|
||||
OverWrite: true
|
||||
|
||||
- script: |
|
||||
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Clean - Tests"
|
||||
|
||||
- script: |
|
||||
"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Core Clean - Adaptation"
|
||||
|
||||
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
|
||||
displayName: "Force Fail"
|
||||
enabled: false
|
@ -30,7 +30,7 @@ public partial class WS
|
||||
};
|
||||
HttpResponseMessage httpResponseMessage = httpClient.SendAsync(httpRequestMessage, HttpCompletionOption.ResponseContentRead).Result;
|
||||
resultsJson = httpResponseMessage.Content.ReadAsStringAsync().Result;
|
||||
results = JsonSerializer.Deserialize<Results>(resultsJson);
|
||||
results = JsonSerializer.Deserialize<Results>(resultsJson, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
}
|
||||
if (!results.Success)
|
||||
results.Errors.Add(results.ToString());
|
||||
@ -45,6 +45,7 @@ public partial class WS
|
||||
exception = exception.InnerException;
|
||||
}
|
||||
results.Errors ??= new List<string>();
|
||||
results.Errors.Add(resultsJson);
|
||||
results.Errors.Add(stringBuilder.ToString());
|
||||
}
|
||||
return new(resultsJson, results);
|
||||
|
@ -41,7 +41,7 @@ public class TENCOR1 : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ public class TENCOR1 : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ public class TENCOR2 : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ public class TENCOR3_EQPT : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ public class TENCOR3 : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ public class TENCOR1 : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ public class TENCOR2 : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ public class TENCOR3 : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_47_1;
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_47_0;
|
||||
|
||||
[TestClass]
|
||||
public class TENCOR1 : EAFLoggingUnitTesting
|
||||
@ -43,15 +43,15 @@ public class TENCOR1 : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__TENCOR1__pcl()
|
||||
public void Staging__v2_47_0__TENCOR1__pcl()
|
||||
{
|
||||
string check = "*.pcl";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
@ -6,7 +6,7 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_47_1;
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_47_0;
|
||||
|
||||
[TestClass]
|
||||
public class TENCOR2 : EAFLoggingUnitTesting
|
||||
@ -43,15 +43,15 @@ public class TENCOR2 : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__TENCOR2__pcl()
|
||||
public void Staging__v2_47_0__TENCOR2__pcl()
|
||||
{
|
||||
string check = "*.pcl";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
@ -6,7 +6,7 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_47_1;
|
||||
namespace Adaptation._Tests.CreateSelfDescription.Staging.v2_47_0;
|
||||
|
||||
[TestClass]
|
||||
public class TENCOR3 : EAFLoggingUnitTesting
|
||||
@ -43,15 +43,15 @@ public class TENCOR3 : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__TENCOR3__pcl()
|
||||
public void Staging__v2_47_0__TENCOR3__pcl()
|
||||
{
|
||||
string check = "*.pcl";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
@ -43,11 +43,11 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -60,7 +60,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -73,7 +73,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -86,7 +86,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -99,7 +99,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -112,7 +112,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -125,7 +125,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -138,7 +138,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -151,7 +151,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -164,7 +164,7 @@ public class MET08DDUPSFS6420 : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
|
@ -5,7 +5,7 @@ using System;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_47_1;
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_47_0;
|
||||
|
||||
[TestClass]
|
||||
public class TENCOR1
|
||||
@ -14,31 +14,31 @@ public class TENCOR1
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_47_1.TENCOR1 _TENCOR1;
|
||||
private static CreateSelfDescription.Staging.v2_47_0.TENCOR1 _TENCOR1;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_47_1.TENCOR1.ClassInitialize(testContext);
|
||||
_TENCOR1 = CreateSelfDescription.Staging.v2_47_1.TENCOR1.EAFLoggingUnitTesting;
|
||||
CreateSelfDescription.Staging.v2_47_0.TENCOR1.ClassInitialize(testContext);
|
||||
_TENCOR1 = CreateSelfDescription.Staging.v2_47_0.TENCOR1.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__TENCOR1__pcl() => _TENCOR1.Staging__v2_47_1__TENCOR1__pcl();
|
||||
public void Staging__v2_47_0__TENCOR1__pcl() => _TENCOR1.Staging__v2_47_0__TENCOR1__pcl();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(MissingMethodException))]
|
||||
public void Staging__v2_47_1__TENCOR1__pcl637955518212649513__Normal()
|
||||
public void Staging__v2_47_0__TENCOR1__pcl637955518212649513__Normal()
|
||||
{
|
||||
string check = "*.pcl";
|
||||
bool validatePDSF = false;
|
||||
_TENCOR1.Staging__v2_47_1__TENCOR1__pcl();
|
||||
_TENCOR1.Staging__v2_47_0__TENCOR1__pcl();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string[] variables = _TENCOR1.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _TENCOR1.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
@ -5,7 +5,7 @@ using System;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_47_1;
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_47_0;
|
||||
|
||||
[TestClass]
|
||||
public class TENCOR2
|
||||
@ -14,31 +14,31 @@ public class TENCOR2
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_47_1.TENCOR2 _TENCOR2;
|
||||
private static CreateSelfDescription.Staging.v2_47_0.TENCOR2 _TENCOR2;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_47_1.TENCOR2.ClassInitialize(testContext);
|
||||
_TENCOR2 = CreateSelfDescription.Staging.v2_47_1.TENCOR2.EAFLoggingUnitTesting;
|
||||
CreateSelfDescription.Staging.v2_47_0.TENCOR2.ClassInitialize(testContext);
|
||||
_TENCOR2 = CreateSelfDescription.Staging.v2_47_0.TENCOR2.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__TENCOR2__pcl() => _TENCOR2.Staging__v2_47_1__TENCOR2__pcl();
|
||||
public void Staging__v2_47_0__TENCOR2__pcl() => _TENCOR2.Staging__v2_47_0__TENCOR2__pcl();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(MissingMethodException))]
|
||||
public void Staging__v2_47_1__TENCOR2__pcl637955534973701250__Normal()
|
||||
public void Staging__v2_47_0__TENCOR2__pcl637955534973701250__Normal()
|
||||
{
|
||||
string check = "*.pcl";
|
||||
bool validatePDSF = false;
|
||||
_TENCOR2.Staging__v2_47_1__TENCOR2__pcl();
|
||||
_TENCOR2.Staging__v2_47_0__TENCOR2__pcl();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string[] variables = _TENCOR2.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _TENCOR2.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
@ -5,7 +5,7 @@ using System;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_47_1;
|
||||
namespace Adaptation._Tests.Extract.Staging.v2_47_0;
|
||||
|
||||
[TestClass]
|
||||
public class TENCOR3
|
||||
@ -14,31 +14,31 @@ public class TENCOR3
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_47_1.TENCOR3 _TENCOR3;
|
||||
private static CreateSelfDescription.Staging.v2_47_0.TENCOR3 _TENCOR3;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_47_1.TENCOR3.ClassInitialize(testContext);
|
||||
_TENCOR3 = CreateSelfDescription.Staging.v2_47_1.TENCOR3.EAFLoggingUnitTesting;
|
||||
CreateSelfDescription.Staging.v2_47_0.TENCOR3.ClassInitialize(testContext);
|
||||
_TENCOR3 = CreateSelfDescription.Staging.v2_47_0.TENCOR3.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__TENCOR3__pcl() => _TENCOR3.Staging__v2_47_1__TENCOR3__pcl();
|
||||
public void Staging__v2_47_0__TENCOR3__pcl() => _TENCOR3.Staging__v2_47_0__TENCOR3__pcl();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(MissingMethodException))]
|
||||
public void Staging__v2_47_1__TENCOR3__pcl637955520360305921__Normal()
|
||||
public void Staging__v2_47_0__TENCOR3__pcl637955520360305921__Normal()
|
||||
{
|
||||
string check = "*.pcl";
|
||||
bool validatePDSF = false;
|
||||
_TENCOR3.Staging__v2_47_1__TENCOR3__pcl();
|
||||
_TENCOR3.Staging__v2_47_0__TENCOR3__pcl();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
string[] variables = _TENCOR3.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _TENCOR3.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
@ -22,46 +22,47 @@ public class MET08DDUPSFS6420
|
||||
_MET08DDUPSFS6420 = CreateSelfDescription.Staging.v2_47_1.MET08DDUPSFS6420.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08DDUPSFS6420__MoveMatchingFiles() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__MoveMatchingFiles();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08DDUPSFS6420__OpenInsightMetrologyViewer() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__OpenInsightMetrologyViewer();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08DDUPSFS6420__OpenInsightMetrologyViewer637810124350899080__Normal()
|
||||
{
|
||||
string check = "~IsXToOpenInsightMetrologyViewer";
|
||||
string check = "*.pdsf";
|
||||
bool validatePDSF = false;
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
_MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__OpenInsightMetrologyViewer();
|
||||
string[] variables = _MET08DDUPSFS6420.AdaptationTesting.GetVariables(methodBase, check);
|
||||
string[] variables = _MET08DDUPSFS6420.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
||||
IFileRead fileRead = _MET08DDUPSFS6420.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
|
||||
Logistics logistics = new(fileRead);
|
||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08DDUPSFS6420__IQSSi() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__IQSSi();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08DDUPSFS6420__OpenInsight() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__OpenInsight();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -76,37 +77,37 @@ public class MET08DDUPSFS6420
|
||||
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08DDUPSFS6420__OpenInsightMetrologyViewerAttachments() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__OpenInsightMetrologyViewerAttachments();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08DDUPSFS6420__APC() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__APC();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08DDUPSFS6420__SPaCe() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__SPaCe();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08DDUPSFS6420__Processed() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__Processed();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08DDUPSFS6420__Archive() => _MET08DDUPSFS6420.Staging__v2_47_1__MET08DDUPSFS6420__Archive();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
|
@ -343,7 +343,7 @@ public class AdaptationTesting : ISMTP
|
||||
return result as T;
|
||||
}
|
||||
|
||||
protected static CellInstanceVersion GetCellInstanceVersion(string url)
|
||||
public static CellInstanceVersion GetCellInstanceVersion(string url)
|
||||
{
|
||||
CellInstanceVersion result;
|
||||
byte[] byteArray;
|
||||
@ -874,7 +874,7 @@ public class AdaptationTesting : ISMTP
|
||||
return result;
|
||||
}
|
||||
|
||||
protected Dictionary<string, object> GetKeyValuePairs(string cellInstanceName, string cellInstanceVersionName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, List<Tuple<string, string>> equipmentDictionaryIsAlwaysEnabledEvents)
|
||||
protected Dictionary<string, object> GetKeyValuePairs(string cellInstanceName, string cellInstanceVersionName, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, List<Tuple<string, string>> equipmentDictionaryIsAlwaysEnabledEvents, int edaConnectionPortNumber)
|
||||
{
|
||||
Dictionary<string, object> results = new()
|
||||
{
|
||||
@ -883,6 +883,7 @@ public class AdaptationTesting : ISMTP
|
||||
{ nameof(cellInstanceName), cellInstanceName },
|
||||
{ nameof(equipmentTypeName), equipmentTypeName },
|
||||
{ nameof(cellInstanceVersionName), cellInstanceVersionName },
|
||||
{ nameof(edaConnectionPortNumber), edaConnectionPortNumber },
|
||||
{ nameof(equipmentDictionaryName), equipmentDictionaryName },
|
||||
{ nameof(cellInstanceConnectionName), cellInstanceConnectionName },
|
||||
{ nameof(FileConnectorConfiguration), fileConnectorConfiguration },
|
||||
@ -930,7 +931,7 @@ public class AdaptationTesting : ISMTP
|
||||
Tuple<string, IList<ModelObjectParameterDefinition>> modelObjectParametersTuple = GetModelObjectParameters(equipmentTypeVersionTuple);
|
||||
Tuple<string, string, string, EquipmentDictionaryVersion> equipmentDictionaryVersionTuple = GetEquipmentDictionaryVersionTuple(cellInstanceVersionTuple.Item2, mbn.CellInstanceConnectionName, equipmentTypeVersionTuple.Item4);
|
||||
Tuple<string, List<Tuple<string, string>>> equipmentDictionaryIsAlwaysEnabledEventsTuple = GetEquipmentDictionaryIsAlwaysEnabledEventsTuple(equipmentDictionaryVersionTuple);
|
||||
Dictionary<string, object> objects = GetKeyValuePairs(mbn.CellInstanceName, mbn.CellInstanceVersionName, mbn.CellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, equipmentDictionaryIsAlwaysEnabledEventsTuple.Item2);
|
||||
Dictionary<string, object> objects = GetKeyValuePairs(mbn.CellInstanceName, mbn.CellInstanceVersionName, mbn.CellInstanceConnectionName, fileConnectorConfigurationTuple.Item2, equipmentTypeVersionTuple.Item2, parameterizedModelObjectDefinitionTypeTuple.Item2, modelObjectParametersTuple.Item2, equipmentDictionaryVersionTuple.Item2, equipmentDictionaryIsAlwaysEnabledEventsTuple.Item2, cellInstanceVersionTuple.Item2.EdaConnection.PortNumber);
|
||||
string json = JsonSerializer.Serialize(objects, new JsonSerializerOptions { WriteIndented = true });
|
||||
results = new string[] { fileInfo.FullName, json };
|
||||
return results;
|
||||
|
@ -26,7 +26,7 @@ public class LoggingUnitTesting : UnitTesting, IDisposable
|
||||
base(testContext, declaringType)
|
||||
{
|
||||
_LoggerFactory = new LoggerFactory();
|
||||
if (testContext is null || declaringType is null)
|
||||
if (testContext is null || declaringType is null || _IsEnvironment is null)
|
||||
{
|
||||
_ConfigurationRoot = null;
|
||||
_DefaultLogLevel = null;
|
||||
|
@ -29,6 +29,10 @@ public class UnitTesting
|
||||
{
|
||||
string waitFor = "\"WaitFor\":";
|
||||
string projectDirectory = GetProjectDirectory(testContext);
|
||||
if (string.IsNullOrEmpty(projectDirectory))
|
||||
_IsEnvironment = null;
|
||||
else
|
||||
{
|
||||
_TestContextPropertiesAsJson = JsonSerializer.Serialize(testContext.Properties, new JsonSerializerOptions { WriteIndented = true });
|
||||
_HasWaitForProperty = _TestContextPropertiesAsJson.Contains(waitFor);
|
||||
string vsCodeDirectory = Path.Combine(projectDirectory, ".vscode");
|
||||
@ -58,11 +62,12 @@ public class UnitTesting
|
||||
_IsEnvironment ??= new IsEnvironment(processesCount: null, nullASPNetCoreEnvironmentIsDevelopment: Debugger.IsAttached, nullASPNetCoreEnvironmentIsProduction: !Debugger.IsAttached);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static string GetProjectDirectory(TestContext testContext)
|
||||
{
|
||||
string result;
|
||||
string[] checkFiles = null;
|
||||
string[] checkFiles;
|
||||
result = Path.GetDirectoryName(testContext.DeploymentDirectory);
|
||||
for (int i = 0; i < int.MaxValue; i++)
|
||||
{
|
||||
@ -73,8 +78,6 @@ public class UnitTesting
|
||||
break;
|
||||
result = Path.GetDirectoryName(result);
|
||||
}
|
||||
if (string.IsNullOrEmpty(result) || checkFiles is null || !checkFiles.Any())
|
||||
throw new Exception(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
72
Adaptation/_Tests/Static/MET08DDUPSFS6420.cs
Normal file
72
Adaptation/_Tests/Static/MET08DDUPSFS6420.cs
Normal file
@ -0,0 +1,72 @@
|
||||
using Adaptation._Tests.Shared;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace Adaptation._Tests.Static;
|
||||
|
||||
[TestClass]
|
||||
public class MET08DDUPSFS6420 : LoggingUnitTesting, IDisposable
|
||||
{
|
||||
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
internal static MET08DDUPSFS6420 LoggingUnitTesting { get; private set; }
|
||||
|
||||
public MET08DDUPSFS6420() : base(testContext: null, declaringType: null)
|
||||
{
|
||||
if (LoggingUnitTesting is null)
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
public MET08DDUPSFS6420(TestContext testContext) : base(testContext, new StackFrame().GetMethod().DeclaringType)
|
||||
{
|
||||
}
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext) => LoggingUnitTesting ??= new MET08DDUPSFS6420(testContext);
|
||||
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
LoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void TestDateTime()
|
||||
{
|
||||
DateTime dateTime = DateTime.Now;
|
||||
Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString());
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging()
|
||||
{
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
StringBuilder results = new();
|
||||
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
||||
{
|
||||
new("MET08DDUPSFS6420", "v2.47.1"),
|
||||
};
|
||||
string staging = "http://mestsa07ec.ec.local:9003/CellInstanceServiceV2";
|
||||
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
|
||||
{
|
||||
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{staging}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
|
||||
_ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}");
|
||||
}
|
||||
File.WriteAllText($"D:/Tmp/{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv", results.ToString());
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
}
|
@ -3,7 +3,9 @@ using Microsoft.Extensions.Logging;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace Adaptation._Tests.Static;
|
||||
|
||||
@ -32,7 +34,7 @@ public class PCL : LoggingUnitTesting, IDisposable
|
||||
[ClassCleanup()]
|
||||
public static void ClassCleanup()
|
||||
{
|
||||
LoggingUnitTesting.Logger?.LogInformation("Cleanup");
|
||||
LoggingUnitTesting?.Logger?.LogInformation("Cleanup");
|
||||
LoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
@ -126,6 +128,40 @@ public class PCL : LoggingUnitTesting, IDisposable
|
||||
Assert.IsTrue(descriptor.Reactor is "20");
|
||||
Assert.IsTrue(descriptor.Zone is "1");
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
descriptor = FileHandlers.pcl.ProcessData.GetDescriptor("P2-LOW-RR");
|
||||
Assert.IsTrue(!string.IsNullOrEmpty(descriptor.Lot));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.PSN));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.RDS));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
|
||||
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging()
|
||||
{
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
StringBuilder results = new();
|
||||
(string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[]
|
||||
{
|
||||
new("TENCOR1", "v2.47.0"),
|
||||
new("TENCOR2", "v2.47.0"),
|
||||
new("TENCOR3", "v2.47.0"),
|
||||
};
|
||||
string staging = "http://mestsa07ec.ec.local:9003/CellInstanceServiceV2";
|
||||
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
|
||||
foreach ((string cellInstanceName, string cellInstanceVersionName) in collection)
|
||||
{
|
||||
cellInstanceVersion = AdaptationTesting.GetCellInstanceVersion($"{staging}/{cellInstanceName}/{cellInstanceVersionName}/configuration");
|
||||
_ = results.AppendLine($"{cellInstanceName}\t{cellInstanceVersionName}\t{cellInstanceVersion.EdaConnection.PortNumber}");
|
||||
}
|
||||
File.WriteAllText($"D:/Tmp/{methodBase.Module.Name}-{methodBase.ReflectedType.Name}-{methodBase.Name}.tsv", results.ToString());
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
|
172
Jenkinsfile
vendored
172
Jenkinsfile
vendored
@ -1,172 +0,0 @@
|
||||
#!/usr/bin/env groovy
|
||||
/* groovylint-disable CompileStatic, ConsecutiveStringConcatenation, DuplicateNumberLiteral, DuplicateStringLiteral, LineLength, NestedBlockDepth, NoDef, VariableTypeRequired */
|
||||
import groovy.transform.Field
|
||||
|
||||
@Field String _DDrive = 'D:/'
|
||||
@Field String _AssemblyName = '...'
|
||||
@Field String _TargetLocation = '...'
|
||||
@Field String _GitCommitSeven = '...'
|
||||
@Field String _GitName = 'MET08DDUPSFS6420'
|
||||
@Field String _TestProjectDirectory = 'Adaptation'
|
||||
@Field String _AgentStaging = 'mestsa07ec-ecmeseaf'
|
||||
@Field String _DDriveNet = "${_DDrive}Framework4.8"
|
||||
@Field String _AgentProduction = 'messa08ec-ecmeseaf'
|
||||
@Field String _AgentDevelopment = 'mestsa003-mesedasvc'
|
||||
@Field String _ProgramFilesDotnet = 'C:/Program Files/dotnet/dotnet.exe'
|
||||
@Field String _ProgramFilesMSBuild = 'C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe'
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label env.JENKINS_ENVIRONMENT == 'Development' ? _AgentDevelopment : env.JENKINS_ENVIRONMENT == 'Staging' ? _AgentStaging : env.JENKINS_ENVIRONMENT == 'Production' ? _AgentProduction : 'Else'
|
||||
}
|
||||
parameters {
|
||||
string(name: 'GIT_SERVER', defaultValue: env.JENKINS_ENVIRONMENT == 'Development' ? 'mestsa003.infineon.com' : 'mestsa07ec.ec.local', description: 'git server')
|
||||
string(name: 'DEFAULT_FILE_SERVER', defaultValue: env.JENKINS_ENVIRONMENT == 'Development' ? 'messv02ecc1_ec_local' : 'messv02ecc1.ec.local', description: 'Default file server...')
|
||||
}
|
||||
stages {
|
||||
// stage('Git') {
|
||||
// steps {
|
||||
// bat(returnStatus: true, script: 'git init')
|
||||
// bat(returnStatus: true, script: 'git remote add origin \\\\' + params.GIT_SERVER + '\\Git\\' + _GitName + '.git')
|
||||
// bat(returnStatus: true, script: 'git pull origin master')
|
||||
// }
|
||||
// }
|
||||
stage('Setup') {
|
||||
steps {
|
||||
script {
|
||||
_AssemblyName = "${env.JOB_NAME}"
|
||||
// _GitCommitSeven = '1234567'
|
||||
_GitCommitSeven = env.GIT_COMMIT.substring(0, 7)
|
||||
def files = findFiles(glob: '*.csproj')
|
||||
if (files.length != 1) {
|
||||
error("Build failed because couldn't find a *.csproj file")
|
||||
}
|
||||
echo """
|
||||
${files[0].name}
|
||||
${files[0].path}
|
||||
${files[0].directory}
|
||||
${files[0].length}
|
||||
${files[0].lastModified}
|
||||
"""
|
||||
_AssemblyName = files[0].name.split('[.]csproj')[0]
|
||||
_TargetLocation = "\\\\${params.DEFAULT_FILE_SERVER}\\EC_EAFRepository\\${env.JENKINS_ENVIRONMENT}\\DeploymentStorage\\Adaptation_${_AssemblyName}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Info') {
|
||||
steps {
|
||||
echo "_AssemblyName ${_AssemblyName}" // ...
|
||||
echo "BUILD_NUMBER ${env.BUILD_NUMBER}" // 11
|
||||
echo "DEFAULT_FILE_SERVER ${params.DEFAULT_FILE_SERVER}" // 11
|
||||
echo "GIT_BRANCH ${env.GIT_BRANCH}" // origin/master
|
||||
echo "GIT_COMMIT ${env.GIT_COMMIT}" // 73b814069f2cf0173a62a8228815a9bc9ba93c41
|
||||
echo "GIT_SERVER ${params.GIT_SERVER}" // ...
|
||||
echo "GIT_URL ${env.GIT_URL}" // D:\ProgramData\Git\....git
|
||||
echo "JENKINS_ENVIRONMENT ${env.JENKINS_ENVIRONMENT}" // 11
|
||||
echo "JENKINS_URL ${env.JENKINS_URL}" // http://localhost:8080/
|
||||
echo "JOB_NAME ${env.JOB_NAME}" // ...
|
||||
echo "WORKSPACE ${env.WORKSPACE}" // D:\.jenkins\_\...
|
||||
}
|
||||
}
|
||||
// stage('Restore') {
|
||||
// steps {
|
||||
// bat(returnStatus: true, script: 'dotnet --info')
|
||||
// }
|
||||
// }
|
||||
stage('Safe storage of app secrets') {
|
||||
steps {
|
||||
dir(_TestProjectDirectory) {
|
||||
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
|
||||
'user-secrets init')
|
||||
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
|
||||
'user-secrets set "BuildNumber" "' + env.BUILD_NUMBER + '"')
|
||||
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
|
||||
'user-secrets set "GitCommitSeven" "' + _GitCommitSeven + '"')
|
||||
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
|
||||
'user-secrets set "Server" "' + params.DEFAULT_FILE_SERVER + '"')
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Core Build') {
|
||||
steps {
|
||||
echo "Build number is ${currentBuild.number}"
|
||||
dir(_TestProjectDirectory) {
|
||||
bat(returnStatus: true, script: '"' + _ProgramFilesDotnet + '" ' +
|
||||
'build --runtime win-x64 --self-contained --verbosity quiet')
|
||||
}
|
||||
}
|
||||
}
|
||||
// stage('Test') {
|
||||
// options {
|
||||
// timeout(time: 10, unit: 'MINUTES')
|
||||
// }
|
||||
// steps {
|
||||
// dir(_TestProjectDirectory) {
|
||||
// bat('dotnet --info')
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
stage('Framework Build') {
|
||||
steps {
|
||||
echo "Build number is ${currentBuild.number}"
|
||||
bat(returnStatus: true, script: '"' + _ProgramFilesMSBuild + '" ' +
|
||||
'/target:Restore ' +
|
||||
'/detailedsummary ' +
|
||||
'/consoleloggerparameters:PerformanceSummary;ErrorsOnly; ' +
|
||||
'/property:Configuration=Debug;TargetFrameworkVersion=v4.8 ' +
|
||||
_AssemblyName + '.csproj')
|
||||
bat(returnStatus: true, script: '"' + _ProgramFilesMSBuild + '" ' +
|
||||
'/target:Build ' +
|
||||
'/detailedsummary ' +
|
||||
'/consoleloggerparameters:PerformanceSummary;ErrorsOnly; ' +
|
||||
'/property:Configuration=Debug;TargetFrameworkVersion=v4.8 ' +
|
||||
_AssemblyName + '.csproj')
|
||||
}
|
||||
}
|
||||
stage('Commit Id') {
|
||||
steps {
|
||||
dir('bin/Debug') {
|
||||
writeFile file: "${_AssemblyName}.txt", text: "${env.GIT_COMMIT}-${env.BUILD_NUMBER}-${env.GIT_URL}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Package') {
|
||||
steps {
|
||||
fileOperations([fileZipOperation(folderPath: 'bin/Debug', outputFolderPath: "${_DDriveNet}/${_GitCommitSeven}-${env.BUILD_NUMBER}-${env.JOB_NAME}-Debug")])
|
||||
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*", renameFiles: false, sourceCaptureExpression: '', targetLocation: "${_DDriveNet}/${_GitCommitSeven}-${env.BUILD_NUMBER}-${env.JOB_NAME}-Debug", targetNameExpression: '')])
|
||||
}
|
||||
}
|
||||
// stage('Force Fail') {
|
||||
// steps {
|
||||
// error("Build failed because of this and that..")
|
||||
// }
|
||||
// }
|
||||
stage('Copy Files to: file-share') {
|
||||
steps {
|
||||
dir('bin/Debug') {
|
||||
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.txt", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
|
||||
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.dll", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
|
||||
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.exe", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
|
||||
fileOperations([fileCopyOperation(excludes: '', flattenFiles: true, includes: "${_AssemblyName}*.pdb", renameFiles: false, sourceCaptureExpression: '', targetLocation: _TargetLocation, targetNameExpression: '')])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
dir('bin') {
|
||||
deleteDir()
|
||||
}
|
||||
dir('obj') {
|
||||
deleteDir()
|
||||
}
|
||||
dir(_TestProjectDirectory + '/bin') {
|
||||
deleteDir()
|
||||
}
|
||||
dir(_TestProjectDirectory + '/obj') {
|
||||
deleteDir()
|
||||
}
|
||||
cleanWs()
|
||||
}
|
||||
}
|
||||
}
|
@ -11,7 +11,8 @@
|
||||
<RootNamespace>MET08DDUPSFS6420</RootNamespace>
|
||||
<AssemblyName>MET08DDUPSFS6420</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
|
||||
<RuntimeIdentifier Condition="'$(Configuration)' == 'Debug'">win-x86</RuntimeIdentifier>
|
||||
<RuntimeIdentifier Condition="'$(Configuration)' == 'Release'">win</RuntimeIdentifier>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
@ -109,7 +110,6 @@
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\IBarcodeDevice.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\IBarcodeRecord.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\NginxFileSystem.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\TestMe.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\WSRequest.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsight\FileRead.cs" />
|
||||
<Compile Include="Adaptation\FileHandlers\OpenInsight\FromIQS.cs" />
|
||||
@ -179,8 +179,5 @@
|
||||
<Version>6.0.3</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Adaptation\FileHandlers\BarcodeApiHost\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.47.1.0")]
|
||||
[assembly: AssemblyFileVersion("2.47.1.0")]
|
||||
[assembly: AssemblyVersion("2.47.5.0")]
|
||||
[assembly: AssemblyFileVersion("2.47.5.0")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user