|
| 1 | +# 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 |
| 2 | +variables: |
| 3 | +- name: BuildParameters.RestoreBuildProjects |
| 4 | + value: '**/*.csproj' |
| 5 | +- name: BuildParameters.TestProjects |
| 6 | + value: '**/*[Tt]ests/*.csproj' |
| 7 | +trigger: |
| 8 | + - CI |
| 9 | +name: $(date:yyyyMMdd)$(rev:.r) |
| 10 | +resources: |
| 11 | + repositories: |
| 12 | + - repository: self |
| 13 | + type: git |
| 14 | + ref: refs/heads/CI |
| 15 | +jobs: |
| 16 | +- job: Job_1 |
| 17 | + displayName: Agent job |
| 18 | + pool: |
| 19 | + vmImage: windows-latest |
| 20 | + steps: |
| 21 | + - checkout: self |
| 22 | + clean: true |
| 23 | + fetchTags: false |
| 24 | + - task: NodeTool@0 |
| 25 | + displayName: Use Node 12.19 |
| 26 | + inputs: |
| 27 | + versionSpec: 12.19 |
| 28 | + - task: Npm@1 |
| 29 | + displayName: npm custom |
| 30 | + inputs: |
| 31 | + command: custom |
| 32 | + workingDir: Auth/LearningHub.Nhs.Auth |
| 33 | + verbose: false |
| 34 | + customCommand: install -f |
| 35 | + - task: Npm@1 |
| 36 | + displayName: run webpack build |
| 37 | + inputs: |
| 38 | + command: custom |
| 39 | + workingDir: Auth/LearningHub.Nhs.Auth |
| 40 | + verbose: false |
| 41 | + customCommand: run build |
| 42 | + - task: NuGetToolInstaller@1 |
| 43 | + displayName: Use NuGet 5.8 |
| 44 | + inputs: |
| 45 | + versionSpec: 5.8 |
| 46 | + - task: NuGetCommand@2 |
| 47 | + displayName: NuGet restore |
| 48 | + inputs: |
| 49 | + feedRestore: d99eaf2c-ad74-4a35-876e-f7dc1e45a604 |
| 50 | + - task: DotNetCoreCLI@2 |
| 51 | + displayName: Restore |
| 52 | + inputs: |
| 53 | + command: restore |
| 54 | + projects: $(BuildParameters.RestoreBuildProjects) |
| 55 | + - task: DotNetCoreCLI@2 |
| 56 | + displayName: Build |
| 57 | + inputs: |
| 58 | + projects: $(BuildParameters.RestoreBuildProjects) |
| 59 | + arguments: --configuration $(BuildConfiguration) /p:Platform=x64 |
| 60 | + - task: DotNetCoreCLI@2 |
| 61 | + displayName: Test |
| 62 | + enabled: False |
| 63 | + inputs: |
| 64 | + command: test |
| 65 | + projects: $(BuildParameters.TestProjects) |
| 66 | + arguments: --configuration $(BuildConfiguration) |
| 67 | + - task: DotNetCoreCLI@2 |
| 68 | + displayName: Publish Auth |
| 69 | + inputs: |
| 70 | + command: publish |
| 71 | + publishWebProjects: false |
| 72 | + projects: '**/*LearningHub.Nhs.Auth.csproj' |
| 73 | + arguments: --configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)/Auth |
| 74 | + zipAfterPublish: True |
| 75 | + - task: PublishBuildArtifacts@1 |
| 76 | + displayName: Publish Artifact Auth |
| 77 | + condition: succeededOrFailed() |
| 78 | + inputs: |
| 79 | + PathtoPublish: $(build.artifactstagingdirectory)/Auth |
| 80 | + ArtifactName: Auth |
| 81 | + TargetPath: '\\my\share\$(Build.DefinitionName)\$(Build.BuildNumber)' |
| 82 | + - task: DotNetCoreCLI@2 |
| 83 | + displayName: Publish UserAPI |
| 84 | + inputs: |
| 85 | + command: publish |
| 86 | + publishWebProjects: false |
| 87 | + projects: '**/*LearningHub.Nhs.UserApi.csproj' |
| 88 | + arguments: --configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)/UserAPI |
| 89 | + zipAfterPublish: True |
| 90 | + - task: PublishBuildArtifacts@1 |
| 91 | + displayName: Publish Artifact UserAPI |
| 92 | + condition: succeededOrFailed() |
| 93 | + inputs: |
| 94 | + PathtoPublish: $(build.artifactstagingdirectory)/UserAPI |
| 95 | + ArtifactName: UserAPI |
| 96 | + TargetPath: '\\my\share\$(Build.DefinitionName)\$(Build.BuildNumber)' |
| 97 | +... |
0 commit comments