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

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

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

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

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

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

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

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

@ -95,8 +95,6 @@ steps:
Write-Host "Sign: $sign" Write-Host "Sign: $sign"
$publicTags = $tags -join ';' $publicTags = $tags -join ';'
Write-Host "##vso[task.setvariable variable=publictags;isOutput=true;]$publicTags" 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' displayName: 'Tag and name build'
name: prepare 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: steps:
- template: sign-artifacts.yml@xamarin-templates - template: sign-artifacts.yml@xamarin-templates
parameters: parameters:
@ -5,6 +15,7 @@ steps:
sourceRepo: 'xamarin/xamarin.forms' sourceRepo: 'xamarin/xamarin.forms'
jenkinsEndpoint: Xamarin Code Signing Jenkins jenkinsEndpoint: Xamarin Code Signing Jenkins
jenkinsJob: sign-from-vsts jenkinsJob: sign-from-vsts
artifactHost: 'https://dl.internalx.com/vsts-devdiv'
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: nuget signed' displayName: 'Publish Artifact: nuget signed'