dotnet test -c Release
Passed! - Failed: 0, Passed: 36, Skipped: 118, Total: 154
This commit is contained in:
parent
99e0414d60
commit
a918b50d7b
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 = 'MET08RESIMAPCDE'
|
||||
@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()
|
||||
}
|
||||
}
|
||||
}
|
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": 15176
|
||||
"processId": 19112
|
||||
}
|
||||
]
|
||||
}
|
||||
|
153
Adaptation/MET08RESIMAPCDE-Development.yml
Normal file
153
Adaptation/MET08RESIMAPCDE-Development.yml
Normal file
@ -0,0 +1,153 @@
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- development
|
||||
paths:
|
||||
include:
|
||||
- "Adaptation/*"
|
||||
|
||||
pool:
|
||||
name: Mesa-Windows-Service
|
||||
demands: MET08RESIMAPCDE-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"
|
||||
|
||||
- script: "dotnet test --configuration $(Configuration)"
|
||||
workingDirectory: Tests
|
||||
displayName: "Core Test"
|
||||
|
||||
- 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:.vscode/TestResults/*/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Report Generator"
|
||||
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"
|
||||
|
||||
- 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: Tests
|
||||
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,40 +33,41 @@
|
||||
<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" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.2" />
|
||||
<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.4.1" />
|
||||
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="7.0.0" />
|
||||
</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" />
|
||||
<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.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.collector" Version="3.1.2">
|
||||
<PackageReference Include="coverlet.collector" Version="3.2.0">
|
||||
<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="Tesseract" Version="5.2.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Tibco.Rendezvous" Version="8.5.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
148
Adaptation/MET08RESIMAPCDE.yml
Normal file
148
Adaptation/MET08RESIMAPCDE.yml
Normal file
@ -0,0 +1,148 @@
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
paths:
|
||||
include:
|
||||
- "Adaptation/*"
|
||||
|
||||
pool:
|
||||
name: Mesa-Windows-Service
|
||||
demands: MET08RESIMAPCDE
|
||||
|
||||
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"
|
||||
|
||||
- script: "dotnet test --configuration $(Configuration)"
|
||||
workingDirectory: Tests
|
||||
displayName: "Core Test"
|
||||
|
||||
- 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:.vscode/TestResults/*/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
|
||||
workingDirectory: Adaptation
|
||||
displayName: "Report Generator"
|
||||
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"
|
||||
|
||||
- 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: Tests
|
||||
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
|
@ -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 CDE2 : EAFLoggingUnitTesting
|
||||
@ -47,11 +47,11 @@ public class CDE2 : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__CDE2__txt()
|
||||
public void Staging__v2_47_0__CDE2__txt()
|
||||
{
|
||||
string check = "*.txt";
|
||||
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 CDE5 : EAFLoggingUnitTesting
|
||||
@ -47,11 +47,11 @@ public class CDE5 : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__CDE5__RsM()
|
||||
public void Staging__v2_47_0__CDE5__RsM()
|
||||
{
|
||||
string check = "*.RsM";
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
@ -47,7 +47,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting?.Dispose();
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -60,7 +60,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -73,7 +73,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -86,7 +86,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -99,7 +99,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -112,7 +112,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -125,7 +125,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -138,7 +138,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -151,7 +151,7 @@ public class MET08RESIMAPCDE : EAFLoggingUnitTesting
|
||||
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -164,7 +164,7 @@ public class MET08RESIMAPCDE : 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 CDE2
|
||||
@ -14,31 +14,31 @@ public class CDE2
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_47_1.CDE2 _CDE2;
|
||||
private static CreateSelfDescription.Staging.v2_47_0.CDE2 _CDE2;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_47_1.CDE2.ClassInitialize(testContext);
|
||||
_CDE2 = CreateSelfDescription.Staging.v2_47_1.CDE2.EAFLoggingUnitTesting;
|
||||
CreateSelfDescription.Staging.v2_47_0.CDE2.ClassInitialize(testContext);
|
||||
_CDE2 = CreateSelfDescription.Staging.v2_47_0.CDE2.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__CDE2__txt() => _CDE2.Staging__v2_47_1__CDE2__txt();
|
||||
public void Staging__v2_47_0__CDE2__txt() => _CDE2.Staging__v2_47_0__CDE2__txt();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__CDE2__txt637953079123289252__Normal()
|
||||
public void Staging__v2_47_0__CDE2__txt637953079123289252__Normal()
|
||||
{
|
||||
DateTime dateTime;
|
||||
string check = "*.txt";
|
||||
bool validatePDSF = false;
|
||||
_CDE2.Staging__v2_47_1__CDE2__txt();
|
||||
_CDE2.Staging__v2_47_0__CDE2__txt();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(_CDE2.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
|
||||
string[] variables = _CDE2.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
@ -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 CDE5
|
||||
@ -14,31 +14,31 @@ public class CDE5
|
||||
#pragma warning disable CA2254
|
||||
#pragma warning disable IDE0060
|
||||
|
||||
private static CreateSelfDescription.Staging.v2_47_1.CDE5 _CDE5;
|
||||
private static CreateSelfDescription.Staging.v2_47_0.CDE5 _CDE5;
|
||||
|
||||
[ClassInitialize]
|
||||
public static void ClassInitialize(TestContext testContext)
|
||||
{
|
||||
CreateSelfDescription.Staging.v2_47_1.CDE5.ClassInitialize(testContext);
|
||||
_CDE5 = CreateSelfDescription.Staging.v2_47_1.CDE5.EAFLoggingUnitTesting;
|
||||
CreateSelfDescription.Staging.v2_47_0.CDE5.ClassInitialize(testContext);
|
||||
_CDE5 = CreateSelfDescription.Staging.v2_47_0.CDE5.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__CDE5__RsM() => _CDE5.Staging__v2_47_1__CDE5__RsM();
|
||||
public void Staging__v2_47_0__CDE5__RsM() => _CDE5.Staging__v2_47_0__CDE5__RsM();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__CDE5__RsM637952212190000000__Normal()
|
||||
public void Staging__v2_47_0__CDE5__RsM637952212190000000__Normal()
|
||||
{
|
||||
DateTime dateTime;
|
||||
string check = "*.RsM";
|
||||
bool validatePDSF = false;
|
||||
_CDE5.Staging__v2_47_1__CDE5__RsM();
|
||||
_CDE5.Staging__v2_47_0__CDE5__RsM();
|
||||
MethodBase methodBase = new StackFrame().GetMethod();
|
||||
Assert.IsFalse(string.IsNullOrEmpty(_CDE5.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
|
||||
string[] variables = _CDE5.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
|
@ -24,13 +24,13 @@ public class MET08RESIMAPCDE
|
||||
_MET08RESIMAPCDE = CreateSelfDescription.Staging.v2_47_1.MET08RESIMAPCDE.EAFLoggingUnitTesting;
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08RESIMAPCDE__MoveMatchingFiles() => _MET08RESIMAPCDE.Staging__v2_47_1__MET08RESIMAPCDE__MoveMatchingFiles();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -52,25 +52,25 @@ public class MET08RESIMAPCDE
|
||||
Assert.IsTrue(dateTime == logistics.DateTimeFromSequence);
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08RESIMAPCDE__OpenInsightMetrologyViewer() => _MET08RESIMAPCDE.Staging__v2_47_1__MET08RESIMAPCDE__OpenInsightMetrologyViewer();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08RESIMAPCDE__IQSSi() => _MET08RESIMAPCDE.Staging__v2_47_1__MET08RESIMAPCDE__IQSSi();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08RESIMAPCDE__OpenInsight() => _MET08RESIMAPCDE.Staging__v2_47_1__MET08RESIMAPCDE__OpenInsight();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -85,37 +85,37 @@ public class MET08RESIMAPCDE
|
||||
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics);
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08RESIMAPCDE__OpenInsightMetrologyViewerAttachments() => _MET08RESIMAPCDE.Staging__v2_47_1__MET08RESIMAPCDE__OpenInsightMetrologyViewerAttachments();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08RESIMAPCDE__APC() => _MET08RESIMAPCDE.Staging__v2_47_1__MET08RESIMAPCDE__APC();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08RESIMAPCDE__SPaCe() => _MET08RESIMAPCDE.Staging__v2_47_1__MET08RESIMAPCDE__SPaCe();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08RESIMAPCDE__Processed() => _MET08RESIMAPCDE.Staging__v2_47_1__MET08RESIMAPCDE__Processed();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
public void Staging__v2_47_1__MET08RESIMAPCDE__Archive() => _MET08RESIMAPCDE.Staging__v2_47_1__MET08RESIMAPCDE__Archive();
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
|
@ -45,7 +45,7 @@ public class MET08RESIMAPCDE : LoggingUnitTesting, IDisposable
|
||||
Assert.IsTrue(dateTime.ToString("M/d/yyyy h:mm:ss tt") == dateTime.ToString());
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
|
@ -138,7 +138,7 @@ public class RsM : LoggingUnitTesting, IDisposable
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
@ -151,11 +151,11 @@ public class RsM : LoggingUnitTesting, IDisposable
|
||||
new("CDE3", "v2.47.0"),
|
||||
new("CDE4", "v2.47.0"),
|
||||
new("CDE5", "v2.47.0"),
|
||||
new("CDE6", "v2.47.0"),
|
||||
new("CDE6", "v2.47.2"),
|
||||
new("CDE3-EQPT", "v2.47.0"),
|
||||
new("CDE4-EQPT", "v2.47.0"),
|
||||
new("CDE5-EQPT", "v2.47.0"),
|
||||
new("CDE6-EQPT", "v2.47.0"),
|
||||
new("CDE6-EQPT", "v2.47.2"),
|
||||
};
|
||||
string staging = "http://mestsa07ec.ec.local:9003/CellInstanceServiceV2";
|
||||
Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion;
|
||||
|
@ -131,7 +131,7 @@ public class TXT : LoggingUnitTesting, IDisposable
|
||||
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
|
||||
}
|
||||
|
||||
#if true
|
||||
#if DEBUG
|
||||
[Ignore]
|
||||
#endif
|
||||
[TestMethod]
|
||||
|
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 = 'MET08RESIMAPCDE'
|
||||
@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()
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user