Skip to content

Commit

Permalink
Merge pull request #4777 from Microsoft/yaml-build-definition
Browse files Browse the repository at this point in the history
add yaml build definition
  • Loading branch information
brettfo authored Apr 24, 2018
2 parents ca65a51 + 2b2b04b commit cedf9f4
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 2 deletions.
105 changes: 105 additions & 0 deletions .vsts-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
queue:
name: VSEng-MicroBuildVS2017
timeoutInMinutes: 300
demands:
- visualstudio
- DotNetFramework
- msbuild

variables:
MSBuildConfiguration: 'Release'

steps:
# Install Signing Plugin
- task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1
displayName: Install Signing Plugin
inputs:
signType: real
condition: and(succeeded(), in(variables['PB_SignType'], 'test', 'real'))

# Install Swix Plugin
- task: ms-vseng.MicroBuildTasks.32f78468-e895-4f47-962c-58a699361df8.MicroBuildSwixPlugin@1
displayName: Install Swix Plugin

# Run build.cmd
- task: CmdLine@1
displayName: Run build.cmd
inputs:
filename: build.cmd
arguments: microbuild

# Publish nightly package to MyGet
- task: PowerShell@1
displayName: Publish nightly package to MyGet
inputs:
scriptName: 'setup\publish-assets.ps1'
arguments: '-binariesPath $(MSBuildConfiguration) -branchName $(Build.SourceBranch) -apiKey $(FSharp.MyGetApiKey)'
condition: and(succeeded(), contains(variables['PB_PublishType'], 'myget'), in(variables['Build.SourceBranchName'], 'master', 'dev15.7', 'dev15.8'))

# Publish packages to Azure Blob Storage
- task: MSBuild@1
displayName: Publish packages to Azure Blob Storage
inputs:
solution: PublishToBlob.proj
msbuildArguments: '/t:Build /p:ExpectedFeedUrl=$(PB_PublishBlobFeedUrl) /p:AccountKey=$(PB_PublishBlobFeedKey) /p:ManifestBranch=$(SourceBranch) /p:ManifestCommit=$(SourceVersion) /p:ManifestBuildId=$(OfficialBuildId)'
condition: and(succeeded(), contains(variables['PB_PublishType'], 'blob'))

# Run BinSkim
- task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@3
displayName: Run BinSkim
inputs:
arguments: 'analyze "$(MSBuildConfiguration)\*.dll" "$(MSBuildConfiguration)\*.exe" --recurse --output "$(MSBuildConfiguration)\artifacts"'
continueOnError: true

# Create static drop
- task: ms-vseng.MicroBuildTasks.bd4b789e-7292-4b73-a8ee-612d3dd615f1.MicroBuildStaticDrop@1
displayName: Create static drop
inputs:
CopyRoot: '$(MSBuildConfiguration)'
Contents: '**'
ArtifactName: Binaries
TargetPath: '$(DropRoot)\$(Build.DefinitionName)\$(Build.SourceBranchName)\$(Build.BuildNumber)\Binaries'
condition: and(succeeded(), contains(variables['PB_PublishType'], 'drop'))

# Publish symbols
- task: PublishSymbols@1
displayName: Publish symbols
inputs:
SymbolsPath: '$(DropRoot)\$(Build.DefinitionName)\$(Build.SourceBranchName)\$(Build.BuildNumber)\Symbols'
SearchPattern: '**\*.dll;**\*.exe;**\*.pdb'
SymbolsFolder: '$(Build.SourcesDirectory)\$(MSBuildConfiguration)'
TreatNotIndexedAsWarning: true
SymbolsProduct: '$(Build.DefinitionName)'
SymbolsVersion: '$(Build.BuildNumber)'
continueOnError: true
condition: and(succeeded(), contains(variables['PB_PublishType'], 'symbols'))

# Upload VSTS Drop
- task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1
displayName: Upload VSTS Drop
inputs:
DropFolder: '$(Build.SourcesDirectory)\$(MSBuildConfiguration)\insertion'
condition: and(succeeded(), contains(variables['PB_PublishType'], 'vsts'))

# Execute cleanup tasks
- task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1
displayName: Execute cleanup tasks
condition: succeededOrFailed()

# Publish Artifact: MicroBuildOutputs
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: MicroBuildOutputs'
inputs:
PathtoPublish: '$(Build.StagingDirectory)\MicroBuild\Output'
ArtifactName: MicroBuildOutputs
publishLocation: Container
condition: and(succeeded(), contains(variables['PB_PublishType'], 'microbuild'))

# Publish Symbols to Symweb
- task: ms-vscs-artifact.build-tasks.artifactSymbolTask-1.artifactSymbolTask@0
displayName: Publish symbols to SymWeb
inputs:
symbolServiceURI: 'https://microsoft.artifacts.visualstudio.com/DefaultCollection'
sourcePath: '$(DropRoot)\$(Build.DefinitionName)\$(Build.SourceBranchName)\$(Build.BuildNumber)\Symbols'
usePat: false
condition: and(succeeded(), contains(variables['PB_PublishType'], 'symweb'))
2 changes: 1 addition & 1 deletion build/config/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<packages>
<package id="MicroBuild.Core" version="0.2.0" />
<package id="MicroBuild.Core.Sentinel" version="1.0.0" />
<package id="RoslynTools.SignTool" version="1.0.0-beta-62328-01" />
<package id="RoslynTools.SignTool" version="1.0.0-beta2-dev3" />
</packages>
2 changes: 1 addition & 1 deletion build/scripts/run-signtool.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if not defined ConfigFile echo Configuration file not specified. && goto error
if not exist "%MSBuild%" echo The specified MSBuild.exe does not exist. && goto error

set NUGET_PACKAGES=%USERPROFILE%\.nuget\packages
set _signtoolexe=%NUGET_PACKAGES%\RoslynTools.SignTool\1.0.0-beta-62328-01\tools\SignTool.exe
set _signtoolexe=%NUGET_PACKAGES%\RoslynTools.SignTool\1.0.0-beta2-dev3\tools\SignTool.exe
set SignToolArgs=-msbuildPath %MSBuild% -config "%ConfigFile%" -nugetPackagesPath "%NUGET_PACKAGES%"
if /i "%SignType%" == "real" goto runsigntool
if /i "%SignType%" == "test" set SignToolArgs=%SignToolArgs% -testSign && goto runsigntool
Expand Down

0 comments on commit cedf9f4

Please sign in to comment.