|
| 1 | +# Prevent pull request triggers in the pipeline |
| 2 | +pr: none |
| 3 | + |
1 | 4 | trigger: |
2 | | - none |
| 5 | + branches: |
| 6 | + include: |
| 7 | + - 'main' |
| 8 | + - 'release/*' |
| 9 | + |
| 10 | +# global parameters are configured here and show up in AzDO UI in build queue time. Required for MSBuild and .NET. |
| 11 | +# learn more at https://aka.ms/obpipelines/parameters |
| 12 | +parameters: |
| 13 | +- name: 'debug' |
| 14 | + displayName: 'Enable debug output' |
| 15 | + type: boolean |
| 16 | + default: false |
| 17 | + |
| 18 | +variables: |
| 19 | +- name: BuildPlatform |
| 20 | + value: 'any cpu' |
| 21 | +- name: BuildConfiguration |
| 22 | + value: 'release' |
| 23 | +- name: DeploymentType |
| 24 | + value: 'zipDeploy' |
| 25 | +- name: WindowsContainerImage |
| 26 | + value: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest |
| 27 | + |
| 28 | +resources: |
| 29 | + repositories: |
| 30 | + - repository: onebranchTemplates |
| 31 | + type: git |
| 32 | + name: OneBranch.Pipelines/GovernedTemplates |
| 33 | + ref: refs/heads/main |
| 34 | + |
| 35 | +extends: |
| 36 | + template: v2/OneBranch.NonOfficial.CrossPlat.yml@onebranchTemplates |
| 37 | + parameters: |
| 38 | + customTags: 'ES365AIMigrationTooling' |
| 39 | + globalSdl: # https://aka.ms/obpipelines/sdl |
| 40 | + tsa: |
| 41 | + enabled: false |
| 42 | + |
| 43 | + stages: |
| 44 | + - stage: Build |
| 45 | + jobs: |
| 46 | + - job: BuildTelemetryLibrary |
| 47 | + displayName: 'Build Telemetry Library' |
| 48 | + pool: |
| 49 | + type: windows |
| 50 | + variables: |
| 51 | + ob_outputDirectory: '$(Build.SourcesDirectory)\out' # this directory is uploaded to Pipeline artifacts, VSODrop, \\reddog, and Cloud Vault |
| 52 | + |
| 53 | + steps: |
| 54 | + - task: NuGetToolInstaller@1 |
| 55 | + displayName: Install NuGet 5.5.1 |
| 56 | + inputs: |
| 57 | + versionSpec: '5.5.1' |
| 58 | + checkLatest: true |
| 59 | + - task: UseDotNet@2 |
| 60 | + displayName: Use .NET Core 6.0.x |
| 61 | + inputs: |
| 62 | + packageType: 'sdk' |
| 63 | + version: '6.0.x' |
| 64 | + - task: DotNetCoreCLI@2 |
| 65 | + displayName: Restore Packages (AppInsights.EnterpriseTelemetry.sln) |
| 66 | + inputs: |
| 67 | + command: 'restore' |
| 68 | + projects: 'src/AppInsights.EnterpriseTelemetry.sln' |
| 69 | + feedsToUse: 'select' |
| 70 | + vstsFeed: '3d1a556d-2042-4a45-9dae-61808ff33d3b/18496829-a46f-4605-8121-1fd072c0dfd1' |
| 71 | + includeNuGetOrg: false |
| 72 | + - task: DotNetCoreCLI@2 |
| 73 | + displayName: Build Library Projects |
| 74 | + inputs: |
| 75 | + command: 'build' |
| 76 | + projects: '**/*.csproj' |
| 77 | + - task: DotNetCoreCLI@2 |
| 78 | + displayName: Test Projects |
| 79 | + inputs: |
| 80 | + command: 'test' |
| 81 | + projects: '**/*.Tests.csproj' |
| 82 | + - task: DotNetCoreCLI@2 |
| 83 | + displayName: Publish Library Projects |
| 84 | + inputs: |
| 85 | + command: publish |
| 86 | + publishWebProjects: false |
| 87 | + projects: '**/*.csproj' |
| 88 | + arguments: --output $(Build.SourcesDirectory)/PublishedFolder --configuration $(BuildConfiguration) |
| 89 | + zipAfterPublish: false |
3 | 90 |
|
4 | | -jobs: |
5 | | -- job: BuildTelemetryLibrary |
6 | | - displayName: Build Telemetry Library |
7 | | - pool: |
8 | | - vmImage: ubuntu-latest |
9 | | - variables: |
10 | | - BuildConfiguration: 'Release' |
11 | | - BuildPlatform: 'any cpu' |
12 | | - steps: |
13 | | - - task: NuGetToolInstaller@1 |
14 | | - displayName: Install NuGet 5.5.1 |
15 | | - inputs: |
16 | | - versionSpec: '5.5.1' |
17 | | - checkLatest: true |
18 | | - - task: UseDotNet@2 |
19 | | - displayName: Use .NET Core 6.0.x |
20 | | - inputs: |
21 | | - packageType: 'sdk' |
22 | | - version: '6.0.x' |
23 | | - - task: DotNetCoreCLI@2 |
24 | | - displayName: Restore Packages (AppInsights.EnterpriseTelemetry.sln) |
25 | | - inputs: |
26 | | - command: 'restore' |
27 | | - projects: 'src/AppInsights.EnterpriseTelemetry.sln' |
28 | | - feedsToUse: 'select' |
29 | | - - task: DotNetCoreCLI@2 |
30 | | - displayName: Build Library Projects |
31 | | - inputs: |
32 | | - command: 'build' |
33 | | - projects: '**/*.csproj' |
34 | | - - task: DotNetCoreCLI@2 |
35 | | - displayName: Test Projects |
36 | | - inputs: |
37 | | - command: 'test' |
38 | | - projects: '**/*.Tests.csproj' |
| 91 | + - task: onebranch.pipeline.signing@1 |
| 92 | + inputs: |
| 93 | + command: 'sign' |
| 94 | + signing_profile: 'internal_azure_service' |
| 95 | + files_to_sign: '**/*.exe;**/*.dll;**/*.ps1' |
| 96 | + search_root: '$(Build.SourcesDirectory)/PublishedFolder' |
| 97 | + - task: ArchiveFiles@2 |
| 98 | + displayName: 'Archive Library Projects' |
| 99 | + inputs: |
| 100 | + rootFolderOrFile: '$(Build.SourcesDirectory)/PublishedFolder' |
| 101 | + includeRootFolder: false |
| 102 | + archiveType: 'zip' |
| 103 | + archiveFile: 'API.zip' |
| 104 | + replaceExistingArchive: true |
| 105 | + - task: ArchiveFiles@2 |
| 106 | + displayName: ArchiveFiles FunctionalTests |
| 107 | + enabled: false |
| 108 | + inputs: |
| 109 | + rootFolderOrFile: '$(Build.SourcesDirectory)/PublishedFolder/FunctionalTests' |
| 110 | + includeRootFolder: false |
| 111 | + archiveType: 'zip' |
| 112 | + archiveFile: 'FunctionalTests.zip' |
| 113 | + replaceExistingArchive: true |
| 114 | + - task: CopyFiles@2 |
| 115 | + displayName: "Copy Files for 'Publish Artifact' publish task" |
| 116 | + condition: succeededOrFailed() |
| 117 | + inputs: |
| 118 | + SourceFolder: $(Build.SourcesDirectory) |
| 119 | + Contents: '**/*.zip' |
| 120 | + TargetFolder: $(Build.ArtifactStagingDirectory)/drop/ |
0 commit comments