This commit is contained in:
Rui Marinho 2019-03-25 11:05:22 +00:00
Родитель 9beea57fb2
Коммит 627695f95c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 924E81B5DB553385
6 изменённых файлов: 67 добавлений и 42 удалений

Просмотреть файл

@ -1,12 +1,14 @@
variables:
- name: BuildConfiguration
- name: DefaultBuildConfiguration
value: Debug
- name: BuildPlatform
- name: DefaultBuildPlatform
value: 'any cpu'
- name: XamarinFormsPackageVersion
value: ''
- name: Suffix
value: ''
- name: ApkName
value: AndroidControlGallery.AndroidControlGallery.apk
- name: IpaName
value: XamarinFormsControlGalleryiOS.ipa
- name: SolutionFile
value: Xamarin.Forms.sln
- name: major
value: 3
- name: minor
@ -15,9 +17,6 @@ variables:
value: 0
- name: buildversion
value: $[counter('$(Build.SourceBranchName)_counter', 1)]
- group: Xamarin.Forms
- group: XQA Secrets
- group: xamops-azdev-secrets
resources:
repositories:
@ -30,17 +29,16 @@ trigger:
branches:
include:
- master
- 3.3.0
- 3.4.0
- 3.5.0
- 3.*
- 4.*
paths:
exclude:
- README.md
pr:
- master
- 3.4.0
- 3.5.0
- 3.*
- 4.*
jobs:
- job: Phase_1
@ -61,11 +59,11 @@ jobs:
strategy:
matrix:
debug:
BuildConfiguration: 'Debug'
BuildPlatform: 'any cpu'
BuildConfiguration: $(DefaultBuildConfiguration)
BuildPlatform: $(DefaultBuildPlatform)
release:
BuildConfiguration: 'Release'
BuildPlatform: 'any cpu'
BuildPlatform: $(DefaultBuildPlatform)
steps:
- template: build/steps/build-windows.yml
@ -79,7 +77,7 @@ jobs:
strategy:
matrix:
debug:
BuildConfiguration: 'Debug'
BuildConfiguration: $(DefaultBuildConfiguration)
release:
BuildConfiguration: 'Release'
steps:
@ -93,6 +91,7 @@ jobs:
targetFolder: Xamarin.Forms.ControlGallery.Android/legacyRenderers/
androidProjectArguments: '/t:"Rebuild;SignAndroidPackage"'
dependsOn: Phase_1
buildConfiguration: $(DefaultBuildConfiguration)
- template: build/steps/build-android.yml
parameters:
@ -102,6 +101,7 @@ jobs:
targetFolder: Xamarin.Forms.ControlGallery.Android/preAppCompat
androidProjectArguments: '/t:"Rebuild;SignAndroidPackage" /p:DefineConstants="TRACE DEBUG FORMS_APPLICATION_ACTIVITY APP"'
dependsOn: Phase_1
buildConfiguration: $(DefaultBuildConfiguration)
- template: build/steps/build-android.yml
parameters:
@ -111,6 +111,7 @@ jobs:
targetFolder: Xamarin.Forms.ControlGallery.Android/newRenderers/
androidProjectArguments: '/t:"Rebuild;SignAndroidPackage" /p:DefineConstants="TRACE DEBUG TEST_EXPERIMENTAL_RENDERERS APP"'
dependsOn: Phase_1
buildConfiguration: $(DefaultBuildConfiguration)
- job: Phase_4
displayName: OSX Phase
@ -127,6 +128,9 @@ jobs:
provisioningOSX : $(provisioning)
provisionator.osxPath : 'build/provisioning/provisioning.csx'
provisionator.signPath : 'build/provisioning/provisioning_sign.csx'
buildConfiguration: $(DefaultBuildConfiguration)
slnPath: $(SolutionFile)
nugetVersion: 4.8.1
steps:
- template: build/steps/build-osx.yml
@ -143,17 +147,18 @@ jobs:
demands: DotNetFramework
variables:
FormsIdAppend: ''
buildConfiguration: $(DefaultBuildConfiguration)
steps:
- template: build/steps/build-nuget.yml
- job: Phase_6
displayName: Sign Phase
dependsOn: Phase_5
condition: and(succeeded(), eq(dependencies.Phase_1.outputs['prepare.sign'], 'true'))
pool:
name: VSEng-Xamarin-Forms
variables:
sign: $[dependencies.Phase_1.outputs['prepare.sign']]
signBuild: $[dependencies.Phase_1.outputs['prepare.signnuget']]
displayName: Sign Phase
steps:
- template: build/steps/build-sign.yml

Просмотреть файл

