diff --git a/.vsts-dotnet-ci.yml b/.vsts-dotnet-ci.yml index 80ed1b4ac7..c2e0e2c0d4 100644 --- a/.vsts-dotnet-ci.yml +++ b/.vsts-dotnet-ci.yml @@ -1,15 +1,9 @@ -resources: - containers: - - container: centos7 - image: microsoft/dotnet-buildtools-prereqs:centos-7-b46d863-20180719033416 - phases: - template: /build/ci/phase-template.yml parameters: name: Linux buildScript: ./build.sh - queue: - container: centos7 + dockerImage: microsoft/dotnet-buildtools-prereqs:centos-7-b46d863-20180719033416 - template: /build/ci/phase-template.yml parameters: diff --git a/build/ci/phase-template.yml b/build/ci/phase-template.yml index 2c8430465a..bd326afb69 100644 --- a/build/ci/phase-template.yml +++ b/build/ci/phase-template.yml @@ -1,6 +1,7 @@ parameters: name: '' buildScript: '' + dockerImage: '' queue: {} phases: @@ -8,6 +9,9 @@ phases: variables: _buildScript: ${{ parameters.buildScript }} _phaseName: ${{ parameters.name }} + # if dockerImage is not equal to '' then run under docker container + ${{ if ne(parameters.dockerImage, '') }}: + _PREVIEW_VSTS_DOCKER_IMAGE: ${{ parameters.dockerImage }} queue: parallel: 2 matrix: