|
| 1 | +# Starter pipeline |
| 2 | +# Start with a minimal pipeline that you can customize to build and deploy your code. |
| 3 | +# Add steps that build, run tests, deploy, and more: |
| 4 | +# https://aka.ms/yaml |
| 5 | + |
| 6 | +trigger: none |
| 7 | +pr: |
| 8 | +- main |
| 9 | + |
| 10 | +# Variable 'needRunReleaseMdoc' was defined in the Variables tab |
| 11 | +# Variable 'params' was defined in the Variables tab |
| 12 | +# Agent Queue 'Azure Pipelines' was used with unrecognized Agent Specification, vmImage property must be specified to determine image - https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#software |
| 13 | +variables: |
| 14 | + solution: 'apidoctools.sln' |
| 15 | + buildConfiguration: 'Release' |
| 16 | + buildPlatform: 'any cpu' |
| 17 | +name: $(date:yyyyMMdd)$(rev:.r) |
| 18 | +resources: |
| 19 | + repositories: |
| 20 | + - repository: self |
| 21 | + type: git |
| 22 | + ref: refs/heads/develop |
| 23 | +jobs: |
| 24 | +- job: Job_1 |
| 25 | + displayName: Agent job 1 |
| 26 | + timeoutInMinutes: 600 |
| 27 | + pool: |
| 28 | + name: Azure Pipelines |
| 29 | + vmImage: windows-2022 |
| 30 | + steps: |
| 31 | + - checkout: self |
| 32 | + clean: true |
| 33 | + - task: AzureKeyVault@2 |
| 34 | + displayName: 'Azure Key Vault: ReferenceAutomation-Prod' |
| 35 | + inputs: |
| 36 | + ConnectedServiceName: 886728b9-fc93-486c-ba21-26777bea99af |
| 37 | + KeyVaultName: ReferenceAutomation-Prod |
| 38 | + enabled: true |
| 39 | + - task: NuGetAuthenticate@0 |
| 40 | + displayName: NuGet Authenticate |
| 41 | + - task: PowerShell@2 |
| 42 | + displayName: Compare xml files |
| 43 | + timeoutInMinutes: 600 |
| 44 | + inputs: |
| 45 | + filePath: mdoc/compareXmlFiles.ps1 |
| 46 | + arguments: -paramsJson '$(params)' -githubTokenBase64 '$(githubTokenBase64)' -githubOptionsAccountName $(githubOptionsAccountName) -githubOptionsAccountEmail $(githubOptionsAccountEmail) -vstsTokenBase64 '$(vstsTokenBase64)' -step '1' -commit1 '' |
| 47 | + enabled: true |
| 48 | + name: job1output |
| 49 | +- job: Job_2 |
| 50 | + displayName: Agent job2 |
| 51 | + timeoutInMinutes: 600 |
| 52 | + dependsOn: Job_1 |
| 53 | + variables: |
| 54 | + commit1: $[ dependencies.Job_1.outputs['job1output.commit1'] ] |
| 55 | + pool: |
| 56 | + name: Azure Pipelines |
| 57 | + vmImage: windows-2022 |
| 58 | + steps: |
| 59 | + - checkout: self |
| 60 | + clean: true |
| 61 | + - task: AzureKeyVault@2 |
| 62 | + displayName: 'Azure Key Vault: ReferenceAutomation-Prod' |
| 63 | + inputs: |
| 64 | + ConnectedServiceName: 886728b9-fc93-486c-ba21-26777bea99af |
| 65 | + KeyVaultName: ReferenceAutomation-Prod |
| 66 | + enabled: true |
| 67 | + - task: NuGetToolInstaller@0 |
| 68 | + displayName: Use NuGet 4.4.1 |
| 69 | + inputs: |
| 70 | + versionSpec: 4.4.1 |
| 71 | + enabled: true |
| 72 | + - task: NuGetCommand@2 |
| 73 | + displayName: NuGet restore |
| 74 | + inputs: |
| 75 | + solution: $(BuildParameters.solution) |
| 76 | + enabled: true |
| 77 | + - task: CmdLine@2 |
| 78 | + displayName: Command Line Script |
| 79 | + inputs: |
| 80 | + script: make prepare |
| 81 | + enabled: true |
| 82 | + - task: VSBuild@1 |
| 83 | + displayName: Build solution |
| 84 | + inputs: |
| 85 | + solution: $(solution) |
| 86 | + msbuildArgs: /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\" |
| 87 | + platform: $(BuildPlatform) |
| 88 | + configuration: $(BuildConfiguration) |
| 89 | + enabled: true |
| 90 | + - task: NuGetAuthenticate@0 |
| 91 | + displayName: NuGet Authenticate |
| 92 | + - task: PowerShell@2 |
| 93 | + displayName: Compare xml files |
| 94 | + timeoutInMinutes: 600 |
| 95 | + inputs: |
| 96 | + filePath: mdoc/compareXmlFiles.ps1 |
| 97 | + arguments: -paramsJson '$(params)' -githubTokenBase64 '$(githubTokenBase64)' -githubOptionsAccountName $(githubOptionsAccountName) -githubOptionsAccountEmail $(githubOptionsAccountEmail) -vstsTokenBase64 '$(vstsTokenBase64)' -step '2' -commit1 '$(commit1)' |
| 98 | + enabled: true |
| 99 | + name: job2output |
| 100 | + - task: PowerShell@2 |
| 101 | + displayName: Print Compare Url |
| 102 | + inputs: |
| 103 | + targetType: inline |
| 104 | + script: >- |
| 105 | + # Write your PowerShell commands here. |
| 106 | +
|
| 107 | +
|
| 108 | + Write-Host "Compare Url: $Env:CompareUrl" |
| 109 | +... |
0 commit comments