git checkout -b feature-branch
This commit is contained in:
92
azure-pipelines-server-development.yml
Normal file
92
azure-pipelines-server-development.yml
Normal file
@ -0,0 +1,92 @@
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- Development
|
||||
paths:
|
||||
include:
|
||||
- "Server/*"
|
||||
- "Shared/*"
|
||||
- "Tests/*"
|
||||
exclude:
|
||||
- "**/*.yaml"
|
||||
- "**/*.yml"
|
||||
- "Archive/*"
|
||||
- "Client/*"
|
||||
|
||||
pool:
|
||||
name: Mesa-IIS
|
||||
demands: OI-Metrology-Server-Development
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
echo $(Build.BuildId)
|
||||
echo $(Build.Reason)
|
||||
echo $(Build.Repository.Id)
|
||||
echo $(Build.Repository.Name)
|
||||
echo $(Build.SourceVersion)
|
||||
set gitCommit=$(Build.SourceVersion)
|
||||
set gitCommitSeven=%gitCommit:~0,7%
|
||||
echo %gitCommitSeven%
|
||||
echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
|
||||
echo $(GitCommitSeven)
|
||||
displayName: Echo
|
||||
|
||||
- script: "echo $(GitCommitSeven)"
|
||||
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 Release --source "https://messa017.infineon.com/v3/index.json"'
|
||||
workingDirectory: Server
|
||||
displayName: "Core Build - Server"
|
||||
|
||||
- script: "dotnet test --configuration Release"
|
||||
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
|
||||
|
||||
- script: '"C:\program files\dotnet\dotnet.exe" publish --configuration Release --runtime win-x64 --self-contained -o $(Build.ArtifactStagingDirectory)\Server --source "https://messa017.infineon.com/v3/index.json"'
|
||||
workingDirectory: Server
|
||||
displayName: "Core Publish"
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: "Copy Files"
|
||||
inputs:
|
||||
SourceFolder: '$(Build.ArtifactStagingDirectory)\Server'
|
||||
TargetFolder: 'D:\net7.0\$(Build.Repository.Name)\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-Release\Server'
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: "Publish Artifact: drop"
|
||||
enabled: false
|
||||
|
||||
- script: |
|
||||
"C:\program files\dotnet\dotnet.exe" clean --configuration Debug
|
||||
"C:\program files\dotnet\dotnet.exe" clean --configuration Release
|
||||
workingDirectory: Tests
|
||||
displayName: "Core Clean - Tests"
|
||||
|
||||
- script: |
|
||||
"C:\program files\dotnet\dotnet.exe" clean --configuration Debug
|
||||
"C:\program files\dotnet\dotnet.exe" clean --configuration Release
|
||||
workingDirectory: Server
|
||||
displayName: "Core Clean - Server"
|
Reference in New Issue
Block a user