Skip to content

Commit

Permalink
Update azure-pipelines.yml for Azure Pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
brminnick committed Jun 9, 2019
1 parent ecd54ed commit 9806004
Showing 1 changed file with 72 additions and 17 deletions.
89 changes: 72 additions & 17 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,82 @@
# Xamarin.Android
# Build a Xamarin.Android project.
# Add steps that test, sign, and distribute an app, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/xamarin

trigger:
- master

pool:
vmImage: 'macos-latest'
name: Hosted VS2017
demands:
- msbuild
- visualstudio
- MSBuild
- Xamarin.Android
- vstest

variables:
buildConfiguration: 'Release'
outputDirectory: '$(build.binariesDirectory)/$(buildConfiguration)'
#Your build pipeline references an undefined variable named ‘Parameters.solution’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
#Your build pipeline references an undefined variable named ‘Parameters.solution’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
#Your build pipeline references the ‘BuildPlatform’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘BuildPlatform’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references a secret variable named ‘AppCenterApiToken’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it secret. See https://go.microsoft.com/fwlink/?linkid=865972
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971

steps:
- task: NuGetToolInstaller@0
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
inputs:
versionSpec: 4.4.1

- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
restoreSolution: '$(Parameters.solution)'

- task: VSBuild@1
displayName: 'Build solution **\*.sln'
inputs:
restoreSolution: '**/*.sln'
solution: '$(Parameters.solution)'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'

- task: XamarinAndroid@1
displayName: 'Build Xamarin.Android project '
inputs:
projectFile: '**/*Droid.csproj'
configuration: '$(BuildConfiguration)'
msbuildVersionOption: latest

- task: VSTest@2
displayName: 'Run Unit Tests'
inputs:
testAssemblyVer2: '**\bin\**\*UnitTests.dll'
searchFolder: '$(Build.SourcesDirectory)'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'

- task: Bash@3
displayName: 'Submit APK to App Center Test'
inputs:
targetType: filePath
filePath: './$(Build.SourcesDirectory)/Src/SubmitApkToAppCenterTest.sh'
arguments: '$(AppCenterApiToken)'
failOnStderr: true
env:
BuildPath: $(Build.Repository.LocalPath)
NuGetPackagesPath: $(UserProfile)\.nuget\packages

- task: PublishSymbols@2
displayName: 'Publish symbols path'
inputs:
SearchPattern: '**\bin\**\*.pdb'
PublishSymbols: false
continueOnError: true

- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: '**\bin\$(BuildConfiguration)\**'
TargetFolder: '$(build.artifactstagingdirectory)'

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
projectFile: '**/*droid*.csproj'
outputDirectory: '$(outputDirectory)'
configuration: '$(buildConfiguration)'
PathtoPublish: '$(build.artifactstagingdirectory)'

0 comments on commit 9806004

Please sign in to comment.