mirror of https://github.com/dotnet/tye.git
Browse Source
* Update dependencies from https://github.com/dotnet/arcade build 20200917.6 Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild From Version 5.0.0-beta.20465.7 -> To Version 5.0.0-beta.20467.6 * Update dependencies from https://github.com/dotnet/arcade build 20200921.1 Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild From Version 5.0.0-beta.20465.7 -> To Version 5.0.0-beta.20471.1 * Update dependencies from https://github.com/dotnet/arcade build 20200922.36 Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild From Version 5.0.0-beta.20465.7 -> To Version 5.0.0-beta.20472.36 * Update dependencies from https://github.com/dotnet/arcade build 20200924.4 Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild From Version 5.0.0-beta.20465.7 -> To Version 5.0.0-beta.20474.4 * Fix nullability issues * Add more debug log * Parse tfm name * Mark testing packages as non-shipping Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: John Luo <johluo@microsoft.com>pull/685/head
committed by
GitHub
18 changed files with 253 additions and 73 deletions
@ -0,0 +1,49 @@ |
|||
parameters: |
|||
# This template adds arcade-powered source-build to CI. The template produces a server job with a |
|||
# default ID 'Source_Build_Complete' to put in a dependency list if necessary. |
|||
|
|||
# Specifies the prefix for source-build jobs added to pipeline. Use this if disambiguation needed. |
|||
jobNamePrefix: 'Source_Build' |
|||
|
|||
# Defines the platform on which to run the job. By default, a linux-x64 machine, suitable for |
|||
# managed-only repositories. This is an object with these properties: |
|||
# |
|||
# name: '' |
|||
# The name of the job. This is included in the job ID. |
|||
# targetRID: '' |
|||
# The name of the target RID to use, instead of the one auto-detected by Arcade. |
|||
# nonPortable: false |
|||
# Enables non-portable mode. This means a more specific RID (e.g. fedora.32-x64 rather than |
|||
# linux-x64), and compiling against distro-provided packages rather than portable ones. |
|||
# container: '' |
|||
# A container to use. Runs in docker. |
|||
# pool: {} |
|||
# A pool to use. Runs directly on an agent. |
|||
# buildScript: '' |
|||
# Specifies the build script to invoke to perform the build in the repo. The default |
|||
# './build.sh' should work for typical Arcade repositories, but this is customizable for |
|||
# difficult situations. |
|||
# jobProperties: {} |
|||
# A list of job properties to inject at the top level, for potential extensibility beyond |
|||
# container and pool. |
|||
platform: {} |
|||
|
|||
jobs: |
|||
- job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }} |
|||
displayName: Source-Build (${{ parameters.platform.name }}) |
|||
|
|||
${{ each property in parameters.platform.jobProperties }}: |
|||
${{ property.key }}: ${{ property.value }} |
|||
|
|||
${{ if ne(parameters.platform.container, '') }}: |
|||
container: ${{ parameters.platform.container }} |
|||
${{ if ne(parameters.platform.pool, '') }}: |
|||
pool: ${{ parameters.platform.pool }} |
|||
|
|||
workspace: |
|||
clean: all |
|||
|
|||
steps: |
|||
- template: /eng/common/templates/steps/source-build.yml |
|||
parameters: |
|||
platform: ${{ parameters.platform }} |
|||
@ -0,0 +1,48 @@ |
|||
parameters: |
|||
# This template adds arcade-powered source-build to CI. A job is created for each platform, as |
|||
# well as an optional server job that completes when all platform jobs complete. |
|||
|
|||
# The name of the "join" job for all source-build platforms. If set to empty string, the job is |
|||
# not included. Existing repo pipelines can use this job depend on all source-build jobs |
|||
# completing without maintaining a separate list of every single job ID: just depend on this one |
|||
# server job. By default, not included. Recommended name if used: 'Source_Build_Complete'. |
|||
allCompletedJobId: '' |
|||
|
|||
# See /eng/common/templates/job/source-build.yml |
|||
jobNamePrefix: 'Source_Build' |
|||
|
|||
# If changed to true, causes this template to include the default platform for a managed-only |
|||
# repo. The exact Docker image used for this build will be provided by Arcade. This has some risk, |
|||
# but since the repo is supposed to be managed-only, the risk should be very low. |
|||
includeDefaultManagedPlatform: false |
|||
defaultManagedPlatform: |
|||
name: 'Managed' |
|||
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343' |
|||
|
|||
# Defines the platforms on which to run build jobs. One job is created for each platform, and the |
|||
# object in this array is sent to the job template as 'platform'. |
|||
platforms: [] |
|||
|
|||
jobs: |
|||
|
|||
- ${{ if ne(parameters.allCompletedJobId, '') }}: |
|||
- job: ${{ parameters.allCompletedJobId }} |
|||
displayName: Source-Build Complete |
|||
pool: server |
|||
dependsOn: |
|||
- ${{ each platform in parameters.platforms }}: |
|||
- ${{ parameters.jobNamePrefix }}_${{ platform.name }} |
|||
- ${{ if eq(parameters.includeDefaultManagedPlatform, true) }}: |
|||
- ${{ parameters.jobNamePrefix }}_${{ parameters.defaultManagedPlatform.name }} |
|||
|
|||
- ${{ each platform in parameters.platforms }}: |
|||
- template: /eng/common/templates/job/source-build.yml |
|||
parameters: |
|||
jobNamePrefix: ${{ parameters.jobNamePrefix }} |
|||
platform: ${{ platform }} |
|||
|
|||
- ${{ if eq(parameters.includeDefaultManagedPlatform, true) }}: |
|||
- template: /eng/common/templates/job/source-build.yml |
|||
parameters: |
|||
jobNamePrefix: ${{ parameters.jobNamePrefix }} |
|||
platform: ${{ parameters.defaultManagedPlatform }} |
|||
@ -0,0 +1,66 @@ |
|||
parameters: |
|||
# This template adds arcade-powered source-build to CI. |
|||
|
|||
# This is a 'steps' template, and is intended for advanced scenarios where the existing build |
|||
# infra has a careful build methodology that must be followed. For example, a repo |
|||
# (dotnet/runtime) might choose to clone the GitHub repo only once and store it as a pipeline |
|||
# artifact for all subsequent jobs to use, to reduce dependence on a strong network connection to |
|||
# GitHub. Using this steps template leaves room for that infra to be included. |
|||
|
|||
# Defines the platform on which to run the steps. See 'eng/common/templates/job/source-build.yml' |
|||
# for details. The entire object is described in the 'job' template for simplicity, even though |
|||
# the usage of the properties on this object is split between the 'job' and 'steps' templates. |
|||
platform: {} |
|||
|
|||
steps: |
|||
# Build. Keep it self-contained for simple reusability. (No source-build-specific job variables.) |
|||
- script: | |
|||
set -x |
|||
df -h |
|||
|
|||
buildConfig=Release |
|||
# Check if AzDO substitutes in a build config from a variable, and use it if so. |
|||
if [ '$(_BuildConfig)' != '$''(_BuildConfig)' ]; then |
|||
buildConfig='$(_BuildConfig)' |
|||
fi |
|||
|
|||
officialBuildArgs= |
|||
if [ '${{ and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}' = 'True' ]; then |
|||
officialBuildArgs='/p:DotNetPublishUsingPipelines=true /p:OfficialBuildId=$(BUILD.BUILDNUMBER)' |
|||
fi |
|||
|
|||
targetRidArgs= |
|||
if [ '${{ parameters.platform.targetRID }}' != '' ]; then |
|||
targetRidArgs='/p:TargetRid=${{ parameters.platform.targetRID }}' |
|||
fi |
|||
|
|||
${{ coalesce(parameters.platform.buildScript, './build.sh') }} --ci \ |
|||
--configuration $buildConfig \ |
|||
--restore --build --pack --publish \ |
|||
$officialBuildArgs \ |
|||
$targetRidArgs \ |
|||
/p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \ |
|||
/p:ArcadeBuildFromSource=true |
|||
displayName: Build |
|||
|
|||
# Upload build logs for diagnosis. |
|||
- task: CopyFiles@2 |
|||
displayName: Prepare BuildLogs staging directory |
|||
inputs: |
|||
SourceFolder: '$(Build.SourcesDirectory)' |
|||
Contents: | |
|||
**/*.log |
|||
**/*.binlog |
|||
artifacts/source-build/self/prebuilt-report/** |
|||
TargetFolder: '$(Build.StagingDirectory)/BuildLogs' |
|||
CleanTargetFolder: true |
|||
continueOnError: true |
|||
condition: succeededOrFailed() |
|||
|
|||
- task: PublishPipelineArtifact@1 |
|||
displayName: Publish BuildLogs |
|||
inputs: |
|||
targetPath: '$(Build.StagingDirectory)/BuildLogs' |
|||
artifactName: BuildLogs_SourceBuild_${{ parameters.platform.name }}_Attempt$(System.JobAttempt) |
|||
continueOnError: true |
|||
condition: succeededOrFailed() |
|||
Loading…
Reference in new issue