branches:
include:
- master
- - release/3.*
+ - release/3.* # TODO: (Consolidation) Remove when consolidated
paths:
exclude:
- - Documentation/*
+ - Documentation/* # TODO: (Consolidation) Remove when consolidated
+ - docs/*
- CODE-OF-CONDUCT.md
- CONTRIBUTING.md
- LICENSE.TXT
- README.md
- SECURITY.md
- THIRD-PARTY-NOTICES.TXT
+ - src/installer/*
+ - src/coreclr/*
+ - eng/pipelines/coreclr/*
+ - eng/pipelines/installer/*
pr:
branches:
include:
- master
- - release/3.*
+ - release/3.* # TODO: (Consolidation) Remove when consolidated
paths:
exclude:
- - Documentation/*
+ - Documentation/* # TODO: (Consolidation) Remove when consolidated
+ - docs/*
- CODE-OF-CONDUCT.md
- CONTRIBUTING.md
- LICENSE.TXT
- README.md
- SECURITY.md
- THIRD-PARTY-NOTICES.TXT
+ - src/installer/*
+ - src/coreclr/*
+ - eng/pipelines/coreclr/*
+ - eng/pipelines/installer/*
resources:
containers:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-a50a721-20191023143845
variables:
+ - ${{ if contains(variables['Build.DefinitionName'], 'runtime') }}: # TODO: (Consolidation) remove this condition
+ - template: variables.yml
+
+ # TODO: (Consolidation) remove this conditional block
+ - ${{ if not(contains(variables['Build.DefinitionName'], 'runtime')) }}:
+ - template: /eng/pipelines/variables.yml
+
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}:
- group: DotNet-Blob-Feed
- group: corefx-sdl-validation
stages:
# Windows legs
- - template: /eng/pipelines/windows.yml
+ - template: ${{ variables['pipelinesPath'] }}/windows.yml
parameters:
isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}
# Linux legs
- - template: /eng/pipelines/linux.yml
+ - template: ${{ variables['pipelinesPath'] }}/linux.yml
parameters:
isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}
# MacOS legs
- - template: /eng/pipelines/macos.yml
+ - template: ${{ variables['pipelinesPath'] }}/macos.yml
parameters:
isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}
# FreeBSD leg is only for official builds
- # - template: /eng/pipelines/freebsd.yml
+ # - template: ${{ variables['pipelinesPath'] }}/freebsd.yml
# parameters:
# isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
# fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}
# Publish and validation steps. Only run in official builds
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}:
- - template: /eng/pipelines/pre-publish.yml
+ - template: ${{ variables['pipelinesPath'] }}/pre-publish.yml
parameters:
dependsOn:
- WindowsStage
# Required: submitToHelix -> Boolean -> Value to know if it should submit tests payloads to helix.
# Optional: buildScriptPrefix -> String -> string to append to Unix build script.
- # buildScriptPrefix: 'HOME=/home/ ' -> 'HOME=/home/ ./build.sh ...'
+ # buildScriptPrefix: 'HOME=/home/ ' -> 'HOME=/home/ ./$(buildScriptName).sh ...'
# Optional: buildExtraArguments -> String -> string to append at the end of the build arguments
- # buildExtraArguments: /p:RuntimeOS=win10 -> 'build.cmd ... /p:RuntimeOS=win10'
+ # buildExtraArguments: /p:RuntimeOS=win10 -> '$(buildScriptName).cmd ... /p:RuntimeOS=win10'
# Optional: customBuildSteps -> Array -> list of steps to run instead of the common build steps.
# customBuildSteps:
jobs:
- ${{ each job in parameters.jobs }}:
- - template: ../common/templates/job/job.yml
+ - template: /eng/common/templates/job/job.yml
parameters:
variables:
# Windows variables
- ${{ if eq(parameters.targetOS, 'Windows_NT') }}:
- - _buildScript: build.cmd
+ - _buildScript: $(buildScriptFileName).cmd
- _msbuildCommand: powershell -ExecutionPolicy ByPass -NoProfile eng\common\msbuild.ps1 -warnaserror:0 -ci
# Non-Windows variables
- ${{ if ne(parameters.targetOS, 'Windows_NT') }}:
- - _buildScript: ${{ job.buildScriptPrefix }}./build.sh
+ - _buildScript: ${{ job.buildScriptPrefix }}./$(buildScriptFileName).sh
- _msbuildCommand: ${{ job.buildScriptPrefix }}./eng/common/msbuild.sh --warnaserror false --ci
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- _commonArguments: $(_args) -stripSymbols
- ${{ if eq(job.submitToHelix, 'true') }}:
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- - script: $(_msbuildCommand) src/publishTestAssets.proj
+ - script: $(_msbuildCommand) $(sourcesRoot)/publishTestAssets.proj
/p:FilesToPublishPattern=$(Build.SourcesDirectory)/artifacts/helix/**/*.zip
/p:AccountKey=$(dotnetfeed-storage-access-key-1)
/p:ExpectedFeedUrl=$(_dotnetFeedUrl)
artifactType: container
condition: and(succeeded(), eq(variables['_publishTests'], 'true'))
- - template: /eng/pipelines/helix.yml
- parameters:
- # send tests to helix only on public builds, official scheduled builds or manual official builds.
- condition: eq(${{ parameters.isOfficialBuild }}, False)
- targetOS: ${{ parameters.targetOS }}
- archGroup: $(_architecture)
- configuration: $(_BuildConfig)
- helixQueues: $(_helixQueues)
- msbuildScript: $(_msbuildCommand)
- framework: $(_framework)
- testScope: ${{ coalesce(parameters.testScope, 'innerloop') }} # if parameters.testScope is empty use 'innerloop'
-
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- officialBuildId: $(Build.BuildNumber)
- helixToken: $(HelixApiAccessToken)
-
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
- # TODO: SET Creator to the PR owner whenever Azure DevOps supports a good way to retrieve it.
- creator: dotnet-bot
- helixToken: ''
+ - ${{ if contains(variables['Build.DefinitionName'], 'runtime') }}: # TODO: (Consolidation) remove.
+ - template: /eng/pipelines/libraries/helix.yml
+ parameters:
+ # send tests to helix only on public builds, official scheduled builds or manual official builds.
+ condition: eq(${{ parameters.isOfficialBuild }}, False)
+ targetOS: ${{ parameters.targetOS }}
+ archGroup: $(_architecture)
+ configuration: $(_BuildConfig)
+ helixQueues: $(_helixQueues)
+ msbuildScript: $(_msbuildCommand)
+ framework: $(_framework)
+ testScope: ${{ coalesce(parameters.testScope, 'innerloop') }} # if parameters.testScope is empty use 'innerloop'
+
+ ${{ if eq(parameters.isOfficialBuild, 'true') }}:
+ officialBuildId: $(Build.BuildNumber)
+ helixToken: $(HelixApiAccessToken)
+
+ ${{ if eq(parameters.isOfficialBuild, 'false') }}:
+ # TODO: SET Creator to the PR owner whenever Azure DevOps supports a good way to retrieve it.
+ creator: dotnet-bot
+ helixToken: ''
+
+ # TODO: (Consolidation) remove this if block when consolidated
+ - ${{ if not(contains(variables['Build.DefinitionName'], 'runtime')) }}:
+ - template: /eng/pipelines/helix.yml
+ parameters:
+ # send tests to helix only on public builds, official scheduled builds or manual official builds.
+ condition: eq(${{ parameters.isOfficialBuild }}, False)
+ targetOS: ${{ parameters.targetOS }}
+ archGroup: $(_architecture)
+ configuration: $(_BuildConfig)
+ helixQueues: $(_helixQueues)
+ msbuildScript: $(_msbuildCommand)
+ framework: $(_framework)
+ testScope: ${{ coalesce(parameters.testScope, 'innerloop') }} # if parameters.testScope is empty use 'innerloop'
+
+ ${{ if eq(parameters.isOfficialBuild, 'true') }}:
+ officialBuildId: $(Build.BuildNumber)
+ helixToken: $(HelixApiAccessToken)
+
+ ${{ if eq(parameters.isOfficialBuild, 'false') }}:
+ # TODO: SET Creator to the PR owner whenever Azure DevOps supports a good way to retrieve it.
+ creator: dotnet-bot
+ helixToken: ''
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- task: PublishBuildArtifacts@1
steps:
- script: ${{ parameters.msbuildScript }}
- src/sendtohelix.proj
+ $(sourcesRoot)/sendtohelix.proj
/t:test
/p:ArchGroup=${{ parameters.archGroup }}
/p:ConfigurationGroup=${{ parameters.configuration }}
- container: ubuntu_1604_arm_cross_container
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-14.04-23cacb0-20191023143847
+variables:
+ - template: variables.yml
+
stages:
# Windows outerloop legs
- ${{ if or(endsWith(variables['Build.DefinitionName'], 'windows'), endsWith(variables['Build.DefinitionName'], 'outerloop')) }}:
- - template: /eng/pipelines/windows.yml
+ - template: windows.yml
parameters:
isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}
# Linux outerloop legs
- ${{ if or(endsWith(variables['Build.DefinitionName'], 'linux'), endsWith(variables['Build.DefinitionName'], 'outerloop')) }}:
- - template: /eng/pipelines/linux.yml
+ - template: linux.yml
parameters:
isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}
# MacOS outerloop legs
- ${{ if or(endsWith(variables['Build.DefinitionName'], 'osx'), endsWith(variables['Build.DefinitionName'], 'outerloop')) }}:
- - template: /eng/pipelines/macos.yml
+ - template: macos.yml
parameters:
isOfficialBuild: ${{ and(ne(variables['System.TeamProject'], 'public'), notIn(variables['Build.Reason'], 'PullRequest')) }}
fullMatrix: ${{ notIn(variables['Build.Reason'], 'PullRequest') }}
displayName: Pre-publish
dependsOn: ${{ parameters.dependsOn }}
jobs:
- - template: ../common/templates/jobs/jobs.yml
+ - template: /eng/common/templates/jobs/jobs.yml
parameters:
enableMicrobuild: true
enablePublishUsingPipelines: $(_PublishUsingPipelines)
artifactName: packages
downloadPath: $(_artifactsDir)
- - script: build.cmd
+ - script: $(buildScriptFileName).cmd
-restore
-ci
displayName: Restore tools
- - script: build.cmd
+ - script: $(buildScriptFileName).cmd
-sign
-ci
-configuration $(_BuildConfig)
/p:OfficialBuildId=$(Build.BuildNumber)
displayName: Sign packages
- - script: build.cmd
+ - script: $(buildScriptFileName).cmd
-publish
-ci
-configuration $(_BuildConfig)
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/PublishToArtifacts.binlog
displayName: Publish to artifacts and produce manifest
- - script: powershell -ExecutionPolicy ByPass -NoProfile eng\common\msbuild.ps1 src\build.proj
+ - script: powershell -ExecutionPolicy ByPass -NoProfile eng\common\msbuild.ps1 $(sourcesRoot)/build.proj
-warnaserror:0 -ci
/t:UpdatePublishedVersions
/p:GitHubAuthToken=$(AccessToken-dotnet-build-bot-public-repo)
name: Hosted Ubuntu 1604
variables:
- httpStressProject: src/System.Net.Http/tests/StressTests/HttpStress
- sdkBaseImage: sdk-corefx-current
- httpStressImage: httpstress
+ - template: ../variables.yml
+ - name: httpStressProject
+ value: $(sourcesRoot)/System.Net.Http/tests/StressTests/HttpStress/
+ - name: sdkBaseImage
+ value: sdk-corefx-current
+ - name: httpStressImage
+ value: httpstress
steps:
- checkout: self
lfs: false
- bash: |
- docker build -t $(sdkBaseImage) --build-arg CONFIGURATION=$(BUILD_CONFIGURATION) -f $(Build.SourcesDirectory)/$(HttpStressProject)/corefx.Dockerfile .
+ docker build -t $(sdkBaseImage) --build-arg CONFIGURATION=$(BUILD_CONFIGURATION) --build-arg BUILD_SCRIPT_NAME=$(buildScriptFileName) -f $(HttpStressProject)corefx.Dockerfile .
displayName: Build Corefx
- bash: |
- cd '$(Build.SourcesDirectory)/$(HttpStressProject)'
+ cd '$(HttpStressProject)'
docker build -t $(httpStressImage) --build-arg SDK_BASE_IMAGE=$(sdkBaseImage) --build-arg CONFIGURATION=$(BUILD_CONFIGURATION) .
displayName: Build HttpStress
- bash: |
- cd '$(Build.SourcesDirectory)/$(HttpStressProject)'
+ cd '$(HttpStressProject)'
docker-compose up --abort-on-container-exit --no-color
displayName: Run HttpStress
env:
name: Hosted VS2017
variables:
- httpStressProject: src/System.Net.Http/tests/StressTests/HttpStress/
+ - template: ../variables.yml
+ - name: httpStressProject
+ value: $(sourcesRoot)/System.Net.Http/tests/StressTests/HttpStress/
steps:
- checkout: self
lfs: false
- powershell: |
- .\build.cmd -ci -c $(BUILD_CONFIGURATION)
+ .\$(buildScriptFileName).cmd -ci -c $(BUILD_CONFIGURATION)
displayName: Build Corefx
- powershell: |
- cd '$(Build.SourcesDirectory)/$(HttpStressProject)'
+ cd '$(HttpStressProject)'
# Load testhost sdk in environment
. .\load-corefx-testhost.ps1 -c $(BUILD_CONFIGURATION) -b
# Run the stress suite
--- /dev/null
+variables:
+ - ${{ if contains(variables['Build.DefinitionName'], 'runtime') }}: # TODO: (Consolidation) Remove condition when consolidated
+ - name: buildScriptFileName
+ value: libraries
+ - name: sourcesRoot
+ value: $(Build.SourcesDirectory)/src/libraries
+ - name: pipelinesPath
+ value: /eng/pipelines/libraries
+
+ # TODO: (Consolidation) Remove when consolidated
+ - ${{ if not(contains(variables['Build.DefinitionName'], 'runtime')) }}:
+ - name: buildScriptFileName
+ value: build
+ - name: sourcesRoot
+ value: $(Build.SourcesDirectory)/src
+ - name: pipelinesPath
+ value: /eng/pipelines
frameworkArg: -allConfigurations
customBuildSteps:
- - script: build.cmd
+ - script: $(buildScriptFileName).cmd
-build
-configuration $(_BuildConfig)
-ci
COPY . .
ARG CONFIGURATION=Release
-RUN ./build.sh -c $CONFIGURATION
+# TODO: (Consolidation) remove when consolidated, change to ./libraries.sh
+ARG BUILD_SCRIPT_NAME=build
+RUN ./$BUILD_SCRIPT_NAME.sh -c $CONFIGURATION
FROM $SDK_BASE_IMAGE as target