Remove GetEngineeringSpcReview Better error message EnforceCodeStyleInBuild NginxFileSystem Remove Reactors and Working Directory AppSettings Delete self contained Thunder Tests Back to .net8.0 api/v4/InfinityQS ApiExplorerSettings Wafer Counter
433 lines
20 KiB
YAML
433 lines
20 KiB
YAML
trigger:
|
|
branches:
|
|
include:
|
|
- red-hat
|
|
paths:
|
|
include:
|
|
- "Server/*"
|
|
- "Shared/*"
|
|
- "Tests/*"
|
|
exclude:
|
|
- "**/*.yaml"
|
|
- "**/*.yml"
|
|
- "Archive/*"
|
|
- "Client/*"
|
|
- "ClientHub/*"
|
|
variables:
|
|
coreVersion: "net6.0"
|
|
|
|
stages:
|
|
# - stage: IFX
|
|
|
|
# pool:
|
|
# name: eaf
|
|
# demands: OI-Metrology-Server-IFX
|
|
|
|
# jobs:
|
|
# - job: IFX
|
|
# steps:
|
|
# - script: |
|
|
# set exeName=OI.Metrology.Server
|
|
# echo %exeName%
|
|
# echo ##vso[task.setvariable variable=ExeName;]%exeName%
|
|
# echo $(ExeName)
|
|
# displayName: ExeName
|
|
|
|
# - script: |
|
|
# set coreVersion=net7.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://eaf-dev-reporting.mes.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: |
|
|
# set uuId=A6302662940458499454E35D28FCC9F7
|
|
# echo %uuId%
|
|
# echo ##vso[task.setvariable variable=UUId;]%uuId%
|
|
# echo $(UUId)
|
|
# displayName: UUId
|
|
|
|
# - script: |
|
|
# set pwEncoding=AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAtBhT01pNnUGaN/uPLxZGvAAAAAACAAAAAAADZgAAwAAAABAAAAAM4xlYguhv7jzchU8dq9pVAAAAAASAAACgAAAAEAAAANS9rIoaYfNq5TwCmTrqElsgAAAA7O4J52FqCctXlCxYB2J5b/W4T+pZCN2zwFj7XCAFW6IUAAAAhQsBDOERAUZJdtSy8AfxwOAZflo=
|
|
# echo %pwEncoding%
|
|
# echo ##vso[task.setvariable variable=PwEncoding;]%pwEncoding%
|
|
# echo $(PwEncoding)
|
|
# displayName: PwEncoding
|
|
|
|
# - script: |
|
|
# echo $(Build.BuildId)
|
|
# echo $(Build.Reason)
|
|
# echo $(Build.Repository.Id)
|
|
# echo $(Build.Repository.Name)
|
|
# echo $(Build.SourceVersion)
|
|
# echo $(Configuration)
|
|
# echo $(CoreVersion)
|
|
# echo $(GitCommitSeven)
|
|
# echo $(NugetSource)
|
|
# echo $(PwEncoding)
|
|
# echo $(UUId)
|
|
# 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: Server
|
|
# displayName: "Safe storage of app secrets - Server"
|
|
|
|
# - script: |
|
|
# "C:\program files\dotnet\dotnet.exe" user-secrets set "IsDevelopment" true
|
|
# "C:\program files\dotnet\dotnet.exe" user-secrets set "MockRoot" "/Data/Tests"
|
|
# "C:\program files\dotnet\dotnet.exe" user-secrets set "URLs" "http://localhost:5002;"
|
|
# "C:\program files\dotnet\dotnet.exe" user-secrets set "MonAResource" "OI_Metrology_Viewer_IFX"
|
|
# "C:\program files\dotnet\dotnet.exe" user-secrets set "ApiExportPath" "\\messdv002.na.infineon.com\Candela\Archive\API"
|
|
# "C:\program files\dotnet\dotnet.exe" user-secrets set "ConnectionString" "Data Source=MESSAD1001\TEST1,59583;Integrated Security=True;Initial Catalog=Metrology;"
|
|
# "C:\program files\dotnet\dotnet.exe" user-secrets set "Oi2SqlConnectionString" "Data Source=MESSAD1001\TEST1,59583;Initial Catalog=LSL2SQL;Persist Security Info=True;User ID=srpadmin;Password=0okm9ijn;"
|
|
# workingDirectory: Server
|
|
# displayName: "Safe storage of app secrets II - Server"
|
|
|
|
# - script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
|
# workingDirectory: Tests
|
|
# displayName: "Core Build - Tests"
|
|
|
|
# - script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
|
# workingDirectory: Server
|
|
# displayName: "Core Build - Server"
|
|
|
|
# - powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
|
|
# workingDirectory: "$(System.DefaultWorkingDirectory)/.vscode"
|
|
# displayName: "PowerShell Script"
|
|
|
|
# - script: "dotnet test --configuration $(Configuration)"
|
|
# workingDirectory: Tests
|
|
# displayName: "Core Test"
|
|
# enabled: false
|
|
|
|
# - script: '"C:\program files\dotnet\dotnet.exe" tool restore'
|
|
# workingDirectory: Server
|
|
# 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: Server
|
|
# 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)/.vscode"
|
|
|
|
# - task: PublishTestResults@2
|
|
# displayName: "Publish Test Results **/coverage.cobertura.xml"
|
|
# inputs:
|
|
# testResultsFormat: VSTest
|
|
# testResultsFiles: "**/coverage.cobertura.xml"
|
|
# testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
|
|
# searchFolder: "$(System.DefaultWorkingDirectory)/.vscode"
|
|
|
|
# - task: PublishCodeCoverageResults@1
|
|
# inputs:
|
|
# codeCoverageTool: "Cobertura"
|
|
# summaryFileLocation: "$(System.DefaultWorkingDirectory)/.vscode/TestResults/*/coverage.cobertura.xml"
|
|
# enabled: false
|
|
|
|
# - 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 "D:\$(CoreVersion)\$(Build.Repository.Name)\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)\Server" --source $(NugetSource)'
|
|
# workingDirectory: Server
|
|
# displayName: "Core Publish"
|
|
|
|
# - task: DownloadSecureFile@1
|
|
# name: downloadSecureFileKDBX
|
|
# displayName: "Download secure file"
|
|
# inputs:
|
|
# secureFile: "Infineon-NA.kdbx"
|
|
|
|
# - script: echo "<$(downloadSecureFileKDBX.secureFilePath)>"
|
|
# displayName: "Echo Path"
|
|
|
|
# - script: '"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)'
|
|
# workingDirectory: Tests
|
|
# displayName: "Core Clean - Tests"
|
|
# enabled: false
|
|
|
|
# - script: '"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)'
|
|
# workingDirectory: Server
|
|
# displayName: "Core Clean - Server"
|
|
|
|
# - powershell: |
|
|
# $data = @('$(downloadSecureFileKDBX.secureFilePath)', '-c:GetEntryString', '-Field:Password', '-refx-UUID:$(UUId)', '-pw-enc:$(PwEncoding)')
|
|
# $data.count
|
|
# $processStartInfo = New-Object System.Diagnostics.ProcessStartInfo
|
|
# $processStartInfo.FileName = "C:\Users\$(USERNAME)\AppData\Local\IFXApps\KeePass-2.51.1---KPScript-2.51.1\KPScript.exe"
|
|
# $processStartInfo.RedirectStandardError = $true
|
|
# $processStartInfo.RedirectStandardOutput = $true
|
|
# $processStartInfo.UseShellExecute = $false
|
|
# $processStartInfo.Arguments = $data
|
|
# $process = New-Object System.Diagnostics.Process
|
|
# $process.StartInfo = $processStartInfo
|
|
# $process.Start() | Out-Null
|
|
# $process.WaitForExit()
|
|
# $stdout = $process.StandardOutput.ReadToEnd()
|
|
# $stderr = $process.StandardError.ReadToEnd()
|
|
# Write-Host "stderr: $stderr"
|
|
# Write-Host "exit code: " + $process.ExitCode
|
|
# Write-Host "##vso[task.setvariable variable=pipelinePassword;]$stdout"
|
|
# displayName: pipelinePassword
|
|
|
|
# - script: 'sc create "$(ExeName)" start= delayed-auto DisplayName= "$(Build.Repository.Name)-$(Configuration)-$(GitCommitSeven)-$(Build.BuildId)" binPath= D:\$(CoreVersion)\$(Build.Repository.Name)\Server\$(ExeName).exe obj= INFINEON\$(USERNAME) password="$(pipelinePassword)"'
|
|
# workingDirectory: Server
|
|
# displayName: "Service Control - Create"
|
|
# continueOnError: true
|
|
|
|
# - script: 'sc config "$(ExeName)" DisplayName= "$(Build.Repository.Name)-$(Configuration)-$(GitCommitSeven)-$(Build.BuildId)"'
|
|
# displayName: "Service Control - Configure"
|
|
|
|
# - script: 'sc stop "$(ExeName)"'
|
|
# displayName: "Service Control - Stop"
|
|
# continueOnError: true
|
|
|
|
# - script: 'rmdir "D:\$(CoreVersion)\$(Build.Repository.Name)\Server"'
|
|
# displayName: "Remove directory"
|
|
# continueOnError: true
|
|
|
|
# - script: 'mklink /J "D:\$(CoreVersion)\$(Build.Repository.Name)\Server" "D:\$(CoreVersion)\$(Build.Repository.Name)\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)\Server"'
|
|
# displayName: "Link directory"
|
|
# continueOnError: true
|
|
|
|
# - script: 'sc start "$(ExeName)"'
|
|
# displayName: "Service Control - Start"
|
|
|
|
# - task: PublishBuildArtifacts@1
|
|
# displayName: "Publish Artifact: drop"
|
|
# enabled: false
|
|
|
|
# - script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
|
|
# displayName: "Force Fail"
|
|
# enabled: false
|
|
|
|
# - stage: EC
|
|
|
|
# pool:
|
|
# name: open-insight-metrology-viewer
|
|
# demands: OI-Metrology-Server-EC
|
|
|
|
# jobs:
|
|
# - job: EC
|
|
# steps:
|
|
# - script: |
|
|
# set coreVersion=net7.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://eaf-prod.mes.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: Server
|
|
# displayName: "Safe storage of app secrets - Server"
|
|
|
|
# - script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
|
# workingDirectory: Tests
|
|
# displayName: "Core Build - Tests"
|
|
|
|
# - script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
|
# workingDirectory: Server
|
|
# displayName: "Core Build - Server"
|
|
|
|
# - powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
|
|
# workingDirectory: "$(System.DefaultWorkingDirectory)/.vscode"
|
|
# displayName: "PowerShell Script"
|
|
|
|
# - script: "dotnet test --configuration $(Configuration)"
|
|
# workingDirectory: Tests
|
|
# displayName: "Core Test"
|
|
# # enabled: false
|
|
|
|
# - script: '"C:\program files\dotnet\dotnet.exe" tool restore'
|
|
# workingDirectory: Server
|
|
# 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: Server
|
|
# 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)/.vscode"
|
|
|
|
# - task: PublishTestResults@2
|
|
# displayName: "Publish Test Results **/coverage.cobertura.xml"
|
|
# inputs:
|
|
# testResultsFormat: VSTest
|
|
# testResultsFiles: "**/coverage.cobertura.xml"
|
|
# testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
|
|
# searchFolder: "$(System.DefaultWorkingDirectory)/.vscode"
|
|
|
|
# - 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 "D:\$(CoreVersion)\$(Build.Repository.Name)\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)\Server" --source $(NugetSource)'
|
|
# workingDirectory: Server
|
|
# displayName: "Core Publish"
|
|
|
|
# - task: PublishBuildArtifacts@1
|
|
# displayName: "Publish Artifact: drop"
|
|
# 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: Server
|
|
# displayName: "Core Clean - Server"
|
|
|
|
- stage: prod
|
|
displayName: prod
|
|
pool:
|
|
name: open-insight-metrology-viewer
|
|
demands: open-insight-metrology-viewer-prod
|
|
variables:
|
|
# buildConfiguration: "Debug"
|
|
serviceName: "metrologysvc"
|
|
buildConfiguration: "Release"
|
|
# ASPNETCORE_ENVIRONMENT: "Development"
|
|
ASPNETCORE_ENVIRONMENT: "Production"
|
|
# nugetSource: "https://api.nuget.org/v3/index.json"
|
|
nugetSource: "https://eaf-prod.mes.infineon.com/v3/index.json"
|
|
jobs:
|
|
- job: prod
|
|
steps:
|
|
- script: |
|
|
echo $(Build.BuildId)
|
|
echo $(Build.Reason)
|
|
echo $(Build.Repository.Id)
|
|
echo $(Build.Repository.Name)
|
|
echo $(Build.SourceVersion)
|
|
echo $(buildConfiguration)
|
|
echo $(serviceName)
|
|
echo $(ASPNETCORE_ENVIRONMENT)
|
|
echo $(nugetSource)
|
|
echo dotnet /srv/metrologysvc/OI-Metrology/Server/OI.Metrology.Server.dll
|
|
displayName: "Echo Check"
|
|
|
|
- script: "dotnet nuget locals all --clear"
|
|
displayName: "Nuget Clear"
|
|
enabled: false
|
|
|
|
- script: "dotnet build --configuration $(buildConfiguration) --source $(nugetSource)"
|
|
workingDirectory: Server
|
|
displayName: "Core Build - Server"
|
|
|
|
- script: "dotnet publish --configuration $(buildConfiguration) --output /srv/$(serviceName)/$(Build.Repository.Name)-$(Build.SourceVersion)-$(Build.BuildId)-$(buildConfiguration)/Server"
|
|
workingDirectory: Server
|
|
displayName: "Core Publish - Server"
|
|
|
|
- script: "echo cp /srv/$(serviceName)/$(Build.Repository.Name)/Server/secrets.json /srv/$(serviceName)/$(Build.Repository.Name)-$(Build.SourceVersion)-$(Build.BuildId)-$(buildConfiguration)/Server/secrets.json"
|
|
displayName: "Echo Server"
|
|
|
|
- script: "echo unlink /srv/$(serviceName)/$(Build.Repository.Name)/Server"
|
|
displayName: "Echo Unlink Symbolic Link Command"
|
|
|
|
- script: "echo ln -s /srv/$(serviceName)/$(Build.Repository.Name)-$(Build.SourceVersion)-$(Build.BuildId)-$(buildConfiguration)/Server /srv/$(serviceName)/$(Build.Repository.Name)/Server"
|
|
displayName: "Echo Symbolic Link Command"
|
|
|
|
- script: "echo cd /srv/$(serviceName)/$(Build.Repository.Name)/Server"
|
|
displayName: "Echo Server"
|
|
|
|
- script: "dotnet /srv/$(serviceName)/$(Build.Repository.Name)/Server/OI.Metrology.Server.dll"
|
|
displayName: "Core Run - Server" |