From 210cf13779c2e8a5cbeb6357769172b622525aba Mon Sep 17 00:00:00 2001 From: Christopher Costa Date: Wed, 14 Aug 2019 10:01:10 -0700 Subject: [PATCH 01/13] Stagify Arcade --- Documentation/AzureDevOps/TemplateSchema.md | 115 ++++++++++ azure-pipelines.yml | 199 +++++++++--------- eng/common-variables.yml | 38 ++++ eng/common/templates/job/job.yml | 135 ++++++------ eng/common/templates/jobs/jobs.yml | 74 +++---- .../channels/internal-servicing.yml | 6 +- .../post-build/channels/netcore-dev-5.yml | 7 +- .../channels/netcore-tools-latest.yml | 6 +- .../channels/public-dev-release.yml | 6 +- .../post-build/channels/public-release.yml | 6 +- .../channels/public-validation-release.yml | 9 +- .../templates/post-build/post-build.yml | 32 ++- ...idate-sdk.cmd => update-packagesource.cmd} | 2 +- eng/update-packagesource.ps1 | 89 ++++++++ eng/validate-sdk.ps1 | 144 ------------- eng/validate-sdk.yml | 42 ++++ tests/UnitTests.proj | 4 +- 17 files changed, 543 insertions(+), 371 deletions(-) create mode 100644 Documentation/AzureDevOps/TemplateSchema.md create mode 100644 eng/common-variables.yml rename eng/{validate-sdk.cmd => update-packagesource.cmd} (68%) create mode 100644 eng/update-packagesource.ps1 delete mode 100644 eng/validate-sdk.ps1 create mode 100644 eng/validate-sdk.yml diff --git a/Documentation/AzureDevOps/TemplateSchema.md b/Documentation/AzureDevOps/TemplateSchema.md new file mode 100644 index 00000000000..0d15a106dd1 --- /dev/null +++ b/Documentation/AzureDevOps/TemplateSchema.md @@ -0,0 +1,115 @@ +# Templates Schema + +Arcade provides many templates which help consumers conform to Arcade standards and provide additional functionality (additional jobs or stages that provide features). + +- [eng/common/jobs/jobs.yml](#jobs.yml) +- [eng/common/job/job.yml](#job.yml) + +## Jobs.yml + +Jobs.yml is a wrapper around one or more Azure DevOps [jobs](https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#job) but additionally adds more jobs which are commonly used by .NET Core Arcade repos. ie a job to publish asset manifests from a build and a job to generate the graph files for a build. + +### Jobs schema + +```yaml +parameters: + continueOnError: boolean # 'true' if future jobs should run even if this job fails; defaults to 'false' + enablePublishBuildArtifacts: boolean # Enables publishing build logs as an Azure DevOps artifact. + enablePublishUsingPipelines: boolean # Enable publishing using release pipelines + graphFileGeneration: + enabled: boolean # Enable generating the graph files at the end of the build + includeToolset: boolean # Include toolset dependencies in the generated graph files + jobs: [ jobSchema ] # see "Job schema" below + publishBuildAssetsDependsOn: [ string ] # Override automatically derived dependsOn value for "publish build assets" job + runAsPublic: boolean # Specify if job should run as a public build even in the internal project +``` + +## Job.yml + +Job.yml wraps common Arcade functionality in an effort to provide automatic support for Azure DevOps builds which rely on common Arcade features / conventions. + +### Job schema + +```yaml +parameters: + # accepts all job schema properties as parameters (https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#job) + + # additional parameters + artifacts: { artifactsReference } + enableMicrobuild: boolean # 'true' if Microbuild plugin should be installed for internal builds. + enablePublishBuildArtifacts: boolean # deprecated (replaced by 'artifacts' parameter). Enables publishing build logs as an Azure DevOps artifact. + enablePublishBuildAssets: boolean # deprecated (replaced by 'artifacts' parameter). Enables publishing asset manifests as an Azure DevOps artifact. + enablePublishUsingPipelines: boolean # prevent gather / push manifest from executing when using publishing pipelines + enablePublishTestResults: boolean # include publish test results task + enableTelemetry: boolean # specifies whether to set the DOTNET_CLI_TELEMETRY_PROFILE environment variable. Default 'true', must explicitly set 'enableTelemetry: false' to disable + name: string # Required: + # steps to run before artifacts are downloaded task is executed. ie, a clean step should happen before downloading artifacts. + preSteps: [ script | bash | pwsh | powershell | task | templateReference ] + runAsPublic: boolean +``` + +Find [artifactsReference](#artifact-schema) below. + +### Artifact schema + +The artifact parameter is used by [job.yml](#job-schema) to control what artifacts are published to Azure DevOps during a pipeline. + +```yaml +artifacts: + # 'true' to download default pipeline artifacts to default location. Use 'downloadArtifact' to change name and/or path + download: true | { downloadArtifactReference } + publish: + artifacts: true | { publishArtifactReference } # 'true' to publish to artifacts/bin and artifacts/packages to default named Azure DevOps artifact. Use 'publishArtifact' to change Azure DevOps artifact name + logs: true | { publishArtifactReference } # 'true' to publish logs to default named Azure DevOps artifact. Use 'publishArtifact' to change Azure DevOps artifact name + manifests: true | { publishArtifactReference } # 'true' to publish asset manifests to default named Azure DevOps artifact. Use 'publishArtifact' to change Azure DevOps artifact name +``` + +Find [downloadArtifactReference](#downloadartifact-schema) and [publishArtifactReference](#publishartifact-schema) below. + +#### Artifact Example + +```yaml +jobs: +- \eng\common\templates\job\job.yml + parameters: + name: build + artifacts: + publish: + artifacts: + name: myartifacts # publish artifacts/bin and artifacts/packages from the build to the 'myartifacts' Azure DevOps artifact + logs: true # publish logs from the build to the default named artifact + manifests: true # publish asset manifests from the build to the default named artifact + steps: + - script: build.cmd + +- \eng\common\templates\job\job.yml + parameters: + name: test + artifacts: + download: + name: myartifacts # download artifacts the the 'myartifacts' Azure DevOps artifact + path: pipelineartifacts # download to the 'pipelineartifacts' folder instead of the default ('artifacts') + publish: + logs: true # publish logs to the default named artifact + steps: + - script: test.cmd +``` + +### DownloadArtifact schema + +```yaml +artifacts: + download: + name: string # artifact name to download + path: string # target path for artifact contents + pattern: string # filter pattern representing files to include +``` + +### PublishArtifact schema + +```yaml +artifacts: + publish: + artifacts | logs | manifests: + name: string # Azure DevOps artifact name +``` diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 504776590d4..3c2d00ea25f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,15 +14,7 @@ pr: - Documentation/* variables: - # Cannot use key:value syntax in root defined variables - - name: _TeamName - value: DotNetCore - - name: _PublishUsingPipelines - value: true - - name: _DotNetArtifactsCategory - value: .NETCore - - name: _DotNetValidationArtifactsCategory - value: .NETCoreValidation +- template: eng/common-variables.yml resources: containers: @@ -35,153 +27,149 @@ stages: jobs: - template: /eng/common/templates/jobs/jobs.yml parameters: + artifacts: + publish: + artifacts: true + logs: true + manifests: true enableMicrobuild: true - enablePublishBuildArtifacts: true - enablePublishBuildAssets: true - enablePublishUsingPipelines: ${{ variables._PublishUsingPipelines }} - enableTelemetry: true + enablePublishUsingPipelines: true graphFileGeneration: enabled: true includeToolset: true - helixRepo: dotnet/arcade + workspace: + clean: all jobs: - job: Windows_NT timeoutInMinutes: 90 pool: - # For public or PR jobs, use the hosted pool. For internal jobs use the internal pool. - # Will eventually change this to two BYOC pools. - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: + ${{ if eq(variables._RunAsPublic, True) }}: name: NetCorePublic-Pool queue: BuildPool.Windows.10.Amd64.VS2017.Open - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + ${{ if eq(variables._RunAsInternal, True) }}: name: NetCoreInternal-Pool queue: BuildPool.Windows.10.Amd64.VS2017 - variables: - - _Script: eng\common\cibuild.cmd - - _ValidateSdkArgs: '' - - _InternalBuildArgs: '' - - HelixApiAccessToken: '' - - # Only enable publishing in non-public, non PR scenarios. - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - # DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1 - # Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT - # DotNet-HelixApi-Access provides: HelixApiAccessToken - - group: DotNet-Blob-Feed - - group: Publish-Build-Assets - - group: DotNet-HelixApi-Access - - _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json - - _InternalBuildArgs: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) - /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) - /p:DotNetPublishBlobFeedUrl=$(_PublishBlobFeedUrl) - /p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed) - /p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines) - /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) - /p:OfficialBuildId=$(BUILD.BUILDNUMBER) - strategy: matrix: Build_Release: _BuildConfig: Release - # PRs or external builds are not signed. - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - _SignType: test - _DotNetPublishToBlobFeed : false - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - _SignType: real - _DotNetPublishToBlobFeed : true - _Script: eng\validate-sdk.cmd - _ValidateSdkArgs: -gitHubPat $(BotAccount-dotnet-maestro-bot-PAT) -barToken $(MaestroAccessToken) - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: + ${{ if eq(variables._RunAsPublic, True) }}: Build_Debug: _BuildConfig: Debug - _SignType: test - _DotNetPublishToBlobFeed : false - steps: + preSteps: - checkout: self clean: true - # Use utility script to run script command dependent on agent OS. - - script: $(_Script) + steps: + - script: eng\common\cibuild.cmd -configuration $(_BuildConfig) -prepareMachine $(_InternalBuildArgs) - $(_ValidateSdkArgs) /p:Test=false displayName: Windows Build / Publish - - - powershell: eng\common\build.ps1 - -configuration $(_BuildConfig) - -prepareMachine - -ci - -test - -projects $(Build.SourcesDirectory)/tests/UnitTests.proj - /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/Helix.binlog - displayName: Run Helix Tests - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - HelixAccessToken: $(HelixApiAccessToken) - - - powershell: eng\common\build.ps1 - -configuration $(_BuildConfig) - -prepareMachine - -ci - -test - -projects $(Build.SourcesDirectory)/tests/UnitTests.proj - /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/Helix.binlog - /p:HelixBaseUri=https://helix.int-dot.net/ - displayName: Run Helix Tests (Int) - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - HelixAccessToken: $(HelixApiAccessToken) - enabled: false - - - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: + - ${{ if eq(variables._RunAsPublic, True) }}: - job: Linux container: LinuxContainer pool: - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: - name: NetCorePublic-Pool - queue: BuildPool.Ubuntu.1604.Amd64.Open - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - name: NetCoreInternal-Pool - queue: BuildPool.Ubuntu.1604.Amd64 - variables: - - HelixApiAccessToken: '' - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - group: DotNet-HelixApi-Access + name: NetCorePublic-Pool + queue: BuildPool.Ubuntu.1604.Amd64.Open strategy: matrix: Build_Debug: _BuildConfig: Debug - _PublishType: none - _SignType: none - _DotNetPublishToBlobFeed : false Build_Release: _BuildConfig: Release - _PublishType: none - _SignType: none - _DotNetPublishToBlobFeed : false - steps: + preSteps: - checkout: self clean: true + steps: - script: eng/common/cibuild.sh --configuration $(_BuildConfig) --prepareMachine /p:Test=false displayName: Unix Build / Publish + +- ${{ if eq(variables._RunAsPublic, True) }}: + - stage: test + dependsOn: build + jobs: + - template: /eng/common/templates/jobs/jobs.yml + parameters: + artifacts: + publish: + artifacts: + name: Artifacts_Test_$(Agent.OS)_$(_BuildConfig) + logs: + name: Logs_Test_$(Agent.OS)_$(_BuildConfig) + download: true + workspace: + clean: all + jobs: + - job: Windows_NT + timeoutInMinutes: 90 + pool: + vmimage: windows-latest + strategy: + matrix: + Build_Release: + _BuildConfig: Release + Build_Debug: + _BuildConfig: Debug + preSteps: + - checkout: self + clean: true + steps: + - powershell: eng\common\build.ps1 + -configuration $(_BuildConfig) + -prepareMachine + -ci + -restore + -test + -projects $(Build.SourcesDirectory)/tests/UnitTests.proj + /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/Helix.binlog + displayName: Run Helix Tests + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + HelixAccessToken: '' + - job: Linux + container: LinuxContainer + pool: + vmimage: ubuntu-latest + strategy: + matrix: + Build_Debug: + _BuildConfig: Debug + Build_Release: + _BuildConfig: Release + preSteps: + - checkout: self + clean: true + steps: - script: eng/common/build.sh --configuration $(_BuildConfig) --prepareMachine --ci + --restore --test --projects $(Build.SourcesDirectory)/tests/UnitTests.proj /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/Helix.binlog + /p:RestoreUsingNuGetTargets=false displayName: Run Helix Tests env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) - HelixAccessToken: $(HelixApiAccessToken) + HelixAccessToken: '' + +- ${{ if eq(variables._RunAsInternal, True) }}: + - stage: validatesdk + displayName: Validate Arcade SDK + dependsOn: build + jobs: + - template: /eng/validate-sdk.yml + parameters: + buildArgs: -configuration $(_BuildConfig) + -prepareMachine + $(_InternalBuildArgs) + /p:Test=false -- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - template: eng\common\templates\post-build\post-build.yml parameters: # Symbol validation isn't being very reliable lately. This should be enabled back @@ -190,6 +178,9 @@ stages: # Sourcelink validation isn't passing for Arcade due to some regressions. This should be # enabled back once this issue is resolved: https://github.com/dotnet/arcade/issues/2912 enableSourceLinkValidation: false + publishDependsOn: + - validate + - validatesdk # This is to enable SDL runs part of Post-Build Validation Stage SDLValidationParameters: enable: true diff --git a/eng/common-variables.yml b/eng/common-variables.yml new file mode 100644 index 00000000000..8ea8debe786 --- /dev/null +++ b/eng/common-variables.yml @@ -0,0 +1,38 @@ +variables: + # Cannot use key:value syntax in root defined variables + - name: _TeamName + value: DotNetCore + - name: _DotNetArtifactsCategory + value: .NETCore + - name: _DotNetValidationArtifactsCategory + value: .NETCoreValidation + - name: HelixApiAccessToken + value: '' + - name: _RunAsPublic + value: True + - name: _RunAsInternal + value: False + - name: _InternalBuildArgs + value: '' + + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - name: _RunAsPublic + value: False + - name: _RunAsInternal + value: True + - name: _SignType + value: real + # DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1 + # Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT + # DotNet-HelixApi-Access provides: HelixApiAccessToken + - group: DotNet-Blob-Feed + - group: Publish-Build-Assets + - group: DotNet-HelixApi-Access + - name: _InternalBuildArgs + value: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) + /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) + /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json + /p:DotNetPublishToBlobFeed=true + /p:DotNetPublishUsingPipelines=true + /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory) + /p:OfficialBuildId=$(BUILD.BUILDNUMBER) diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index 8db456bb7f5..6cf64ae1612 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -1,67 +1,33 @@ +# Internal resources (telemetry, microbuild) can only be accessed from non-public projects, +# and some (Microbuild) should only be applied to non-PR cases for internal builds. + parameters: # Job schema parameters - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job cancelTimeoutInMinutes: '' - condition: '' - - continueOnError: false - container: '' - + continueOnError: false dependsOn: '' - displayName: '' - - steps: [] - pool: '' - + steps: [] strategy: '' - timeoutInMinutes: '' - variables: [] - workspace: '' # Job base template specific parameters - # Optional: Enable installing Microbuild plugin - # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix - # _TeamName - the name of your team - # _SignType - 'test' or 'real' + # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md + artifacts: '' enableMicrobuild: false - - # Optional: Include PublishBuildArtifacts task enablePublishBuildArtifacts: false - - # Optional: Enable publishing to the build asset registry enablePublishBuildAssets: false - - # Optional: Prevent gather/push manifest from executing when using publishing pipelines - enablePublishUsingPipelines: false - - # Optional: Include PublishTestResults task enablePublishTestResults: false - - # Optional: enable sending telemetry - enableTelemetry: false - - # Optional: define the helix repo for telemetry (example: 'dotnet/arcade') - helixRepo: '' - - # Optional: define the helix type for telemetry (example: 'build/product/') - helixType: '' - - # Required: name of the job + enablePublishUsingPipelines: false name: '' - - # Optional: should run as a public build even in the internal project - # if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects. + preSteps: [] runAsPublic: false -# Internal resources (telemetry, microbuild) can only be accessed from non-public projects, -# and some (Microbuild) should only be applied to non-PR cases for internal builds. - jobs: - job: ${{ parameters.name }} @@ -93,7 +59,7 @@ jobs: timeoutInMinutes: ${{ parameters.timeoutInMinutes }} variables: - - ${{ if eq(parameters.enableTelemetry, 'true') }}: + - ${{ if ne(parameters.enableTelemetry, 'false') }}: - name: DOTNET_CLI_TELEMETRY_PROFILE value: '$(Build.Repository.Uri)' - ${{ each variable in parameters.variables }}: @@ -125,18 +91,9 @@ jobs: workspace: ${{ parameters.workspace }} steps: - - ${{ if eq(parameters.enableTelemetry, 'true') }}: - # Telemetry tasks are built from https://github.com/dotnet/arcade-extensions - - task: sendStartTelemetry@0 - displayName: 'Send Helix Start Telemetry' - inputs: - helixRepo: ${{ parameters.helixRepo }} - ${{ if ne(parameters.helixType, '') }}: - helixType: ${{ parameters.helixType }} - buildConfig: $(_BuildConfig) - runAsPublic: ${{ parameters.runAsPublic }} - continueOnError: ${{ parameters.continueOnError }} - condition: always() + - ${{ if ne(parameters.preSteps, '') }}: + - ${{ each preStep in parameters.preSteps }}: + - ${{ preStep }} - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: @@ -151,6 +108,14 @@ jobs: continueOnError: ${{ parameters.continueOnError }} condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) + - ${{ if or(eq(parameters.artifacts.download, 'true'), ne(parameters.artifacts.download, '')) }}: + - task: DownloadPipelineArtifact@2 + inputs: + buildType: current + artifactName: ${{ coalesce(parameters.artifacts.download.name, 'Artifacts_$(Agent.OS)_$(_BuildConfig)') }} + targetPath: ${{ coalesce(parameters.artifacts.download.path, 'artifacts') }} + itemPattern: ${{ coalesce(parameters.artifacts.download.pattern, '**') }} + - ${{ each step in parameters.steps }}: - ${{ step }} @@ -163,20 +128,60 @@ jobs: env: TeamName: $(_TeamName) - - ${{ if eq(parameters.enableTelemetry, 'true') }}: - # Telemetry tasks are built from https://github.com/dotnet/arcade-extensions - - task: sendEndTelemetry@0 - displayName: 'Send Helix End Telemetry' - continueOnError: ${{ parameters.continueOnError }} - condition: always() - - - ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}: + - ${{ if ne(parameters.artifacts.publish, '') }}: + - ${{ if or(eq(parameters.artifacts.publish.artifacts, 'true'), ne(parameters.artifacts.publish.artifacts, '')) }}: + - task: CopyFiles@2 + displayName: Gather binaries for publish to artifacts + inputs: + SourceFolder: 'artifacts/bin' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/bin' + - task: CopyFiles@2 + displayName: Gather packages for publish to artifacts + inputs: + SourceFolder: 'artifacts/packages' + Contents: '**' + TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/packages' + - task: PublishBuildArtifacts@1 + displayName: Publish pipeline artifacts + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)/artifacts' + PublishLocation: Container + ArtifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }} + continueOnError: true + condition: always() + - ${{ if or(eq(parameters.artifacts.publish.logs, 'true'), ne(parameters.artifacts.publish.logs, '')) }}: + - publish: artifacts/log + artifact: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }} + displayName: Publish logs + continueOnError: true + condition: always() + - ${{ if or(eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}: + - ${{ if and(ne(parameters.enablePublishUsingPipelines, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - task: CopyFiles@2 + displayName: Gather Asset Manifests + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest' + TargetFolder: '$(Build.ArtifactStagingDirectory)/AssetManifests' + continueOnError: ${{ parameters.continueOnError }} + condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) + + - task: PublishBuildArtifacts@1 + displayName: Push Asset Manifests + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)/AssetManifests' + PublishLocation: Container + ArtifactName: AssetManifests + continueOnError: ${{ parameters.continueOnError }} + condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) + + - ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}: - task: PublishBuildArtifacts@1 displayName: Publish Logs inputs: PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)' PublishLocation: Container - ArtifactName: $(Agent.Os)_$(Agent.JobName) + ArtifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)' ) }} continueOnError: true condition: always() diff --git a/eng/common/templates/jobs/jobs.yml b/eng/common/templates/jobs/jobs.yml index 6a2f98c036f..c08225a9a97 100644 --- a/eng/common/templates/jobs/jobs.yml +++ b/eng/common/templates/jobs/jobs.yml @@ -1,19 +1,10 @@ parameters: - # Optional: 'true' if failures in job.yml job should not fail the job + # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md continueOnError: false - # Optional: Enable installing Microbuild plugin - # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix - # _TeamName - the name of your team - # _SignType - 'test' or 'real' - enableMicrobuild: false - # Optional: Include PublishBuildArtifacts task enablePublishBuildArtifacts: false - # Optional: Enable publishing to the build asset registry - enablePublishBuildAssets: false - # Optional: Enable publishing using release pipelines enablePublishUsingPipelines: false @@ -23,19 +14,9 @@ parameters: # Optional: Include toolset dependencies in the generated graph files includeToolset: false - # Optional: Include PublishTestResults task - enablePublishTestResults: false - - # Optional: enable sending telemetry - # if enabled then the 'helixRepo' parameter should also be specified - enableTelemetry: false - # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job jobs: [] - # Optional: define the helix repo for telemetry (example: 'dotnet/arcade') - helixRepo: '' - # Optional: Override automatically derived dependsOn value for "publish build assets" job publishBuildAssetsDependsOn: '' @@ -62,29 +43,30 @@ jobs: name: ${{ job.job }} -- ${{ if and(eq(parameters.enablePublishBuildAssets, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - template: ../job/publish-build-assets.yml - parameters: - continueOnError: ${{ parameters.continueOnError }} - dependsOn: - - ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}: - - ${{ each job in parameters.publishBuildAssetsDependsOn }}: - - ${{ job.job }} - - ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}: - - ${{ each job in parameters.jobs }}: - - ${{ job.job }} - pool: - vmImage: vs2017-win2016 - runAsPublic: ${{ parameters.runAsPublic }} - publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }} - enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }} - -- ${{ if and(eq(parameters.graphFileGeneration.enabled, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - template: ../job/generate-graph-files.yml - parameters: - continueOnError: ${{ parameters.continueOnError }} - includeToolset: ${{ parameters.graphFileGeneration.includeToolset }} - dependsOn: - - Asset_Registry_Publish - pool: - vmImage: vs2017-win2016 +- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}: + - template: ../job/publish-build-assets.yml + parameters: + continueOnError: ${{ parameters.continueOnError }} + dependsOn: + - ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}: + - ${{ each job in parameters.publishBuildAssetsDependsOn }}: + - ${{ job.job }} + - ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}: + - ${{ each job in parameters.jobs }}: + - ${{ job.job }} + pool: + vmImage: vs2017-win2016 + runAsPublic: ${{ parameters.runAsPublic }} + publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }} + enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }} + + - ${{ if eq(parameters.graphFileGeneration.enabled, true) }}: + - template: ../job/generate-graph-files.yml + parameters: + continueOnError: ${{ parameters.continueOnError }} + includeToolset: ${{ parameters.graphFileGeneration.includeToolset }} + dependsOn: + - Asset_Registry_Publish + pool: + vmImage: vs2017-win2016 diff --git a/eng/common/templates/post-build/channels/internal-servicing.yml b/eng/common/templates/post-build/channels/internal-servicing.yml index dc065ab3085..4ba4dd779c3 100644 --- a/eng/common/templates/post-build/channels/internal-servicing.yml +++ b/eng/common/templates/post-build/channels/internal-servicing.yml @@ -1,9 +1,13 @@ parameters: + dependsOn: + - validate enableSymbolValidation: true stages: - stage: IS_Publish - dependsOn: validate + dependsOn: + - ${{ each depend in parameters.dependsOn }}: + - ${{ depend }} variables: - template: ../common-variables.yml displayName: Internal Servicing diff --git a/eng/common/templates/post-build/channels/netcore-dev-5.yml b/eng/common/templates/post-build/channels/netcore-dev-5.yml index f2b0cfb269b..8013ab6aa97 100644 --- a/eng/common/templates/post-build/channels/netcore-dev-5.yml +++ b/eng/common/templates/post-build/channels/netcore-dev-5.yml @@ -1,9 +1,14 @@ parameters: + dependsOn: + - validate enableSymbolValidation: true stages: - stage: NetCore_Dev5_Publish - dependsOn: validate + dependsOn: + - ${{ each depend in parameters.dependsOn }}: + - ${{ depend }} + variables: - template: ../common-variables.yml displayName: .NET Core 5 Dev Channel diff --git a/eng/common/templates/post-build/channels/netcore-tools-latest.yml b/eng/common/templates/post-build/channels/netcore-tools-latest.yml index fd6c09b227f..4b3b5089d5c 100644 --- a/eng/common/templates/post-build/channels/netcore-tools-latest.yml +++ b/eng/common/templates/post-build/channels/netcore-tools-latest.yml @@ -1,9 +1,13 @@ parameters: + dependsOn: + - validate enableSymbolValidation: true stages: - stage: NetCore_Tools_Latest_Publish - dependsOn: validate + dependsOn: + - ${{ each depend in parameters.dependsOn }}: + - ${{ depend }} variables: - template: ../common-variables.yml displayName: .NET Tools - Latest diff --git a/eng/common/templates/post-build/channels/public-dev-release.yml b/eng/common/templates/post-build/channels/public-dev-release.yml index 771dcf4ef84..6fb3b60e1aa 100644 --- a/eng/common/templates/post-build/channels/public-dev-release.yml +++ b/eng/common/templates/post-build/channels/public-dev-release.yml @@ -1,9 +1,13 @@ parameters: + dependsOn: + - validate enableSymbolValidation: true stages: - stage: Publish - dependsOn: validate + dependsOn: + - ${{ each depend in parameters.dependsOn }}: + - ${{ depend }} variables: - template: ../common-variables.yml displayName: Developer Channel diff --git a/eng/common/templates/post-build/channels/public-release.yml b/eng/common/templates/post-build/channels/public-release.yml index 00108bd3f8c..f6595094c8c 100644 --- a/eng/common/templates/post-build/channels/public-release.yml +++ b/eng/common/templates/post-build/channels/public-release.yml @@ -1,9 +1,13 @@ parameters: + dependsOn: + - validate enableSymbolValidation: true stages: - stage: PubRel_Publish - dependsOn: validate + dependsOn: + - ${{ each depend in parameters.dependsOn }}: + - ${{ depend }} variables: - template: ../common-variables.yml displayName: Public Release diff --git a/eng/common/templates/post-build/channels/public-validation-release.yml b/eng/common/templates/post-build/channels/public-validation-release.yml index f64184da9f2..78ef150f594 100644 --- a/eng/common/templates/post-build/channels/public-validation-release.yml +++ b/eng/common/templates/post-build/channels/public-validation-release.yml @@ -1,6 +1,13 @@ +parameters: + dependsOn: + - validate + stages: - stage: PVR_Publish - dependsOn: validate + dependsOn: + - ${{ each depend in parameters.dependsOn }}: + - ${{ depend }} + variables: - template: ../common-variables.yml displayName: Validation Channel diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index aba0b0fcafb..5f8896b70e2 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -1,4 +1,5 @@ parameters: + enableSourceLinkValidation: true enableSigningValidation: true enableSymbolValidation: true @@ -6,13 +7,17 @@ parameters: SDLValidationParameters: enable: false params: '' - # Which stages should finish execution before post-build stages start - dependsOn: [build] + validateDependsOn: + - build + publishDependsOn: + - validate stages: - stage: validate - dependsOn: ${{ parameters.dependsOn }} + dependsOn: + - ${{ each dependsOn in parameters.validateDependsOn }}: + - ${{ dependsOn }} displayName: Validate jobs: - ${{ if eq(parameters.enableNugetValidation, 'true') }}: @@ -86,18 +91,39 @@ stages: - template: \eng\common\templates\post-build\channels\netcore-dev-5.yml parameters: + dependsOn: + - ${{ each dependsOn in parameters.publishDependsOn }}: + - ${{ dependsOn }} enableSymbolValidation: ${{ parameters.enableSymbolValidation }} - template: \eng\common\templates\post-build\channels\public-dev-release.yml parameters: + dependsOn: + - ${{ each dependsOn in parameters.publishDependsOn }}: + - ${{ dependsOn }} enableSymbolValidation: ${{ parameters.enableSymbolValidation }} - template: \eng\common\templates\post-build\channels\netcore-tools-latest.yml parameters: + dependsOn: + - ${{ each dependsOn in parameters.publishDependsOn }}: + - ${{ dependsOn }} enableSymbolValidation: ${{ parameters.enableSymbolValidation }} - template: \eng\common\templates\post-build\channels\public-validation-release.yml + parameters: + dependsOn: + - ${{ each dependsOn in parameters.publishDependsOn }}: + - ${{ dependsOn }} - template: \eng\common\templates\post-build\channels\public-release.yml + parameters: + dependsOn: + - ${{ each dependsOn in parameters.publishDependsOn }}: + - ${{ dependsOn }} - template: \eng\common\templates\post-build\channels\internal-servicing.yml + parameters: + dependsOn: + - ${{ each dependsOn in parameters.publishDependsOn }}: + - ${{ dependsOn }} diff --git a/eng/validate-sdk.cmd b/eng/update-packagesource.cmd similarity index 68% rename from eng/validate-sdk.cmd rename to eng/update-packagesource.cmd index 089f267f9e6..c12187983fb 100644 --- a/eng/validate-sdk.cmd +++ b/eng/update-packagesource.cmd @@ -1,2 +1,2 @@ @echo off -powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0validate-sdk.ps1""" %*" +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0update-packagesource.ps1""" %*" diff --git a/eng/update-packagesource.ps1 b/eng/update-packagesource.ps1 new file mode 100644 index 00000000000..132d3a1ddaf --- /dev/null +++ b/eng/update-packagesource.ps1 @@ -0,0 +1,89 @@ +Param( + [string] $barToken, + [string] $gitHubPat, + [string] $packagesSource +) + +$ErrorActionPreference = "Stop" +. $PSScriptRoot\common\tools.ps1 +$LocalNugetConfigSourceName = "arcade-local" + +# Batch and executable files exit and define $LASTEXITCODE. Powershell commands exit and define $? +function CheckExitCode ([string]$stage, [bool]$commandExitCode = $True) +{ + $exitCode = 0 + if($commandExitCode -eq -$False) { + $exitCode = 1 + } + else { + if ( Test-Path "LASTEXITCODE" -ErrorAction SilentlyContinue) + { + $exitCode = $LASTEXITCODE + } + } + + if ($exitCode -ne 0) { + Write-Host "Something failed in stage: '$stage'. Check for errors above. Exiting now with exit code $exitCode..." + ExitWithExitCode $exitCode + } +} + +function StopDotnetIfRunning +{ + $dotnet = Get-Process "dotnet" -ErrorAction SilentlyContinue + if ($dotnet) { + stop-process $dotnet + } +} + +function AddSourceToNugetConfig([string]$nugetConfigPath, [string]$source) +{ + Write-Host "Adding '$source' to '$nugetConfigPath'..." + + $nugetConfig = New-Object XML + $nugetConfig.PreserveWhitespace = $true + $nugetConfig.Load($nugetConfigPath) + $packageSources = $nugetConfig.SelectSingleNode("//packageSources") + $keyAttribute = $nugetConfig.CreateAttribute("key") + $keyAttribute.Value = $LocalNugetConfigSourceName + $valueAttribute = $nugetConfig.CreateAttribute("value") + $valueAttribute.Value = $source + $newSource = $nugetConfig.CreateElement("add") + $newSource.Attributes.Append($keyAttribute) | Out-Null + $newSource.Attributes.Append($valueAttribute) | Out-Null + $packageSources.AppendChild($newSource) | Out-Null + $nugetConfig.Save($nugetConfigPath) +} + +try { + Push-Location $PSScriptRoot + + $nugetConfigPath = Join-Path $RepoRoot "NuGet.config" + + AddSourceToNugetConfig $nugetConfigPath $packagesSource + CheckExitCode "Adding source to NuGet.config" $? + + Write-Host "Updating Dependencies using Darc..." + + . .\common\darc-init.ps1 + CheckExitCode "Running darc-init" + + $DarcExe = "$env:USERPROFILE\.dotnet\tools" + $DarcExe = Resolve-Path $DarcExe + + & $DarcExe\darc.exe update-dependencies --packages-folder $packagesSource --password $barToken --github-pat $gitHubPat --channel ".NET Tools - Latest" + CheckExitCode "Updating dependencies" + StopDotnetIfRunning + +} +catch { + Write-Host $_ + Write-Host $_.Exception + Write-Host $_.ScriptStackTrace + ExitWithExitCode 1 +} +finally { + Write-Host "Cleaning up workspace..." + StopDotnetIfRunning + Pop-Location +} diff --git a/eng/validate-sdk.ps1 b/eng/validate-sdk.ps1 deleted file mode 100644 index ba27c5bd994..00000000000 --- a/eng/validate-sdk.ps1 +++ /dev/null @@ -1,144 +0,0 @@ -Param( - [string] $barToken, - [string] $gitHubPat, - [string] $configuration = "Debug" -) - -$ErrorActionPreference = "Stop" -. $PSScriptRoot\common\tools.ps1 -$LocalNugetConfigSourceName = "arcade-local" - -# Batch and executable files exit and define $LASTEXITCODE. Powershell commands exit and define $? -function CheckExitCode ([string]$stage, [bool]$commandExitCode = $True) -{ - if($commandExitCode -eq -$False) { - $exitCode = 1 - } - else { - $exitCode = $LASTEXITCODE - } - - if ($exitCode -ne 0) { - Write-Host "Something failed in stage: '$stage'. Check for errors above. Exiting now with exit code $exitCode..." - ExitWithExitCode $exitCode - } -} - -function StopDotnetIfRunning -{ - $dotnet = Get-Process "dotnet" -ErrorAction SilentlyContinue - if ($dotnet) { - stop-process $dotnet - } -} - -function AddSourceToNugetConfig([string]$nugetConfigPath, [string]$source) -{ - Write-Host "Adding '$source' to '$nugetConfigPath'..." - - $nugetConfig = New-Object XML - $nugetConfig.PreserveWhitespace = $true - $nugetConfig.Load($nugetConfigPath) - $packageSources = $nugetConfig.SelectSingleNode("//packageSources") - $keyAttribute = $nugetConfig.CreateAttribute("key") - $keyAttribute.Value = $LocalNugetConfigSourceName - $valueAttribute = $nugetConfig.CreateAttribute("value") - $valueAttribute.Value = $source - $newSource = $nugetConfig.CreateElement("add") - $newSource.Attributes.Append($keyAttribute) | Out-Null - $newSource.Attributes.Append($valueAttribute) | Out-Null - $packageSources.AppendChild($newSource) | Out-Null - $nugetConfig.Save($nugetConfigPath) -} - -function MoveFolderToSubFolder([string]$sourceDirectory, [string]$subFolderName) -{ - $parentDirectory = Split-Path -Path $sourceDirectory -Parent - Rename-Item -Path $sourceDirectory -NewName $subFolderName -Force -Verbose - if ($? -ne $True) { - return $False - } - - Create-Directory $sourceDirectory - Move-Item -Path (Join-Path $parentDirectory $subFolderName) -Destination $sourceDirectory -Force -Verbose - if ($? -ne $True) { - return $False - } - return $True -} - -try { - Write-Host "Stage 1: Build and create local packages" - - Push-Location $PSScriptRoot - - $stage1ArtifactsFolderName = "artifacts_stage_1" - $stage1SdkDir = Join-Path $RepoRoot $stage1ArtifactsFolderName - $packagesSource = Join-Path (Join-Path (Join-Path $stage1SdkDir "packages") $configuration) "NonShipping" - $nugetConfigPath = Join-Path $RepoRoot "NuGet.config" - - & .\common\cibuild.cmd -configuration $configuration @Args - CheckExitCode "Local build" - - # This is a temporary solution. When https://github.com/dotnet/arcade/issues/1293 is closed - # we'll be able to pass a container name to build.ps1 which will put the outputs in the - # artifacts- folder. - Rename-Item -Path $ArtifactsDir -NewName $stage1ArtifactsFolderName -Verbose - CheckExitCode "Preserve artifacts for stage 1 build" $? - Write-Host "Stage 2: Build using the local packages" - - AddSourceToNugetConfig $nugetConfigPath $packagesSource - CheckExitCode "Adding source to NuGet.config" - - Write-Host "Updating Dependencies using Darc..." - - . .\common\darc-init.ps1 - CheckExitCode "Running darc-init" - - $DarcExe = "$env:USERPROFILE\.dotnet\tools" - $DarcExe = Resolve-Path $DarcExe - - & $DarcExe\darc.exe update-dependencies --packages-folder $packagesSource --password $barToken --github-pat $gitHubPat --channel ".NET Tools - Latest" - CheckExitCode "Updating dependencies" - StopDotnetIfRunning - - Write-Host "Building with updated dependencies" - - $ArtifactsLogDir = Join-Path (Join-Path $ArtifactsDir "log") $configuration - & .\common\cibuild.cmd -configuration $configuration @Args /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core-test/index.json - CheckExitCode "Official build" - - StopDotnetIfRunning - - # Preserve build artifacts from stage 1 and stage 2 - # move logs to stage 2 - $exitCode = MoveFolderToSubFolder $ArtifactsLogDir "stage2" - CheckExitCode "Move stage2 logs" $exitCode - - # copy logs from stage 1 - $stage1SourceLogDir = Join-Path (Join-Path $stage1SdkDir "log") $configuration - $stage1TargetLogDir = Join-Path $ArtifactsLogDir "stage1" - $stage1SourceAssetManifestDir = Join-Path $stage1SourceLogDir "AssetManifest" - Create-Directory $stage1TargetLogDir - Copy-Item -Path "$stage1SourceLogDir\*" -Destination $stage1TargetLogDir -Recurse -Force -Verbose - CheckExitCode "Copy logs from stage 1" $? - - # copy manifest from stage 1 - $ArtifactsManifestDir = Join-Path $artifactsLogDir "AssetManifest" - Create-Directory $ArtifactsManifestDir - Copy-Item -Path "$stage1SourceAssetManifestDir\*" -Destination $ArtifactsManifestDir -Recurse -Force -Verbose - CheckExitCode "Copy asset manifests from stage 1" $? - - Write-Host "Finished building Arcade SDK with validation enabled!" -} -catch { - Write-Host $_ - Write-Host $_.Exception - Write-Host $_.ScriptStackTrace - ExitWithExitCode 1 -} -finally { - Write-Host "Cleaning up workspace..." - StopDotnetIfRunning - Pop-Location -} diff --git a/eng/validate-sdk.yml b/eng/validate-sdk.yml new file mode 100644 index 00000000000..cdf69b581bd --- /dev/null +++ b/eng/validate-sdk.yml @@ -0,0 +1,42 @@ +parameters: + buildArgs: '' + validateBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-core-test/index.json + buildConfig: Release + +jobs: +- template: /eng/common/templates/job/job.yml + parameters: + name: ValidateArcadeSDK + displayName: Validate Arcade SDK + enableMicrobuild: true + artifacts: + download: + path: build_stage_artifacts + publish: + artifacts: + name: Artifacts_ValidateSdk_Windows_NT_Release + logs: + name: Logs_ValidateSdk_Windows_NT_Release + timeoutInMinutes: 90 + pool: + name: NetCoreInternal-Pool + queue: BuildPool.Windows.10.Amd64.VS2017 + variables: + - group: DotNet-Blob-Feed + - group: Publish-Build-Assets + - _BuildConfig: ${{ parameters.buildConfig }} + - _BuildArgs: ${{ parameters.buildArgs }} + - _ValidateBlobFeedUrl: ${{ parameters.validateBlobFeedUrl }} + preSteps: + - checkout: self + clean: true + steps: + - script: eng\update-packagesource.cmd + -gitHubPat $(BotAccount-dotnet-maestro-bot-PAT) + -barToken $(MaestroAccessToken) + -packagesSource $(Build.SourcesDirectory)/build_stage_artifacts + displayName: Update package source + - script: eng\common\cibuild.cmd + $(_BuildArgs) + /p:DotNetPublishBlobFeedUrl=$(_ValidateBlobFeedUrl) + displayName: Build / Validate diff --git a/tests/UnitTests.proj b/tests/UnitTests.proj index 6348cc58700..aca9cf8eabe 100644 --- a/tests/UnitTests.proj +++ b/tests/UnitTests.proj @@ -53,8 +53,8 @@ - $(MSBuildThisFileDirectory)../artifacts/bin/Microsoft.DotNet.Helix.Sdk/$(_BuildConfig)/netcoreapp2.1/publish/Microsoft.DotNet.Helix.Sdk.dll - $(MSBuildThisFileDirectory)../artifacts/bin/Microsoft.DotNet.Helix.Sdk/$(_BuildConfig)/net472/publish/Microsoft.DotNet.Helix.Sdk.dll + $(MSBuildThisFileDirectory)../artifacts/bin/Microsoft.DotNet.Helix.Sdk/$(Configuration)/netcoreapp2.1/publish/Microsoft.DotNet.Helix.Sdk.dll + $(MSBuildThisFileDirectory)../artifacts/bin/Microsoft.DotNet.Helix.Sdk/$(Configuration)/net472/publish/Microsoft.DotNet.Helix.Sdk.dll From b5378b2eb4cde2a7266337bb0691f7cc3cc1e84a Mon Sep 17 00:00:00 2001 From: Christopher Costa Date: Wed, 14 Aug 2019 13:00:43 -0700 Subject: [PATCH 02/13] Fix slashes for consistency when specifying RestoreUsingNugetTargets property --- azure-pipelines.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3c2d00ea25f..15338f44582 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -124,8 +124,9 @@ stages: -ci -restore -test - -projects $(Build.SourcesDirectory)/tests/UnitTests.proj - /bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/Helix.binlog + -projects $(Build.SourcesDirectory)\tests\UnitTests.proj + /bl:$(Build.SourcesDirectory)\artifacts\log\$(_BuildConfig)\Helix.binlog + /p:RestoreUsingNuGetTargets=false displayName: Run Helix Tests env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) From 9b5328ffd2a24119e252f6856d7970819d5c6b4d Mon Sep 17 00:00:00 2001 From: Christopher Costa Date: Mon, 19 Aug 2019 09:25:51 -0700 Subject: [PATCH 03/13] pr feedback: formatting, prestep default --- azure-pipelines.yml | 9 --------- eng/common/templates/job/job.yml | 4 +++- eng/common/templates/post-build/post-build.yml | 1 - eng/validate-sdk.yml | 3 --- 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 15338f44582..2c1bb94c24d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -56,9 +56,6 @@ stages: ${{ if eq(variables._RunAsPublic, True) }}: Build_Debug: _BuildConfig: Debug - preSteps: - - checkout: self - clean: true steps: - script: eng\common\cibuild.cmd -configuration $(_BuildConfig) @@ -114,9 +111,6 @@ stages: _BuildConfig: Release Build_Debug: _BuildConfig: Debug - preSteps: - - checkout: self - clean: true steps: - powershell: eng\common\build.ps1 -configuration $(_BuildConfig) @@ -141,9 +135,6 @@ stages: _BuildConfig: Debug Build_Release: _BuildConfig: Release - preSteps: - - checkout: self - clean: true steps: - script: eng/common/build.sh --configuration $(_BuildConfig) diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index 6cf64ae1612..8a2ea4e41c9 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -25,7 +25,9 @@ parameters: enablePublishTestResults: false enablePublishUsingPipelines: false name: '' - preSteps: [] + preSteps: + - checkout: self + clean: true runAsPublic: false jobs: diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 5f8896b70e2..f335c87bb36 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -1,5 +1,4 @@ parameters: - enableSourceLinkValidation: true enableSigningValidation: true enableSymbolValidation: true diff --git a/eng/validate-sdk.yml b/eng/validate-sdk.yml index cdf69b581bd..175a247316e 100644 --- a/eng/validate-sdk.yml +++ b/eng/validate-sdk.yml @@ -27,9 +27,6 @@ jobs: - _BuildConfig: ${{ parameters.buildConfig }} - _BuildArgs: ${{ parameters.buildArgs }} - _ValidateBlobFeedUrl: ${{ parameters.validateBlobFeedUrl }} - preSteps: - - checkout: self - clean: true steps: - script: eng\update-packagesource.cmd -gitHubPat $(BotAccount-dotnet-maestro-bot-PAT) From e7bbb0e97bf13563ddcfd5eddc3dc450e0dc824c Mon Sep 17 00:00:00 2001 From: Christopher Costa Date: Mon, 19 Aug 2019 09:32:54 -0700 Subject: [PATCH 04/13] Try direct assignment --- .../templates/post-build/post-build.yml | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 1953fee12d2..536ed565f48 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -21,9 +21,7 @@ parameters: stages: - stage: validate - dependsOn: - - ${{ each dependsOn in parameters.validateDependsOn }}: - - ${{ dependsOn }} + dependsOn: ${{ parameters.validateDependsOn }} displayName: Validate jobs: - ${{ if eq(parameters.enableNugetValidation, 'true') }}: @@ -98,49 +96,39 @@ stages: - template: \eng\common\templates\post-build\channels\netcore-dev-5.yml parameters: - dependsOn: - - ${{ each dependsOn in parameters.publishDependsOn }}: - - ${{ dependsOn }} + dependsOn: ${{ parameters.publishDependsOn }} enableSymbolValidation: ${{ parameters.enableSymbolValidation }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - template: \eng\common\templates\post-build\channels\public-dev-release.yml parameters: - dependsOn: - - ${{ each dependsOn in parameters.publishDependsOn }}: - - ${{ dependsOn }} + dependsOn: ${{ parameters.publishDependsOn }} enableSymbolValidation: ${{ parameters.enableSymbolValidation }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - template: \eng\common\templates\post-build\channels\netcore-tools-latest.yml parameters: - dependsOn: - - ${{ each dependsOn in parameters.publishDependsOn }}: - - ${{ dependsOn }} + dependsOn: ${{ parameters.publishDependsOn }} enableSymbolValidation: ${{ parameters.enableSymbolValidation }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - template: \eng\common\templates\post-build\channels\public-validation-release.yml parameters: - dependsOn: - - ${{ each dependsOn in parameters.publishDependsOn }}: - - ${{ dependsOn }} + dependsOn: ${{ parameters.publishDependsOn }} - template: \eng\common\templates\post-build\channels\public-release.yml parameters: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} dependsOn: - - ${{ each dependsOn in parameters.publishDependsOn }}: - - ${{ dependsOn }} + - ${{ each dependsOnJob in parameters.publishDependsOn }}: + - ${{ dependsOnJob }} - template: \eng\common\templates\post-build\channels\internal-servicing.yml parameters: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: - - ${{ each dependsOn in parameters.publishDependsOn }}: - - ${{ dependsOn }} + dependsOn: ${{ parameters.publishDependsOn }} From b919880f3087d83d6f6aafa253a72d642fafad62 Mon Sep 17 00:00:00 2001 From: Christopher Costa Date: Mon, 19 Aug 2019 09:39:38 -0700 Subject: [PATCH 05/13] Fix formatting --- .../templates/post-build/channels/internal-servicing.yml | 4 +--- eng/common/templates/post-build/channels/netcore-dev-5.yml | 5 +---- .../templates/post-build/channels/netcore-tools-latest.yml | 4 +--- .../templates/post-build/channels/public-dev-release.yml | 4 +--- eng/common/templates/post-build/channels/public-release.yml | 4 +--- .../post-build/channels/public-validation-release.yml | 5 +---- eng/common/templates/post-build/post-build.yml | 5 ++--- 7 files changed, 8 insertions(+), 23 deletions(-) diff --git a/eng/common/templates/post-build/channels/internal-servicing.yml b/eng/common/templates/post-build/channels/internal-servicing.yml index 1b5a0db0b26..a1b7266fdb1 100644 --- a/eng/common/templates/post-build/channels/internal-servicing.yml +++ b/eng/common/templates/post-build/channels/internal-servicing.yml @@ -7,9 +7,7 @@ parameters: stages: - stage: IS_Publish - dependsOn: - - ${{ each depend in parameters.dependsOn }}: - - ${{ depend }} + dependsOn: ${{ parameters.dependsOn }} variables: - template: ../common-variables.yml displayName: Internal Servicing diff --git a/eng/common/templates/post-build/channels/netcore-dev-5.yml b/eng/common/templates/post-build/channels/netcore-dev-5.yml index fb1ce902153..c2105e3ed8d 100644 --- a/eng/common/templates/post-build/channels/netcore-dev-5.yml +++ b/eng/common/templates/post-build/channels/netcore-dev-5.yml @@ -7,10 +7,7 @@ parameters: stages: - stage: NetCore_Dev5_Publish - dependsOn: - - ${{ each depend in parameters.dependsOn }}: - - ${{ depend }} - + dependsOn: ${{}} parameters.dependsOn }} variables: - template: ../common-variables.yml displayName: .NET Core 5 Dev Channel diff --git a/eng/common/templates/post-build/channels/netcore-tools-latest.yml b/eng/common/templates/post-build/channels/netcore-tools-latest.yml index 46b21831444..2a1fbd44f62 100644 --- a/eng/common/templates/post-build/channels/netcore-tools-latest.yml +++ b/eng/common/templates/post-build/channels/netcore-tools-latest.yml @@ -7,9 +7,7 @@ parameters: stages: - stage: NetCore_Tools_Latest_Publish - dependsOn: - - ${{ each depend in parameters.dependsOn }}: - - ${{ depend }} + dependsOn: ${{ parameters.dependsOn }} variables: - template: ../common-variables.yml displayName: .NET Tools - Latest diff --git a/eng/common/templates/post-build/channels/public-dev-release.yml b/eng/common/templates/post-build/channels/public-dev-release.yml index d131f36b2ef..114bad21aa2 100644 --- a/eng/common/templates/post-build/channels/public-dev-release.yml +++ b/eng/common/templates/post-build/channels/public-dev-release.yml @@ -7,9 +7,7 @@ parameters: stages: - stage: Publish - dependsOn: - - ${{ each depend in parameters.dependsOn }}: - - ${{ depend }} + dependsOn: ${{ parameters.dependsOn }} variables: - template: ../common-variables.yml displayName: Developer Channel diff --git a/eng/common/templates/post-build/channels/public-release.yml b/eng/common/templates/post-build/channels/public-release.yml index dc2d3e9a135..68e78262e1b 100644 --- a/eng/common/templates/post-build/channels/public-release.yml +++ b/eng/common/templates/post-build/channels/public-release.yml @@ -7,9 +7,7 @@ parameters: stages: - stage: PubRel_Publish - dependsOn: - - ${{ each depend in parameters.dependsOn }}: - - ${{ depend }} + dependsOn: ${{ parameters.dependsOn }} variables: - template: ../common-variables.yml displayName: Public Release diff --git a/eng/common/templates/post-build/channels/public-validation-release.yml b/eng/common/templates/post-build/channels/public-validation-release.yml index f3b5918bb44..1f5ad3875e2 100644 --- a/eng/common/templates/post-build/channels/public-validation-release.yml +++ b/eng/common/templates/post-build/channels/public-validation-release.yml @@ -5,10 +5,7 @@ parameters: stages: - stage: PVR_Publish - dependsOn: - - ${{ each depend in parameters.dependsOn }}: - - ${{ depend }} - + dependsOn: ${{ parameters.dependsOn }} variables: - template: ../common-variables.yml displayName: Validation Channel diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 536ed565f48..f5f8061f513 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -117,15 +117,14 @@ stages: - template: \eng\common\templates\post-build\channels\public-validation-release.yml parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} dependsOn: ${{ parameters.publishDependsOn }} - template: \eng\common\templates\post-build\channels\public-release.yml parameters: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - dependsOn: - - ${{ each dependsOnJob in parameters.publishDependsOn }}: - - ${{ dependsOnJob }} + dependsOn: ${{ parameters.publishDependsOn }} - template: \eng\common\templates\post-build\channels\internal-servicing.yml parameters: From 69f2d2e19fc8e1a30f0df2ec925de10ee4ccc123 Mon Sep 17 00:00:00 2001 From: Christopher Costa Date: Mon, 19 Aug 2019 09:40:39 -0700 Subject: [PATCH 06/13] Fix formatting --- eng/common/templates/post-build/channels/netcore-dev-5.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/templates/post-build/channels/netcore-dev-5.yml b/eng/common/templates/post-build/channels/netcore-dev-5.yml index c2105e3ed8d..bd19e38b8ed 100644 --- a/eng/common/templates/post-build/channels/netcore-dev-5.yml +++ b/eng/common/templates/post-build/channels/netcore-dev-5.yml @@ -7,7 +7,7 @@ parameters: stages: - stage: NetCore_Dev5_Publish - dependsOn: ${{}} parameters.dependsOn }} + dependsOn: ${{ parameters.dependsOn }} variables: - template: ../common-variables.yml displayName: .NET Core 5 Dev Channel From c2f4960702ff016a59032ffd4f2f079461012364 Mon Sep 17 00:00:00 2001 From: Christopher Costa Date: Mon, 19 Aug 2019 09:49:52 -0700 Subject: [PATCH 07/13] script cleanup --- eng/update-packagesource.ps1 | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/eng/update-packagesource.ps1 b/eng/update-packagesource.ps1 index 132d3a1ddaf..c76c36ee2d3 100644 --- a/eng/update-packagesource.ps1 +++ b/eng/update-packagesource.ps1 @@ -6,7 +6,6 @@ Param( $ErrorActionPreference = "Stop" . $PSScriptRoot\common\tools.ps1 -$LocalNugetConfigSourceName = "arcade-local" # Batch and executable files exit and define $LASTEXITCODE. Powershell commands exit and define $? function CheckExitCode ([string]$stage, [bool]$commandExitCode = $True) @@ -23,7 +22,7 @@ function CheckExitCode ([string]$stage, [bool]$commandExitCode = $True) } if ($exitCode -ne 0) { - Write-Host "Something failed in stage: '$stage'. Check for errors above. Exiting now with exit code $exitCode..." + Write-PipelineTelemetryError -Category "UpdatePackageSource" -Message "Something failed in stage: '$stage'. Check for errors above. Exiting now with exit code $exitCode..." ExitWithExitCode $exitCode } } @@ -39,13 +38,12 @@ function StopDotnetIfRunning function AddSourceToNugetConfig([string]$nugetConfigPath, [string]$source) { Write-Host "Adding '$source' to '$nugetConfigPath'..." - $nugetConfig = New-Object XML $nugetConfig.PreserveWhitespace = $true $nugetConfig.Load($nugetConfigPath) $packageSources = $nugetConfig.SelectSingleNode("//packageSources") $keyAttribute = $nugetConfig.CreateAttribute("key") - $keyAttribute.Value = $LocalNugetConfigSourceName + $keyAttribute.Value = "arcade-local" $valueAttribute = $nugetConfig.CreateAttribute("value") $valueAttribute.Value = $source $newSource = $nugetConfig.CreateElement("add") @@ -57,29 +55,23 @@ function AddSourceToNugetConfig([string]$nugetConfigPath, [string]$source) try { Push-Location $PSScriptRoot + $nugetConfigPath = Join-Path $RepoRoot "NuGet.config" - $nugetConfigPath = Join-Path $RepoRoot "NuGet.config" - + Write-Host "Adding local source to NuGet.config" AddSourceToNugetConfig $nugetConfigPath $packagesSource CheckExitCode "Adding source to NuGet.config" $? - Write-Host "Updating Dependencies using Darc..." - + Write-Host "Updating dependencies using Darc..." . .\common\darc-init.ps1 CheckExitCode "Running darc-init" - $DarcExe = "$env:USERPROFILE\.dotnet\tools" $DarcExe = Resolve-Path $DarcExe - & $DarcExe\darc.exe update-dependencies --packages-folder $packagesSource --password $barToken --github-pat $gitHubPat --channel ".NET Tools - Latest" CheckExitCode "Updating dependencies" - StopDotnetIfRunning - } catch { - Write-Host $_ - Write-Host $_.Exception Write-Host $_.ScriptStackTrace + Write-PipelineTelemetryError -Category "UpdatePackageSource" -Message $_ ExitWithExitCode 1 } finally { @@ -87,3 +79,4 @@ finally { StopDotnetIfRunning Pop-Location } +ExitWithExitCode 0 \ No newline at end of file From 28999ae9cc0b0318cccb00429ad29f9bd0f2d816 Mon Sep 17 00:00:00 2001 From: Christopher Costa Date: Tue, 20 Aug 2019 16:28:07 -0700 Subject: [PATCH 08/13] update arcade sdk version --- global.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index 032e2ad8622..b5835e91d40 100644 --- a/global.json +++ b/global.json @@ -3,7 +3,7 @@ "dotnet": "3.0.100-preview6-012264" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19419.12", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19419.12" + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19420.6", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19420.6" } } From 5d4b44596dc23deea074b277e00d4cbf7b257139 Mon Sep 17 00:00:00 2001 From: Christopher Costa Date: Mon, 26 Aug 2019 13:00:05 -0700 Subject: [PATCH 09/13] fix casing --- azure-pipelines.yml | 14 +++++++------- eng/common/templates/post-build/post-build.yml | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a0be520a1d5..6406d30a1b7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,7 +22,7 @@ resources: image: microsoft/dotnet-buildtools-prereqs:ubuntu-14.04-cross-0cd4667-20170319080304 stages: -- stage: build +- stage: Build displayName: Build jobs: - template: /eng/common/templates/jobs/jobs.yml @@ -86,8 +86,8 @@ stages: displayName: Unix Build / Publish - ${{ if eq(variables._RunAsPublic, True) }}: - - stage: test - dependsOn: build + - stage: Test + dependsOn: Build jobs: - template: /eng/common/templates/jobs/jobs.yml parameters: @@ -151,9 +151,9 @@ stages: HelixAccessToken: '' - ${{ if eq(variables._RunAsInternal, True) }}: - - stage: validatesdk + - stage: ValidateSdk displayName: Validate Arcade SDK - dependsOn: build + dependsOn: Build jobs: - template: /eng/validate-sdk.yml parameters: @@ -171,8 +171,8 @@ stages: # enabled back once this issue is resolved: https://github.com/dotnet/arcade/issues/2912 enableSourceLinkValidation: false publishDependsOn: - - validate - - validatesdk + - Validate + - ValidateSdk # This is to enable SDL runs part of Post-Build Validation Stage SDLValidationParameters: enable: true diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index e67818f91c9..03f9aced18e 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -16,12 +16,12 @@ parameters: # Which stages should finish execution before post-build stages start validateDependsOn: - - build + - Build publishDependsOn: - - validate + - Validate stages: -- stage: validate +- stage: alidate dependsOn: ${{ parameters.validateDependsOn }} displayName: Validate jobs: From 5e6e84714e4f594e30da68ed9e8a7faf8a8f5bf3 Mon Sep 17 00:00:00 2001 From: Christopher Costa Date: Mon, 26 Aug 2019 13:01:42 -0700 Subject: [PATCH 10/13] fix casing --- eng/common/templates/post-build/channels/internal-servicing.yml | 2 +- eng/common/templates/post-build/channels/netcore-dev-5.yml | 2 +- .../templates/post-build/channels/netcore-tools-latest.yml | 2 +- eng/common/templates/post-build/channels/public-dev-release.yml | 2 +- eng/common/templates/post-build/channels/public-release.yml | 2 +- .../templates/post-build/channels/public-validation-release.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/common/templates/post-build/channels/internal-servicing.yml b/eng/common/templates/post-build/channels/internal-servicing.yml index a1b7266fdb1..a7c67c937f8 100644 --- a/eng/common/templates/post-build/channels/internal-servicing.yml +++ b/eng/common/templates/post-build/channels/internal-servicing.yml @@ -1,6 +1,6 @@ parameters: dependsOn: - - validate + - Validate enableSymbolValidation: true symbolPublishingAdditionalParameters: '' artifactsPublishingAdditionalParameters: '' diff --git a/eng/common/templates/post-build/channels/netcore-dev-5.yml b/eng/common/templates/post-build/channels/netcore-dev-5.yml index 2af022a3b26..0a02d5f5841 100644 --- a/eng/common/templates/post-build/channels/netcore-dev-5.yml +++ b/eng/common/templates/post-build/channels/netcore-dev-5.yml @@ -1,6 +1,6 @@ parameters: dependsOn: - - validate + - Validate enableSymbolValidation: true symbolPublishingAdditionalParameters: '' artifactsPublishingAdditionalParameters: '' diff --git a/eng/common/templates/post-build/channels/netcore-tools-latest.yml b/eng/common/templates/post-build/channels/netcore-tools-latest.yml index 422ee574781..8810e4268a0 100644 --- a/eng/common/templates/post-build/channels/netcore-tools-latest.yml +++ b/eng/common/templates/post-build/channels/netcore-tools-latest.yml @@ -1,6 +1,6 @@ parameters: dependsOn: - - validate + - Validate enableSymbolValidation: true symbolPublishingAdditionalParameters: '' artifactsPublishingAdditionalParameters: '' diff --git a/eng/common/templates/post-build/channels/public-dev-release.yml b/eng/common/templates/post-build/channels/public-dev-release.yml index fda3d0dfe4f..b5c12bef820 100644 --- a/eng/common/templates/post-build/channels/public-dev-release.yml +++ b/eng/common/templates/post-build/channels/public-dev-release.yml @@ -1,6 +1,6 @@ parameters: dependsOn: - - validate + - Validate enableSymbolValidation: true symbolPublishingAdditionalParameters: '' artifactsPublishingAdditionalParameters: '' diff --git a/eng/common/templates/post-build/channels/public-release.yml b/eng/common/templates/post-build/channels/public-release.yml index 85eb0eb94c0..9b763a8f6e2 100644 --- a/eng/common/templates/post-build/channels/public-release.yml +++ b/eng/common/templates/post-build/channels/public-release.yml @@ -1,6 +1,6 @@ parameters: dependsOn: - - validate + - Validate enableSymbolValidation: true symbolPublishingAdditionalParameters: '' artifactsPublishingAdditionalParameters: '' diff --git a/eng/common/templates/post-build/channels/public-validation-release.yml b/eng/common/templates/post-build/channels/public-validation-release.yml index 6a94f24849f..28a747d27fa 100644 --- a/eng/common/templates/post-build/channels/public-validation-release.yml +++ b/eng/common/templates/post-build/channels/public-validation-release.yml @@ -1,7 +1,7 @@ parameters: artifactsPublishingAdditionalParameters: '' dependsOn: - - validate + - Validate publishInstallersAndChecksums: false stages: From ce0e870632fe0ca42fdedd94c3042d56a0db57c2 Mon Sep 17 00:00:00 2001 From: Christopher Costa Date: Mon, 26 Aug 2019 13:03:18 -0700 Subject: [PATCH 11/13] fix casing --- eng/common/templates/post-build/post-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 03f9aced18e..bd05bc8df9b 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -21,7 +21,7 @@ parameters: - Validate stages: -- stage: alidate +- stage: Validate dependsOn: ${{ parameters.validateDependsOn }} displayName: Validate jobs: From d7b1b20c2cc95a6dafa091d92a826a5713955806 Mon Sep 17 00:00:00 2001 From: Christopher Costa Date: Mon, 9 Sep 2019 09:53:41 -0700 Subject: [PATCH 12/13] Fix bad merge --- Documentation/AzureDevOps/TemplateSchema.md | 6 +++++- eng/common/templates/job/job.yml | 8 -------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Documentation/AzureDevOps/TemplateSchema.md b/Documentation/AzureDevOps/TemplateSchema.md index 0d15a106dd1..c304c87dd86 100644 --- a/Documentation/AzureDevOps/TemplateSchema.md +++ b/Documentation/AzureDevOps/TemplateSchema.md @@ -36,7 +36,11 @@ parameters: # additional parameters artifacts: { artifactsReference } - enableMicrobuild: boolean # 'true' if Microbuild plugin should be installed for internal builds. + # 'true' if Microbuild plugin should be installed for internal builds. + # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix + # _TeamName - the name of your team + # _SignType - 'test' or 'real' + enableMicrobuild: boolean enablePublishBuildArtifacts: boolean # deprecated (replaced by 'artifacts' parameter). Enables publishing build logs as an Azure DevOps artifact. enablePublishBuildAssets: boolean # deprecated (replaced by 'artifacts' parameter). Enables publishing asset manifests as an Azure DevOps artifact. enablePublishUsingPipelines: boolean # prevent gather / push manifest from executing when using publishing pipelines diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index a7f812f531b..8e973c0f082 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -16,17 +16,9 @@ parameters: variables: [] workspace: '' -<<<<<<< HEAD # Job base template specific parameters # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md artifacts: '' -======= - # Job base template specific parameters - # Optional: Enable installing Microbuild plugin - # if 'true', these "variables" must be specified in the variables object or as part of the queue matrix - # _TeamName - the name of your team - # _SignType - 'test' or 'real' ->>>>>>> 92c97296945e2e8bde147586cf7d142988719171 enableMicrobuild: false enablePublishBuildArtifacts: false enablePublishBuildAssets: false From 6b73ee63315a7754cb2a43eeb9454466ed76f672 Mon Sep 17 00:00:00 2001 From: Christopher Costa Date: Mon, 9 Sep 2019 13:34:25 -0700 Subject: [PATCH 13/13] Fix dependencies casing --- eng/common/templates/post-build/channels/netcore-dev-30.yml | 2 +- eng/common/templates/post-build/channels/netcore-dev-31.yml | 2 +- eng/common/templates/post-build/channels/netcore-dev-5.yml | 2 +- .../templates/post-build/channels/netcore-internal-30.yml | 2 +- .../templates/post-build/channels/netcore-release-30.yml | 2 +- .../templates/post-build/channels/netcore-release-31.yml | 2 +- .../templates/post-build/channels/netcore-tools-latest.yml | 2 +- .../post-build/channels/public-validation-release.yml | 2 +- eng/common/templates/post-build/post-build.yml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/eng/common/templates/post-build/channels/netcore-dev-30.yml b/eng/common/templates/post-build/channels/netcore-dev-30.yml index 8c1f1e81229..fcab0b9e5d7 100644 --- a/eng/common/templates/post-build/channels/netcore-dev-30.yml +++ b/eng/common/templates/post-build/channels/netcore-dev-30.yml @@ -1,7 +1,7 @@ parameters: artifactsPublishingAdditionalParameters: '' dependsOn: - - validate + - Validate publishInstallersAndChecksums: false symbolPublishingAdditionalParameters: '' diff --git a/eng/common/templates/post-build/channels/netcore-dev-31.yml b/eng/common/templates/post-build/channels/netcore-dev-31.yml index c3b4ebccac4..44c69a286f6 100644 --- a/eng/common/templates/post-build/channels/netcore-dev-31.yml +++ b/eng/common/templates/post-build/channels/netcore-dev-31.yml @@ -1,7 +1,7 @@ parameters: artifactsPublishingAdditionalParameters: '' dependsOn: - - validate + - Validate publishInstallersAndChecksums: false symbolPublishingAdditionalParameters: '' diff --git a/eng/common/templates/post-build/channels/netcore-dev-5.yml b/eng/common/templates/post-build/channels/netcore-dev-5.yml index 97fc2698b8f..bd2cf144105 100644 --- a/eng/common/templates/post-build/channels/netcore-dev-5.yml +++ b/eng/common/templates/post-build/channels/netcore-dev-5.yml @@ -1,7 +1,7 @@ parameters: artifactsPublishingAdditionalParameters: '' dependsOn: - - validate + - Validate publishInstallersAndChecksums: false publishToAzureDevOpsFeeds: true symbolPublishingAdditionalParameters: '' diff --git a/eng/common/templates/post-build/channels/netcore-internal-30.yml b/eng/common/templates/post-build/channels/netcore-internal-30.yml index 2f9a1895dfb..f9ab8ba719c 100644 --- a/eng/common/templates/post-build/channels/netcore-internal-30.yml +++ b/eng/common/templates/post-build/channels/netcore-internal-30.yml @@ -1,7 +1,7 @@ parameters: artifactsPublishingAdditionalParameters: '' dependsOn: - - validate + - Validate symbolPublishingAdditionalParameters: '' stages: diff --git a/eng/common/templates/post-build/channels/netcore-release-30.yml b/eng/common/templates/post-build/channels/netcore-release-30.yml index 4eb543b454f..f7622043eef 100644 --- a/eng/common/templates/post-build/channels/netcore-release-30.yml +++ b/eng/common/templates/post-build/channels/netcore-release-30.yml @@ -1,7 +1,7 @@ parameters: artifactsPublishingAdditionalParameters: '' dependsOn: - - validate + - Validate symbolPublishingAdditionalParameters: '' stages: diff --git a/eng/common/templates/post-build/channels/netcore-release-31.yml b/eng/common/templates/post-build/channels/netcore-release-31.yml index e69d4563ba5..06337e66c9b 100644 --- a/eng/common/templates/post-build/channels/netcore-release-31.yml +++ b/eng/common/templates/post-build/channels/netcore-release-31.yml @@ -1,7 +1,7 @@ parameters: artifactsPublishingAdditionalParameters: '' dependsOn: - - validate + - Validate symbolPublishingAdditionalParameters: '' stages: diff --git a/eng/common/templates/post-build/channels/netcore-tools-latest.yml b/eng/common/templates/post-build/channels/netcore-tools-latest.yml index eca4392b314..b4958fcd8f6 100644 --- a/eng/common/templates/post-build/channels/netcore-tools-latest.yml +++ b/eng/common/templates/post-build/channels/netcore-tools-latest.yml @@ -1,7 +1,7 @@ parameters: artifactsPublishingAdditionalParameters: '' dependsOn: - - validate + - Validate publishInstallersAndChecksums: false publishToAzureDevOpsFeeds: true symbolPublishingAdditionalParameters: '' diff --git a/eng/common/templates/post-build/channels/public-validation-release.yml b/eng/common/templates/post-build/channels/public-validation-release.yml index 9759c888c87..0d7204c00c7 100644 --- a/eng/common/templates/post-build/channels/public-validation-release.yml +++ b/eng/common/templates/post-build/channels/public-validation-release.yml @@ -1,7 +1,7 @@ parameters: artifactsPublishingAdditionalParameters: '' dependsOn: - - validate + - Validate publishInstallersAndChecksums: false publishToAzureDevOpsFeeds: true diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 7748aeb6b92..8e1475881c6 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -20,10 +20,10 @@ parameters: validateDependsOn: - Build publishDependsOn: - - validate + - Validate stages: -- stage: validate +- stage: Validate dependsOn: ${{ parameters.validateDependsOn }} displayName: Validate jobs: