|  | 
|  | 1 | +trigger: | 
|  | 2 | + - master | 
|  | 3 | + - refs/tags/* | 
| 1 | 4 | 
 | 
| 2 | 5 | variables: | 
| 3 |  | - MONO_VERSION: 5_16_0 | 
| 4 |  | - XCODE_VERSION: 10.1 | 
| 5 |  | - VERBOSITY: minimal | 
|  | 6 | +# XAMARIN_ANDROID_PATH: <path to Xamarin.Android> | 
|  | 7 | +# MONO_API_INFO_XML_URL: <url to api-info.xml> | 
| 6 | 8 | 
 | 
| 7 | 9 | resources: | 
| 8 | 10 |  repositories: | 
| 9 |  | - - repository: xamarin-templates | 
|  | 11 | + - repository: internal-templates | 
| 10 | 12 |  type: github | 
| 11 | 13 |  name: xamarin/yaml-templates | 
| 12 | 14 |  endpoint: xamarin | 
|  | 15 | + ref: refs/heads/dev/signing-job | 
|  | 16 | + - repository: components | 
|  | 17 | + type: github | 
|  | 18 | + name: xamarin/XamarinComponents | 
|  | 19 | + endpoint: xamarin | 
|  | 20 | + ref: refs/heads/dev/templating | 
| 13 | 21 | 
 | 
| 14 | 22 | jobs: | 
| 15 |  | - | 
| 16 |  | - - job: build | 
| 17 |  | - displayName: 'Build Libraries & NuGets (macOS)' | 
| 18 |  | - timeoutInMinutes: 360 | 
| 19 |  | - pool: | 
| 20 |  | - vmImage: macos-10.13 | 
| 21 |  | - steps: | 
| 22 |  | - # Make sure to select the correct Xamarin and mono | 
| 23 |  | - - bash: sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $(MONO_VERSION) | 
| 24 |  | - displayName: 'Switch to the latest Xamarin SDK' | 
| 25 |  | - - bash: echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'/Applications/Xcode_$(XCODE_VERSION).app;sudo xcode-select --switch /Applications/Xcode_$(XCODE_VERSION).app/Contents/Developer | 
| 26 |  | - displayName: 'Switch to the latest Xcode' | 
| 27 |  | - # Build the libraries and packages | 
| 28 |  | - - bash: sh build.sh --target=ci --settings_skipverification=true --verbosity=$(VERBOSITY) | 
| 29 |  | - displayName: 'Build NuGets' | 
| 30 |  | - - script: | | 
| 31 |  | - # Make a temp folder to move the created nugets to before we fat package them | 
| 32 |  | - mkdir -p $(Build.SourcesDirectory)/tmp/nuget | 
| 33 |  | - mkdir -p $(Build.SourcesDirectory)/tmp/output | 
| 34 |  | - # Move all of the nupkg files from output into the temp folder we just created | 
| 35 |  | - mv $(Build.SourcesDirectory)/output/*.nupkg $(Build.SourcesDirectory)/tmp/nuget | 
| 36 |  | - # Move the remaining output bits to a temp location so they don't get overwritten | 
| 37 |  | - mv $(Build.SourcesDirectory)/output/* $(Build.SourcesDirectory)/tmp/output | 
| 38 |  | - sh build.sh --script nuget.cake \ | 
| 39 |  | - --localSource=$(Build.SourcesDirectory)/tmp/nuget \ | 
| 40 |  | - --packagesPath=$(Build.SourcesDirectory)/tmp/pkgs \ | 
| 41 |  | - --workingPath=$(Build.SourcesDirectory)/tmp/working \ | 
| 42 |  | - --outputPath=$(Build.SourcesDirectory)/output \ | 
| 43 |  | - --incrementVersion=False \ | 
| 44 |  | - --packLatestOnly=True \ | 
| 45 |  | - --useExplicitVersion=True | 
| 46 |  | - # Move the other output bits back to the original output folder | 
| 47 |  | - mv $(Build.SourcesDirectory)/tmp/output/* $(Build.SourcesDirectory)/output | 
| 48 |  | - displayName: 'NuGet FAT' | 
| 49 |  | - enabled: false | 
| 50 |  | - # Publish the artifacts | 
| 51 |  | - - task: PublishBuildArtifacts@1 | 
| 52 |  | - displayName: 'Publish unsigned artifacts' | 
| 53 |  | - inputs: | 
| 54 |  | - pathToPublish: '$(Build.SourcesDirectory)/output' | 
| 55 |  | - artifactName: 'nuget' | 
| 56 |  | - | 
| 57 |  | - - job: build_windows | 
| 58 |  | - displayName: 'Build Libraries & NuGets (Windows)' | 
| 59 |  | - timeoutInMinutes: 360 | 
| 60 |  | - pool: | 
| 61 |  | - vmImage: vs2017-win2016 | 
| 62 |  | - steps: | 
| 63 |  | - # Build the libraries and packages | 
| 64 |  | - - powershell: .\build.ps1 --target=ci --settings_skipverification=true --verbosity=$(VERBOSITY) | 
| 65 |  | - displayName: 'Build everything' | 
| 66 |  | - # Publish the artifacts | 
| 67 |  | - - task: PublishBuildArtifacts@1 | 
| 68 |  | - displayName: 'Publish Windows artifacts' | 
| 69 |  | - inputs: | 
| 70 |  | - pathToPublish: '$(Build.SourcesDirectory)/output' | 
| 71 |  | - artifactName: 'windows_output' | 
| 72 |  | - # Run some internal auditing | 
| 73 |  | - - ${{ if eq(variables['System.TeamProject'], 'devdiv') }}: | 
| 74 |  | - - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 | 
| 75 |  | - condition: not(startsWith(variables['Build.SourceBranch'], 'refs/tags/')) | 
| 76 |  | - displayName: Component Detection - Log | 
| 77 |  | - inputs: | 
| 78 |  | - scanType: LogOnly | 
| 79 |  | - - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 | 
| 80 |  | - condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/') | 
| 81 |  | - displayName: Component Detection - Report | 
| 82 |  | - - task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@1 | 
| 83 |  | - condition: eq(variables['System.TeamProject'], 'devdiv') | 
| 84 |  | - displayName: 'PoliCheck' | 
| 85 |  | - inputs: | 
| 86 |  | - targetType: F | 
| 87 |  | - | 
| 88 |  | - # only sign the packages when running on Windows, and using the private server which has the certificates | 
|  | 23 | + - template: .ci/prepare.yml@components | 
|  | 24 | + parameters: | 
|  | 25 | + buildType: 'basic' | 
|  | 26 | + masterBranchName: 'master' | 
|  | 27 | + - template: .ci/build.yml@components | 
|  | 28 | + parameters: | 
|  | 29 | + cakeTemplatesBranch: 'dev/templating' | 
|  | 30 | + cakeExtraArgs: '--settings_skipverification=true --nuget_useinprocessclient=false' | 
|  | 31 | + tools: | 
|  | 32 | + - 'xamarin.androidbinderator.tool': '0.3.0' | 
|  | 33 | + - 'xamarin.androidx.migration.tool': '1.0.0-preview03' | 
|  | 34 | + postBuildSteps: | 
|  | 35 | + - script: | | 
|  | 36 | + # Make a temp folder to move the created nugets to before we fat package them | 
|  | 37 | + mkdir -p $(Build.SourcesDirectory)/tmp/nuget | 
|  | 38 | + mkdir -p $(Build.SourcesDirectory)/tmp/output | 
|  | 39 | + # Move all of the nupkg files from output into the temp folder we just created | 
|  | 40 | + mv $(Build.SourcesDirectory)/output/*.nupkg $(Build.SourcesDirectory)/tmp/nuget | 
|  | 41 | + # Move the remaining output bits to a temp location so they don't get overwritten | 
|  | 42 | + mv $(Build.SourcesDirectory)/output/* $(Build.SourcesDirectory)/tmp/output | 
|  | 43 | + sh build.sh --script nuget.cake \ | 
|  | 44 | + --localSource=$(Build.SourcesDirectory)/tmp/nuget \ | 
|  | 45 | + --packagesPath=$(Build.SourcesDirectory)/tmp/pkgs \ | 
|  | 46 | + --workingPath=$(Build.SourcesDirectory)/tmp/working \ | 
|  | 47 | + --outputPath=$(Build.SourcesDirectory)/output \ | 
|  | 48 | + --incrementVersion=False \ | 
|  | 49 | + --packLatestOnly=True \ | 
|  | 50 | + --useExplicitVersion=True | 
|  | 51 | + # Move the other output bits back to the original output folder | 
|  | 52 | + mv $(Build.SourcesDirectory)/tmp/output/* $(Build.SourcesDirectory)/output | 
|  | 53 | + displayName: 'NuGet FAT' | 
|  | 54 | + enabled: false | 
|  | 55 | + # Run some internal auditing on Windows | 
|  | 56 | + - ${{ if and(eq(variables['System.TeamProject'], 'devdiv'), eq(variables['System.JobName'], 'windows')) }}: | 
|  | 57 | + - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 | 
|  | 58 | + condition: not(startsWith(variables['Build.SourceBranch'], 'refs/tags/')) | 
|  | 59 | + displayName: Component Detection - Log | 
|  | 60 | + inputs: | 
|  | 61 | + scanType: LogOnly | 
|  | 62 | + - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 | 
|  | 63 | + condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/') | 
|  | 64 | + displayName: Component Detection - Report | 
|  | 65 | + - task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@1 | 
|  | 66 | + condition: eq(variables['System.TeamProject'], 'devdiv') | 
|  | 67 | + displayName: 'PoliCheck' | 
|  | 68 | + inputs: | 
|  | 69 | + targetType: F | 
| 89 | 70 |  - ${{ if eq(variables['System.TeamProject'], 'devdiv') }}: | 
| 90 |  | - - job: signing | 
| 91 |  | - displayName: Signing NuGets | 
| 92 |  | - dependsOn: build | 
| 93 |  | - pool: | 
| 94 |  | - name: VSEng-XamarinCustom | 
| 95 |  | - demands: | 
| 96 |  | - - corpnet | 
| 97 |  | - condition: and(succeeded(), startsWith(variables['Build.SourceBranch'],'refs/tags/')) | 
| 98 |  | - steps: | 
| 99 |  | - # don't checkout code and sign the packages | 
| 100 |  | - - checkout: none | 
| 101 |  | - - template: sign-artifacts.yml@xamarin-templates | 
| 102 |  | - parameters: | 
| 103 |  | - targetFolder: '$(Build.ArtifactStagingDirectory)/signed' | 
| 104 |  | - # publish the signed packages | 
| 105 |  | - - task: PublishBuildArtifacts@1 | 
| 106 |  | - displayName: 'Publish Signed NuGets' | 
| 107 |  | - inputs: | 
| 108 |  | - artifactName: nuget-signed | 
| 109 |  | - pathToPublish: '$(Build.ArtifactStagingDirectory)/signed' | 
|  | 71 | + - template: sign-artifacts/jobs/v1.yml@internal-templates | 
|  | 72 | + parameters: | 
|  | 73 | + dependsOn: [ 'build' ] | 
0 commit comments