From 48111e7ebaa73ea207f230002099c626de5beaca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tom=C3=A1=C5=A1=20Rylek?= Date: Tue, 19 Nov 2019 00:55:22 +0100 Subject: [PATCH] Remove duplicate job.yml (#86) To simplify repo consolidation I temporarily kept a copy of the job.yml file under eng/pipelines/coreclr/templates. Now that we no longer need to maintain compatible YAML code across non-consolidated CoreCLR vs. consolidated runtime, we can finally remove this duplication. Thanks Tomas --- eng/pipelines/coreclr/templates/build-job.yml | 6 +- .../coreclr/templates/build-test-job.yml | 6 +- .../coreclr/templates/checkout-job.yml | 4 +- .../templates/crossgen-comparison-job.yml | 2 +- eng/pipelines/coreclr/templates/job.yml | 216 ------------------ eng/pipelines/coreclr/templates/perf-job.yml | 2 +- .../coreclr/templates/run-test-job.yml | 12 +- eng/pipelines/coreclr/templates/xplat-job.yml | 4 +- 8 files changed, 18 insertions(+), 234 deletions(-) delete mode 100644 eng/pipelines/coreclr/templates/job.yml diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml index 1ac2eb09bee..f3714ddf74a 100644 --- a/eng/pipelines/coreclr/templates/build-job.yml +++ b/eng/pipelines/coreclr/templates/build-job.yml @@ -156,7 +156,7 @@ jobs: condition: always() # Publish product output directory for consumption by tests. - - template: upload-artifact-step.yml + - template: /eng/pipelines/coreclr/templates/upload-artifact-step.yml parameters: rootFolder: $(buildProductRootFolderPath) includeRootFolder: false @@ -167,7 +167,7 @@ jobs: displayName: 'product build' # Publish test native components for consumption by test execution. - - template: upload-artifact-step.yml + - template: /eng/pipelines/coreclr/templates/upload-artifact-step.yml parameters: rootFolder: $(testNativeRootFolderPath) includeRootFolder: false @@ -178,7 +178,7 @@ jobs: displayName: 'native test components' # Publish test build root for consumption by test execution. - - template: upload-artifact-step.yml + - template: /eng/pipelines/coreclr/templates/upload-artifact-step.yml parameters: rootFolder: $(testBuildRootFolderPath) includeRootFolder: false diff --git a/eng/pipelines/coreclr/templates/build-test-job.yml b/eng/pipelines/coreclr/templates/build-test-job.yml index 4c0e90a4b55..b18c96ad7a8 100644 --- a/eng/pipelines/coreclr/templates/build-test-job.yml +++ b/eng/pipelines/coreclr/templates/build-test-job.yml @@ -72,7 +72,7 @@ jobs: # Download product binaries directory - - template: download-artifact-step.yml + - template: /eng/pipelines/coreclr/templates/download-artifact-step.yml parameters: unpackFolder: $(buildProductRootFolderPath) artifactFileName: '$(buildProductArtifactName)$(archiveExtension)' @@ -90,7 +90,7 @@ jobs: # Zip and publish managed test components - - template: upload-artifact-step.yml + - template: /eng/pipelines/coreclr/templates/upload-artifact-step.yml parameters: rootFolder: $(testRootFolderPath) includeRootFolder: false @@ -103,7 +103,7 @@ jobs: # Publish .packages/microsoft.net.sdk.il needed for traversing # test projects during the copynativeonly command in run test job. - - template: upload-artifact-step.yml + - template: /eng/pipelines/coreclr/templates/upload-artifact-step.yml parameters: rootFolder: $(microsoftNetSdkIlFolderPath) includeRootFolder: false diff --git a/eng/pipelines/coreclr/templates/checkout-job.yml b/eng/pipelines/coreclr/templates/checkout-job.yml index 69a6d0d2e99..07f9b847f5b 100644 --- a/eng/pipelines/coreclr/templates/checkout-job.yml +++ b/eng/pipelines/coreclr/templates/checkout-job.yml @@ -24,7 +24,7 @@ jobs: fetchDepth: 5 ### Zip up downloaded repo and publish to Helix - - template: upload-artifact-step.yml + - template: /eng/pipelines/coreclr/templates/upload-artifact-step.yml parameters: displayName: 'GIT repository (Windows)' rootFolder: $(Build.SourcesDirectory) @@ -53,7 +53,7 @@ jobs: fetchDepth: 5 ### Zip up downloaded repo and publish to Helix - - template: upload-artifact-step.yml + - template: /eng/pipelines/coreclr/templates/upload-artifact-step.yml parameters: displayName: 'GIT repository (Unix)' rootFolder: $(Build.SourcesDirectory) diff --git a/eng/pipelines/coreclr/templates/crossgen-comparison-job.yml b/eng/pipelines/coreclr/templates/crossgen-comparison-job.yml index 1faa94d9a70..a78f8a2f76c 100644 --- a/eng/pipelines/coreclr/templates/crossgen-comparison-job.yml +++ b/eng/pipelines/coreclr/templates/crossgen-comparison-job.yml @@ -66,7 +66,7 @@ jobs: steps: # Download product build - - template: download-artifact-step.yml + - template: /eng/pipelines/coreclr/templates/download-artifact-step.yml parameters: unpackFolder: $(buildProductRootFolderPath) artifactFileName: '$(buildProductArtifactName)$(archiveExtension)' diff --git a/eng/pipelines/coreclr/templates/job.yml b/eng/pipelines/coreclr/templates/job.yml deleted file mode 100644 index ecebd0f03eb..00000000000 --- a/eng/pipelines/coreclr/templates/job.yml +++ /dev/null @@ -1,216 +0,0 @@ -# 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: '' - container: '' - continueOnError: false - dependsOn: '' - displayName: '' - pool: '' - steps: [] - strategy: '' - timeoutInMinutes: '' - variables: [] - workspace: '' - -# Job base template specific parameters - # See schema documentation - https://github.com/dotnet/arcade/blob/master/Documentation/AzureDevOps/TemplateSchema.md - artifacts: '' - enableMicrobuild: false - enablePublishBuildArtifacts: false - enablePublishBuildAssets: false - enablePublishTestResults: false - enablePublishUsingPipelines: false - name: '' - preSteps: [] - runAsPublic: false - -jobs: -- job: ${{ parameters.name }} - - ${{ if ne(parameters.cancelTimeoutInMinutes, '') }}: - cancelTimeoutInMinutes: ${{ parameters.cancelTimeoutInMinutes }} - - ${{ if ne(parameters.condition, '') }}: - condition: ${{ parameters.condition }} - - ${{ if ne(parameters.container, '') }}: - container: ${{ parameters.container }} - - ${{ if ne(parameters.continueOnError, '') }}: - continueOnError: ${{ parameters.continueOnError }} - - ${{ if ne(parameters.dependsOn, '') }}: - dependsOn: ${{ parameters.dependsOn }} - - ${{ if ne(parameters.displayName, '') }}: - displayName: ${{ parameters.displayName }} - - ${{ if ne(parameters.pool, '') }}: - pool: ${{ parameters.pool }} - - ${{ if ne(parameters.strategy, '') }}: - strategy: ${{ parameters.strategy }} - - ${{ if ne(parameters.timeoutInMinutes, '') }}: - timeoutInMinutes: ${{ parameters.timeoutInMinutes }} - - variables: - - ${{ if ne(parameters.enableTelemetry, 'false') }}: - - name: DOTNET_CLI_TELEMETRY_PROFILE - value: '$(Build.Repository.Uri)' - - ${{ each variable in parameters.variables }}: - # handle name-value variable syntax - # example: - # - name: [key] - # value: [value] - - ${{ if ne(variable.name, '') }}: - - name: ${{ variable.name }} - value: ${{ variable.value }} - - # handle variable groups - - ${{ if ne(variable.group, '') }}: - - group: ${{ variable.group }} - - # handle key-value variable syntax. - # example: - # - [key]: [value] - - ${{ if and(eq(variable.name, ''), eq(variable.group, '')) }}: - - ${{ each pair in variable }}: - - name: ${{ pair.key }} - value: ${{ pair.value }} - - # DotNet-HelixApi-Access provides 'HelixApiAccessToken' for internal builds - - ${{ if and(eq(parameters.enableTelemetry, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - group: DotNet-HelixApi-Access - - ${{ if ne(parameters.workspace, '') }}: - workspace: ${{ parameters.workspace }} - - steps: - - ${{ if ne(parameters.preSteps, '') }}: - - ${{ each preStep in parameters.preSteps }}: - - ${{ preStep }} - - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - - task: MicroBuildSigningPlugin@2 - displayName: Install MicroBuild plugin - inputs: - signType: $(_SignType) - zipSources: false - feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json - env: - TeamName: $(_TeamName) - continueOnError: ${{ parameters.continueOnError }} - condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) - - - task: NuGetAuthenticate@0 - - - ${{ 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 }} - - - ${{ if eq(parameters.enableMicrobuild, 'true') }}: - - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - task: MicroBuildCleanup@1 - displayName: Execute Microbuild cleanup tasks - condition: and(always(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT')) - continueOnError: ${{ parameters.continueOnError }} - env: - TeamName: $(_TeamName) - - - ${{ 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: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)' ) }} - continueOnError: true - condition: always() - - - ${{ if eq(parameters.enablePublishTestResults, 'true') }}: - - task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFormat: 'xUnit' - testResultsFiles: '*.xml' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' - continueOnError: true - condition: always() - - - ${{ if and(eq(parameters.enablePublishBuildAssets, true), 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.StagingDirectory)/AssetManifests' - continueOnError: ${{ parameters.continueOnError }} - condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) - - - task: PublishBuildArtifacts@1 - displayName: Push Asset Manifests - inputs: - PathtoPublish: '$(Build.StagingDirectory)/AssetManifests' - PublishLocation: Container - ArtifactName: AssetManifests - continueOnError: ${{ parameters.continueOnError }} - condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true')) diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml index b63355ae619..2a19a90612d 100644 --- a/eng/pipelines/coreclr/templates/perf-job.yml +++ b/eng/pipelines/coreclr/templates/perf-job.yml @@ -45,7 +45,7 @@ jobs: # Download product binaries directory - - template: download-artifact-step.yml + - template: /eng/pipelines/coreclr/templates/download-artifact-step.yml parameters: unpackFolder: $(buildProductRootFolderPath) artifactFileName: '$(buildProductArtifactName)$(archiveExtension)' diff --git a/eng/pipelines/coreclr/templates/run-test-job.yml b/eng/pipelines/coreclr/templates/run-test-job.yml index 383bc6e4b35..2123c7d082e 100644 --- a/eng/pipelines/coreclr/templates/run-test-job.yml +++ b/eng/pipelines/coreclr/templates/run-test-job.yml @@ -102,7 +102,7 @@ jobs: # Download and unzip managed test artifacts - ${{ if ne(parameters.corefxTests, true) }}: - - template: download-artifact-step.yml + - template: /eng/pipelines/coreclr/templates/download-artifact-step.yml parameters: unpackFolder: '$(testRootFolderPath)' artifactFileName: '$(testArtifactName)$(archiveExtension)' @@ -112,7 +112,7 @@ jobs: # Download and unzip test build tree - ${{ if ne(parameters.corefxTests, true) }}: - - template: download-artifact-step.yml + - template: /eng/pipelines/coreclr/templates/download-artifact-step.yml parameters: unpackFolder: '$(testBuildRootFolderPath)' cleanUnpackFolder: false @@ -122,7 +122,7 @@ jobs: # Download product binaries directory - - template: download-artifact-step.yml + - template: /eng/pipelines/coreclr/templates/download-artifact-step.yml parameters: unpackFolder: $(buildProductRootFolderPath) artifactFileName: '$(buildProductArtifactName)$(archiveExtension)' @@ -133,7 +133,7 @@ jobs: # Download and unzip the Microsoft.NET.Sdk.IL package needed for traversing # ilproj test projects during copynativeonly. - ${{ if ne(parameters.corefxTests, true) }}: - - template: download-artifact-step.yml + - template: /eng/pipelines/coreclr/templates/download-artifact-step.yml parameters: unpackFolder: '$(microsoftNetSdkIlFolderPath)' artifactFileName: '$(microsoftNetSdkIlArtifactName)$(archiveExtension)' @@ -143,7 +143,7 @@ jobs: # Download and unzip native test artifacts - ${{ if ne(parameters.corefxTests, true) }}: - - template: download-artifact-step.yml + - template: /eng/pipelines/coreclr/templates/download-artifact-step.yml parameters: unpackFolder: '$(testNativeRootFolderPath)' artifactFileName: '$(testNativeArtifactName)$(archiveExtension)' @@ -182,7 +182,7 @@ jobs: # Send tests to Helix - - template: send-to-helix-step.yml + - template: /eng/pipelines/coreclr/templates/send-to-helix-step.yml parameters: displayName: Send tests to Helix buildConfig: $(buildConfigUpper) diff --git a/eng/pipelines/coreclr/templates/xplat-job.yml b/eng/pipelines/coreclr/templates/xplat-job.yml index e875c640874..77541e161fa 100644 --- a/eng/pipelines/coreclr/templates/xplat-job.yml +++ b/eng/pipelines/coreclr/templates/xplat-job.yml @@ -22,7 +22,7 @@ parameters: variables: {} ## any extra variables to add to the defaults defined below jobs: -- template: job.yml +- template: /eng/common/templates/job/job.yml parameters: name: ${{ parameters.name }} @@ -168,7 +168,7 @@ jobs: clean: true # Download the GIT repository - - template: download-artifact-step.yml + - template: /eng/pipelines/coreclr/templates/download-artifact-step.yml parameters: displayName: 'GIT repository' cleanUnpackFolder: false -- 2.34.1