Skip to content

Commit 0631b85

Browse files
committed
(build) fix the Agent Name change in azure pipelines, it's not starting with "Hosted" anymore
1 parent c71b8fc commit 0631b85

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

azure-pipelines.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ stages:
77
strategy:
88
matrix:
99
'Windows':
10-
VM_IMAGE: 'windows-2019'
10+
VM_IMAGE: 'windows-latest'
1111
'Linux':
12-
VM_IMAGE: 'Ubuntu 16.04'
12+
VM_IMAGE: 'ubuntu-latest'
1313
'macOS':
1414
VM_IMAGE: 'macOS-latest'
1515
pool:
@@ -26,11 +26,11 @@ stages:
2626
- template: build/stages/artifacts-test.yml
2727
parameters:
2828
name: Linux
29-
vmImage: 'Ubuntu 16.04'
29+
vmImage: 'ubuntu-latest'
3030
- template: build/stages/artifacts-test.yml
3131
parameters:
3232
name: Windows
33-
vmImage: 'windows-2019'
33+
vmImage: 'windows-latest'
3434

3535
- stage: Docker
3636
dependsOn: Test
@@ -40,30 +40,30 @@ stages:
4040
- template: build/stages/docker.yml
4141
parameters:
4242
name: Linux
43-
vmImage: 'Ubuntu 16.04'
43+
vmImage: 'ubuntu-latest'
4444
- template: build/stages/docker.yml
4545
parameters:
4646
name: Windows
47-
vmImage: 'windows-2019'
47+
vmImage: 'windows-latest'
4848

4949
- stage: Publish
5050
dependsOn: Test
5151
condition: succeeded()
5252
jobs:
5353
- job: Publish
5454
pool:
55-
vmImage: windows-2019
55+
vmImage: windows-latest
5656
steps:
5757
- template: build/stages/publish.yml
5858

5959
- stage: Release
60-
dependsOn:
60+
dependsOn:
6161
- Docker
6262
- Publish
6363
condition: succeeded()
6464
jobs:
6565
- job: Release
6666
pool:
67-
vmImage: windows-2019
67+
vmImage: windows-latest
6868
steps:
6969
- template: build/stages/release.yml

build/stages/common-steps.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ steps:
55
packageType: sdk
66
version: 2.2.401
77
installationPath: $(Agent.ToolsDirectory)/dotnet
8+
- task: Bash@3
9+
displayName: 'Env Vars'
10+
inputs:
11+
targetType: 'inline'
12+
script: 'env | sort'
813
- task: CmdLine@2
914
condition: eq( variables['Agent.OS'], 'Darwin' )
1015
displayName: 'Use mono'

build/stages/generate-job.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
- job: Generator
33
displayName: 'Generate Docker jobs'
44
pool:
5-
vmImage: windows-2019
5+
vmImage: windows-latest
66
steps:
77
- pwsh: ./src/Docker/docker.ps1 -os windows -variant runtime
88
name: Map_Windows
99
- pwsh: ./src/Docker/docker.ps1 -os linux -variant runtime
10-
name: Map_Linux
10+
name: Map_Linux

build/utils/parameters.cake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public class BuildParameters
9292
IsLocalBuild = buildSystem.IsLocalBuild,
9393
IsRunningOnAppVeyor = buildSystem.IsRunningOnAppVeyor,
9494
IsRunningOnTravis = buildSystem.IsRunningOnTravisCI,
95-
IsRunningOnAzurePipeline = buildSystem.IsRunningOnAzurePipelinesHosted,
95+
IsRunningOnAzurePipeline = buildSystem.IsRunningOnAzurePipelines || buildSystem.IsRunningOnAzurePipelinesHosted,
9696

9797
IsDockerForWindows = dockerCliPlatform == "windows",
9898
IsDockerForLinux = dockerCliPlatform == "linux",

0 commit comments

Comments
 (0)