@ -11,6 +11,9 @@ parameters:
androidPath : 'Xamarin.Forms.ControlGallery.Android'
androidProjectPath : 'Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj'
androidProjectArguments : ''
buildConfiguration : 'Debug'
nugetVersion: 4.8.1
apkTargetFolder: '$(build.artifactstagingdirectory)/androidApp'
jobs:
- job: ${{ parameters.name }}
@ -23,13 +26,13 @@ jobs:
- checkout: self
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 4.8.1'
displayName: 'Use NuGet ${{ parameters.nugetVersion }}'
inputs:
versionSpec: 4.8.1
versionSpec: ${{ parameters.nugetVersion }}
checkLatest: true
- task: NuGetCommand@2
displayName: 'NuGet restore'
displayName: 'NuGet restore ${{ parameters.slnPath }}'
inputs:
restoreSolution: ${{ parameters.slnPath }}
@ -42,7 +45,7 @@ jobs:
displayName: 'Build Android ${{ parameters.name }}'
inputs:
solution: ${{ parameters.androidProjectPath }}
configuration: '$(BuildConfiguration)'
configuration: ${{ parameters.buildConfiguration }}
msbuildArguments: ${{ parameters.androidProjectArguments }}
- task: CopyFiles@2
@ -55,9 +58,9 @@ jobs:
OverWrite: true
- task: CopyFiles@2
displayName: 'Copy Android apk''s for UITest'
displayName: 'Copy Android apk ${{ parameters.name }} for UITest'
inputs:
Contents: |
$ {{ parameters.targetFolder }}/$(ApkName)
TargetFolder: '$(build.artifactstagingdirectory)/androidApp'
${{ parameters.targetFolder }}/$(ApkName)
TargetFolder: ${{ parameters.apkTargetFolder }}
CleanTargetFolder: true

Просмотреть файл

@ -23,13 +23,21 @@ steps:
- powershell: |
$formsNugetVersion = $env:major + "." + $env:minor + "." + $env:patch + "." + $env:buildversion
if($env:SUFFIX)
$preXamForms = $env:XAMARINFORMSPACKAGEVERSION
$prefix = $env:SUFFIX
Write-Host("Pre FormsVersion = $preXamForms $prefix")
if(!$preXamForms)
{
$formsNugetVersion = $formsNugetVersion +"-"+$env:SUFFIX
$formsNugetVersion = $env:major + "." + $env:minor + "." + $env:patch + "." + $env:buildversion
if(!$prefix)
{
$formsNugetVersion = $formsNugetVersion +"-"+$prefix
}
Write-Host("FormsVersion = $formsNugetVersion")
Write-Host("##{0}[task.setvariable variable=XamarinFormsPackageVersion]{1}" -f "vso",$formsNugetVersion.ToString() )
}
failOnStderr: true
displayName: 'Set Nuget version'
@ -43,6 +51,7 @@ steps:
versioningScheme: byEnvVar
versionEnvVar: XamarinFormsPackageVersion
buildProperties: 'IdAppend=$(FormsIdAppend)'
configuration: $(buildConfiguration)
- task: NuGetCommand@2

Просмотреть файл

@ -26,16 +26,15 @@ steps:
provisioning_extra_args: $(provisionator.extraArguments)
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 4.8.1'
displayName: 'Use NuGet $(nugetVersion)'
inputs:
versionSpec: 4.8.1
versionSpec: $(nugetVersion)
checkLatest: true
- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
restoreSolution: Xamarin.Forms.sln
restoreSolution: $(slnPath)
- task: MSBuild@1
@ -45,10 +44,10 @@ steps:
- task: XamariniOS@2
displayName: 'Build Xamarin.iOS solution Xamarin.Forms.sln'
displayName: 'Build Xamarin.iOS solution $(slnPath)'
inputs:
solutionFile: Xamarin.Forms.sln
configuration: '$(BuildConfiguration)'
solutionFile: $(slnPath)
configuration: $(buildConfiguration)
- task: CopyFiles@2

Просмотреть файл

@ -95,8 +95,6 @@ steps:
Write-Host "Sign: $sign"
$publicTags = $tags -join ';'
Write-Host "##vso[task.setvariable variable=publictags;isOutput=true;]$publicTags"
Write-Host "##vso[task.setvariable variable=sign;isOutput=true]$sign"
Write-Host "##vso[task.setvariable variable=signnuget;isOutput=true;]$sign"
displayName: 'Tag and name build'
name: prepare

Просмотреть файл

@ -1,3 +1,13 @@
parameters:
name: '' # in the form type_platform_host
displayName: '' # the human name
vmImage: '' # the VM image
targetFolder: '' # the bootstrapper target
dependsOn: [] # the dependiencies
preBuildSteps: [] # any steps to run before the build
postBuildSteps: [] # any additional steps to run after the build
signBuild: false
steps:
- template: sign-artifacts.yml@xamarin-templates
parameters:
@ -5,6 +15,7 @@ steps:
sourceRepo: 'xamarin/xamarin.forms'
jenkinsEndpoint: Xamarin Code Signing Jenkins
jenkinsJob: sign-from-vsts
artifactHost: 'https://dl.internalx.com/vsts-devdiv'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: nuget signed'