Skip to content

Instantly share code, notes, and snippets.

Created November 26, 2017 05:11
Show Gist options
  • Save anonymous/5a353da0340f7dabae1647825e226a46 to your computer and use it in GitHub Desktop.
Save anonymous/5a353da0340f7dabae1647825e226a46 to your computer and use it in GitHub Desktop.
YAML Build Definition
steps:
# Restore NuGet packages
- task: DotNetCoreCLI@2
displayName: Restore NuGet Packages
inputs:
command: restore
projects: src
# Compile
- task: DotNetCoreCLI@2
displayName: Compile
inputs:
command: build
projects: src
# Run unit tests
- task: DotNetCoreCLI@2
displayName: Run Unit Tests
inputs:
command: test
projects: src/BuildYaml.Tests
# Prepare publish files
- task: DotNetCoreCLI@2
displayName: Prepare Publish Files
inputs:
command: publish
projects: src/BuildYaml
arguments: --output $(Build.ArtifactStagingDirectory)
# Publish the artifacts
- task: PublishBuildArtifacts@1
displayName: Publish Artifacts
inputs:
pathToPublish: $(Build.ArtifactStagingDirectory)
artifactName: deploy
artifactType: container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment