Multiple Stages
IFX Nuget IIS Development and Windows Service plus IIS Flop logic on conditional compile
This commit is contained in:
parent
66f38fcf33
commit
72b648589e
@ -44,7 +44,7 @@ public class UnitTestInfinityQSController
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -59,7 +59,7 @@ public class UnitTestInfinityQSController
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -74,7 +74,7 @@ public class UnitTestInfinityQSController
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -95,7 +95,7 @@ public class UnitTestInfinityQSController
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -112,7 +112,7 @@ public class UnitTestInfinityQSController
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -130,7 +130,7 @@ public class UnitTestInfinityQSController
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -147,7 +147,7 @@ public class UnitTestInfinityQSController
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -162,7 +162,7 @@ public class UnitTestInfinityQSController
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -178,7 +178,7 @@ public class UnitTestInfinityQSController
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -193,7 +193,7 @@ public class UnitTestInfinityQSController
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
|
@ -56,7 +56,7 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -71,7 +71,7 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -92,7 +92,7 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -109,7 +109,7 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -127,7 +127,7 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -144,7 +144,7 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -159,7 +159,7 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -175,7 +175,7 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@ -190,7 +190,7 @@ public class UnitTestInfinityQSV2Controller
|
|||||||
NonThrowTryCatch();
|
NonThrowTryCatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !DEBUG
|
#if DEBUG
|
||||||
[Ignore]
|
[Ignore]
|
||||||
#endif
|
#endif
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
|
@ -15,7 +15,7 @@ trigger:
|
|||||||
- "ClientHub/*"
|
- "ClientHub/*"
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
name: Mesa-Windows-Service
|
name: Mesa-IIS
|
||||||
demands: OI-Metrology-Server-Development
|
demands: OI-Metrology-Server-Development
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
@ -25,13 +25,6 @@ variables:
|
|||||||
ASPNETCORE_ENVIRONMENT: "Development"
|
ASPNETCORE_ENVIRONMENT: "Development"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
|
||||||
set exeName=OI.Metrology.Server
|
|
||||||
echo %exeName%
|
|
||||||
echo ##vso[task.setvariable variable=ExeName;]%exeName%
|
|
||||||
echo $(ExeName)
|
|
||||||
displayName: ExeName
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set coreVersion=net7.0
|
set coreVersion=net7.0
|
||||||
echo %coreVersion%
|
echo %coreVersion%
|
||||||
@ -43,7 +36,7 @@ steps:
|
|||||||
set configuration=Debug
|
set configuration=Debug
|
||||||
echo %configuration%
|
echo %configuration%
|
||||||
echo ##vso[task.setvariable variable=Configuration;]%configuration%
|
echo ##vso[task.setvariable variable=Configuration;]%configuration%
|
||||||
echo $(Configuration)
|
echo ($Configuration)
|
||||||
displayName: Configuration
|
displayName: Configuration
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
@ -61,32 +54,16 @@ steps:
|
|||||||
echo $(GitCommitSeven)
|
echo $(GitCommitSeven)
|
||||||
displayName: 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: |
|
- script: |
|
||||||
echo $(Build.BuildId)
|
echo $(Build.BuildId)
|
||||||
echo $(Build.Reason)
|
echo $(Build.Reason)
|
||||||
echo $(Build.Repository.Id)
|
echo $(Build.Repository.Id)
|
||||||
echo $(Build.Repository.Name)
|
echo $(Build.Repository.Name)
|
||||||
echo $(Build.SourceVersion)
|
echo $(Build.SourceVersion)
|
||||||
echo $(Configuration)
|
|
||||||
echo $(CoreVersion)
|
echo $(CoreVersion)
|
||||||
echo $(GitCommitSeven)
|
echo $(Configuration)
|
||||||
echo $(NugetSource)
|
echo $(NugetSource)
|
||||||
echo $(PwEncoding)
|
echo $(GitCommitSeven)
|
||||||
echo $(UUId)
|
|
||||||
REM echo $(pipelinePassword)
|
REM echo $(pipelinePassword)
|
||||||
displayName: "Echo Check"
|
displayName: "Echo Check"
|
||||||
|
|
||||||
@ -102,21 +79,6 @@ steps:
|
|||||||
workingDirectory: Server
|
workingDirectory: Server
|
||||||
displayName: "Safe storage of app secrets - 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)'
|
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
||||||
workingDirectory: Server
|
workingDirectory: Server
|
||||||
displayName: "Core Build - Server"
|
displayName: "Core Build - Server"
|
||||||
@ -169,53 +131,6 @@ steps:
|
|||||||
workingDirectory: Server
|
workingDirectory: Server
|
||||||
displayName: "Core Publish"
|
displayName: "Core Publish"
|
||||||
|
|
||||||
- script: 'sc stop "$(Build.Repository.Name)-$(Configuration)"'
|
|
||||||
workingDirectory: Server
|
|
||||||
displayName: "Service Control - Stop"
|
|
||||||
continueOnError: true
|
|
||||||
|
|
||||||
- script: 'sc delete "$(Build.Repository.Name)-$(Configuration)"'
|
|
||||||
workingDirectory: Server
|
|
||||||
displayName: "Service Control - Delete"
|
|
||||||
continueOnError: true
|
|
||||||
|
|
||||||
- task: DownloadSecureFile@1
|
|
||||||
name: downloadSecureFileKDBX
|
|
||||||
displayName: "Download secure file"
|
|
||||||
inputs:
|
|
||||||
secureFile: "Infineon-NA.kdbx"
|
|
||||||
|
|
||||||
- script: echo "<$(downloadSecureFileKDBX.secureFilePath)>"
|
|
||||||
displayName: "Echo Path"
|
|
||||||
|
|
||||||
- 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 "$(Build.Repository.Name)-$(Configuration)" start= delayed-auto DisplayName= "$(Build.Repository.Name)-$(Configuration)-$(GitCommitSeven)-$(Build.BuildId)" binPath= D:\$(CoreVersion)\$(Build.Repository.Name)\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)\Server\$(ExeName).exe obj= INFINEON\$(USERNAME) password="$(pipelinePassword)"'
|
|
||||||
workingDirectory: Server
|
|
||||||
displayName: "Service Control - Create"
|
|
||||||
|
|
||||||
- script: 'sc start "$(Build.Repository.Name)-$(Configuration)"'
|
|
||||||
workingDirectory: Server
|
|
||||||
displayName: "Service Control - Start"
|
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
- task: PublishBuildArtifacts@1
|
||||||
displayName: "Publish Artifact: drop"
|
displayName: "Publish Artifact: drop"
|
||||||
enabled: false
|
enabled: false
|
||||||
@ -227,6 +142,3 @@ steps:
|
|||||||
- script: '"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)'
|
- script: '"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)'
|
||||||
workingDirectory: Server
|
workingDirectory: Server
|
||||||
displayName: "Core Clean - Server"
|
displayName: "Core Clean - Server"
|
||||||
|
|
||||||
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
|
|
||||||
displayName: "Force Fail"
|
|
||||||
|
@ -14,131 +14,365 @@ trigger:
|
|||||||
- "Client/*"
|
- "Client/*"
|
||||||
- "ClientHub/*"
|
- "ClientHub/*"
|
||||||
|
|
||||||
pool:
|
|
||||||
name: Mesa-IIS
|
|
||||||
demands: OI-Metrology-Server
|
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
# solution: '**/*.sln'
|
# solution: '**/*.sln'
|
||||||
# buildPlatform: 'Any CPU'
|
# buildPlatform: 'Any CPU'
|
||||||
buildConfiguration: "Release"
|
buildConfiguration: "Release"
|
||||||
ASPNETCORE_ENVIRONMENT: "Production"
|
ASPNETCORE_ENVIRONMENT: "Production"
|
||||||
|
|
||||||
steps:
|
stages:
|
||||||
- script: |
|
- stage: IFX
|
||||||
set coreVersion=net7.0
|
|
||||||
echo %coreVersion%
|
|
||||||
echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
|
|
||||||
echo $(CoreVersion)
|
|
||||||
displayName: CoreVersion
|
|
||||||
|
|
||||||
- script: |
|
pool:
|
||||||
set configuration=Release
|
name: Mesa-Windows-Service
|
||||||
echo %configuration%
|
demands: OI-Metrology-Server-IFX
|
||||||
echo ##vso[task.setvariable variable=Configuration;]%configuration%
|
|
||||||
echo ($Configuration)
|
|
||||||
displayName: Configuration
|
|
||||||
|
|
||||||
- script: |
|
jobs:
|
||||||
set nugetSource=https://messa08ec.ec.local/v3/index.json
|
- job: IFX
|
||||||
echo %nugetSource%
|
steps:
|
||||||
echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
|
- script: |
|
||||||
echo $(NugetSource)
|
set exeName=OI.Metrology.Server
|
||||||
displayName: NugetSource
|
echo %exeName%
|
||||||
|
echo ##vso[task.setvariable variable=ExeName;]%exeName%
|
||||||
|
echo $(ExeName)
|
||||||
|
displayName: ExeName
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set gitCommit=$(Build.SourceVersion)
|
set coreVersion=net7.0
|
||||||
set gitCommitSeven=%gitCommit:~0,7%
|
echo %coreVersion%
|
||||||
echo %gitCommitSeven%
|
echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
|
||||||
echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
|
echo $(CoreVersion)
|
||||||
echo $(GitCommitSeven)
|
displayName: CoreVersion
|
||||||
displayName: GitCommitSeven
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
echo $(Build.BuildId)
|
set configuration=Debug
|
||||||
echo $(Build.Reason)
|
echo %configuration%
|
||||||
echo $(Build.Repository.Id)
|
echo ##vso[task.setvariable variable=Configuration;]%configuration%
|
||||||
echo $(Build.Repository.Name)
|
echo $(Configuration)
|
||||||
echo $(Build.SourceVersion)
|
displayName: Configuration
|
||||||
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'
|
- script: |
|
||||||
displayName: "Nuget Clear"
|
set nugetSource=https://messa017.infineon.com/v3/index.json
|
||||||
enabled: false
|
echo %nugetSource%
|
||||||
|
echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
|
||||||
|
echo $(NugetSource)
|
||||||
|
displayName: NugetSource
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets init
|
set gitCommit=$(Build.SourceVersion)
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
|
set gitCommitSeven=%gitCommit:~0,7%
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets set "GitCommitSeven" "$(GitCommitSeven)"
|
echo %gitCommitSeven%
|
||||||
"C:\program files\dotnet\dotnet.exe" user-secrets list
|
echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
|
||||||
workingDirectory: Server
|
echo $(GitCommitSeven)
|
||||||
displayName: "Safe storage of app secrets - Server"
|
displayName: GitCommitSeven
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
- script: |
|
||||||
workingDirectory: Server
|
set uuId=A6302662940458499454E35D28FCC9F7
|
||||||
displayName: "Core Build - Server"
|
echo %uuId%
|
||||||
|
echo ##vso[task.setvariable variable=UUId;]%uuId%
|
||||||
|
echo $(UUId)
|
||||||
|
displayName: UUId
|
||||||
|
|
||||||
- powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
|
- script: |
|
||||||
workingDirectory: "$(System.DefaultWorkingDirectory)/.vscode"
|
set pwEncoding=AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAtBhT01pNnUGaN/uPLxZGvAAAAAACAAAAAAADZgAAwAAAABAAAAAM4xlYguhv7jzchU8dq9pVAAAAAASAAACgAAAAEAAAANS9rIoaYfNq5TwCmTrqElsgAAAA7O4J52FqCctXlCxYB2J5b/W4T+pZCN2zwFj7XCAFW6IUAAAAhQsBDOERAUZJdtSy8AfxwOAZflo=
|
||||||
displayName: "PowerShell Script"
|
echo %pwEncoding%
|
||||||
|
echo ##vso[task.setvariable variable=PwEncoding;]%pwEncoding%
|
||||||
|
echo $(PwEncoding)
|
||||||
|
displayName: PwEncoding
|
||||||
|
|
||||||
- script: "dotnet test --configuration $(Configuration)"
|
- script: |
|
||||||
workingDirectory: Tests
|
echo $(Build.BuildId)
|
||||||
displayName: "Core Test"
|
echo $(Build.Reason)
|
||||||
# enabled: false
|
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" tool restore'
|
- script: '"C:\program files\dotnet\dotnet.exe" nuget locals all --clear'
|
||||||
workingDirectory: Server
|
displayName: "Nuget Clear"
|
||||||
displayName: "Tool Restore"
|
enabled: false
|
||||||
enabled: false
|
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" ReportGenerator -reports:.vscode/TestResults/*/coverage.cobertura.xml -targetDir:$(Build.ArtifactStagingDirectory)\Coverage -reportTypes:Html_Dark'
|
- script: |
|
||||||
workingDirectory: Server
|
"C:\program files\dotnet\dotnet.exe" user-secrets init
|
||||||
displayName: "Report Generator"
|
"C:\program files\dotnet\dotnet.exe" user-secrets set "BuildNumber" "$(Build.BuildId)"
|
||||||
enabled: false
|
"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"
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- script: |
|
||||||
displayName: "Publish Test Results **/*.trx"
|
"C:\program files\dotnet\dotnet.exe" user-secrets set "IsDevelopment" true
|
||||||
inputs:
|
"C:\program files\dotnet\dotnet.exe" user-secrets set "MockRoot" "/Data/Tests"
|
||||||
testResultsFormat: VSTest
|
"C:\program files\dotnet\dotnet.exe" user-secrets set "URLs" "http://localhost:5002;"
|
||||||
testResultsFiles: "**/*.trx"
|
"C:\program files\dotnet\dotnet.exe" user-secrets set "MonAResource" "OI_Metrology_Viewer_IFX"
|
||||||
testRunTitle: "$(GitCommitSeven)-$(Build.BuildId)-$(CoreVersion)-$(Configuration)-$(Build.Repository.Name)"
|
"C:\program files\dotnet\dotnet.exe" user-secrets set "ApiExportPath" "\\messdv002.na.infineon.com\Candela\Archive\API"
|
||||||
searchFolder: "$(System.DefaultWorkingDirectory)/.vscode"
|
"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"
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
||||||
displayName: "Publish Test Results **/coverage.cobertura.xml"
|
workingDirectory: Tests
|
||||||
inputs:
|
displayName: "Core Build - Tests"
|
||||||
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
|
- script: '"C:\program files\dotnet\dotnet.exe" build --configuration $(Configuration) --source $(NugetSource)'
|
||||||
displayName: "Create work item"
|
workingDirectory: Server
|
||||||
inputs:
|
displayName: "Core Build - Server"
|
||||||
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)'
|
- powershell: Get-ChildItem .\ -include TestResults -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
|
||||||
workingDirectory: Server
|
workingDirectory: "$(System.DefaultWorkingDirectory)/.vscode"
|
||||||
displayName: "Core Publish"
|
displayName: "PowerShell Script"
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
- script: "dotnet test --configuration $(Configuration)"
|
||||||
displayName: "Publish Artifact: drop"
|
workingDirectory: Tests
|
||||||
enabled: false
|
displayName: "Core Test"
|
||||||
|
enabled: false
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)'
|
- script: '"C:\program files\dotnet\dotnet.exe" tool restore'
|
||||||
workingDirectory: Tests
|
workingDirectory: Server
|
||||||
displayName: "Core Clean - Tests"
|
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: src/BaGet
|
||||||
|
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 "$(Build.Repository.Name)-$(Configuration)" start= delayed-auto DisplayName= "$(Build.Repository.Name)-$(Configuration)-$(GitCommitSeven)-$(Build.BuildId)" binPath= D:\$(CoreVersion)\$(Build.Repository.Name)\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)\Server\$(ExeName).exe obj= INFINEON\$(USERNAME) password="$(pipelinePassword)"'
|
||||||
|
workingDirectory: Server
|
||||||
|
displayName: "Service Control - Create"
|
||||||
|
continueOnError: true
|
||||||
|
|
||||||
|
- script: 'sc configure "$(ExeName)-$(Configuration)" DisplayName= "$(Build.Repository.Name)-$(Configuration)-$(GitCommitSeven)-$(Build.BuildId)"'
|
||||||
|
displayName: "Service Control - Configure"
|
||||||
|
|
||||||
|
- script: 'sc stop "$(ExeName)-$(Configuration)"'
|
||||||
|
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)-$(Configuration)"'
|
||||||
|
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: Mesa-IIS
|
||||||
|
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://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: Server
|
||||||
|
displayName: "Safe storage of app secrets - Server"
|
||||||
|
|
||||||
|
- 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"
|
||||||
|
|
||||||
- script: '"C:\program files\dotnet\dotnet.exe" clean --configuration $(Configuration)'
|
|
||||||
workingDirectory: Server
|
|
||||||
displayName: "Core Clean - Server"
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user