diff --git a/.vsts-dotnet.yml b/.vsts-dotnet.yml index 2b25a6596dc..f7d99f9db49 100644 --- a/.vsts-dotnet.yml +++ b/.vsts-dotnet.yml @@ -1,8 +1,6 @@ trigger: - main - vs* -- exp/* -- perf/* # If defined here, these values are not overrideable # Once they exist, we should define these as "runtime parameters" @@ -16,6 +14,10 @@ parameters: displayName: Optional OptProfDrop Override type: string default: 'default' +- name: enableSigningValidation + displayName: Enable Signing Validation + type: boolean + default: true variables: # if OptProfDrop is not set, string '$(OptProfDrop)' will be passed to the build script. @@ -30,7 +32,7 @@ variables: # if OptProfDropName is set as a parameter, set OptProfDrop to the parameter and unset SourceBranch - ${{ if ne(parameters.OptProfDropName, 'default') }}: - name: OptProfDrop - value: ${{parameters.OptProfDropName}} + value: ${{ parameters.OptProfDropName }} - name: SourceBranch value: '' - name: EnableReleaseOneLocBuild @@ -69,267 +71,49 @@ extends: enabled: false stages: + - ${{ if or(startsWith(variables['Build.SourceBranch'], 'refs/heads/vs'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}: + - stage: localization + displayName: Localization + jobs: + # The localization setup for release/ branches. Note difference in LclPackageId. main branch is handled separately below. + # Used for vs17.2, vs17.4, vs17.6 etc. branches only. + # When the branch is setup for localization (the localization ticket needs to be created - https://aka.ms/ceChangeLocConfig, requesting change from one release branch to another), + # set 'EnableReleaseOneLocBuild' to true. + - ${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/vs') }}: + - template: /eng/common/templates-official/job/onelocbuild.yml@self + parameters: + MirrorRepo: 'msbuild' + LclSource: lclFilesfromPackage + LclPackageId: 'LCL-JUNO-PROD-MSBUILDREL' + MirrorBranch: ${{ replace(variables['Build.SourceBranch'], 'refs/heads/', '') }} + JobNameSuffix: '_release' + condition: ${{ variables.EnableReleaseOneLocBuild }} + # The localization setup for main branch. Note difference in package ID. Should not be used with release/ branches. + - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}: + - template: /eng/common/templates-official/job/onelocbuild.yml@self + parameters: + MirrorRepo: 'msbuild' + LclSource: lclFilesfromPackage + LclPackageId: 'LCL-JUNO-PROD-MSBUILD' + MirrorBranch: 'main' + JobNameSuffix: '_main' + condition: eq(variables['Build.SourceBranch'], 'refs/heads/main') + - stage: build displayName: Build - jobs: - # The localization setup for release/ branches. Note difference in LclPackageId. main branch is handled separately below. - # Used for vs17.2, vs17.4, vs17.6 etc. branches only. - # When the branch is setup for localization (the localization ticket needs to be created - https://aka.ms/ceChangeLocConfig, requesting change from one release branch to another), - # set 'EnableReleaseOneLocBuild' to true. - - ${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/vs') }}: - - template: /eng/common/templates-official/job/onelocbuild.yml@self - parameters: - MirrorRepo: 'msbuild' - LclSource: lclFilesfromPackage - LclPackageId: 'LCL-JUNO-PROD-MSBUILDREL' - MirrorBranch: ${{ replace(variables['Build.SourceBranch'], 'refs/heads/', '') }} - JobNameSuffix: '_release' - condition: ${{ variables.EnableReleaseOneLocBuild }} - # The localization setup for main branch. Note difference in package ID. Should not be used with release/ branches. - - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}: - - template: /eng/common/templates-official/job/onelocbuild.yml@self - parameters: - MirrorRepo: 'msbuild' - LclSource: lclFilesfromPackage - LclPackageId: 'LCL-JUNO-PROD-MSBUILD' - MirrorBranch: 'main' - JobNameSuffix: '_main' - condition: eq(variables['Build.SourceBranch'], 'refs/heads/main') - - - job: Windows_NT - pool: - name: VSEngSS-MicroBuild2022-1ES - demands: - - agent.os -equals Windows_NT - - timeoutInMinutes: 180 - - variables: - - group: Publish-Build-Assets - - name: TeamName - value: MSBuild - - name: VisualStudio.MajorVersion - value: 17 - - name: VisualStudio.ChannelName - value: 'int.d17.10' # MSBuild's vs17.10 branch corresponds to this VS channel - - name: VisualStudio.DropName - value: Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber) - - steps: - - task: NuGetToolInstaller@1 - displayName: 'Install NuGet.exe' - - pwsh: Get-MpComputerStatus - - - pwsh: Set-MpPreference -DisableRealtimeMonitoring $true - - - task: PowerShell@2 - displayName: Setup Private Feeds Credentials - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 - arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token - env: - Token: $(dn-bot-dnceng-artifact-feeds-rw) - - - task: NuGetCommand@2 - displayName: Restore internal tools - inputs: - command: restore - feedsToUse: config - restoreSolution: 'eng\common\internal\Tools.csproj' - nugetConfigPath: 'eng\common\internal\NuGet.config' - restoreDirectory: '$(Build.SourcesDirectory)\.packages' - - - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1 - inputs: - signType: $(SignType) - zipSources: false - condition: and(succeeded(), in(variables['SignType'], 'test', 'real')) - - - task: MicroBuildOptProfPlugin@6 - inputs: - ProfilingInputsDropName: '$(VisualStudio.DropName)' - ShouldSkipOptimize: true - AccessToken: '$(System.AccessToken)' - feedSource: 'https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json' - displayName: 'Install OptProf Plugin' - - # Required by MicroBuildBuildVSBootstrapper - - task: MicroBuildSwixPlugin@4 - inputs: - dropName: $(VisualStudio.DropName) - - - script: eng/CIBuild.cmd - -configuration $(BuildConfiguration) - -officialBuildId $(Build.BuildNumber) - -officialSkipApplyOptimizationData $(SkipApplyOptimizationData) - /p:RepositoryName=$(Build.Repository.Name) - /p:VisualStudioIbcSourceBranchName=$(SourceBranch) - /p:VisualStudioDropAccessToken=$(System.AccessToken) - /p:VisualStudioDropName=$(VisualStudio.DropName) - /p:DotNetSignType=$(SignType) - /p:TeamName=MSBuild - /p:DotNetPublishUsingPipelines=true - /p:VisualStudioIbcDrop=$(OptProfDrop) - /p:GenerateSbom=true - /p:SuppressFinalPackageVersion=$(IsExperimental) - displayName: Build - condition: succeeded() - - # Required by Microsoft policy - - template: eng\common\templates-official\steps\generate-sbom.yml@self - - # Publish OptProf configuration files - - task: 1ES.PublishArtifactsDrop@1 - inputs: - dropServiceURI: 'https://devdiv.artifacts.visualstudio.com' - buildNumber: 'ProfilingInputs/DevDiv/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber)' - sourcePath: '$(Build.SourcesDirectory)\artifacts\OptProf\$(BuildConfiguration)\Data' - toLowerCase: false - usePat: true - displayName: 'OptProf - Publish to Artifact Services - ProfilingInputs' - condition: succeeded() - - # Build VS bootstrapper - # Generates $(Build.StagingDirectory)\MicroBuild\Output\BootstrapperInfo.json - - task: MicroBuildBuildVSBootstrapper@3 - inputs: - vsMajorVersion: $(VisualStudio.MajorVersion) - channelName: $(VisualStudio.ChannelName) - manifests: $(VisualStudio.SetupManifestList) - outputFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion' - bootstrapperCoreVersion: - displayName: 'OptProf - Build VS bootstrapper' - condition: succeeded() - - # Publish run settings - - task: PowerShell@2 - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -configuration $(BuildConfiguration) - -task VisualStudio.BuildIbcTrainingSettings - /p:VisualStudioDropName=$(VisualStudio.DropName) - /p:BootstrapperInfoPath=$(Build.StagingDirectory)\MicroBuild\Output\BootstrapperInfo.json - /p:VisualStudioIbcTrainingSettingsPath=$(Build.SourcesDirectory)\eng\config\OptProf.runsettings - displayName: 'OptProf - Build IBC training settings' - condition: succeeded() - - # Publish bootstrapper info - - task: 1ES.PublishBuildArtifacts@1 - inputs: - PathtoPublish: $(Build.StagingDirectory)\MicroBuild\Output - ArtifactName: MicroBuildOutputs - ArtifactType: Container - displayName: 'OptProf - Publish Artifact: MicroBuildOutputs' - condition: succeeded() - - - task: 1ES.PublishBuildArtifacts@1 - displayName: 'Publish Artifact: logs' - inputs: - PathtoPublish: 'artifacts\log\$(BuildConfiguration)' - ArtifactName: logs - condition: succeededOrFailed() - - - task: 1ES.PublishPipelineArtifact@1 - displayName: 'Publish Artifact: bin' - inputs: - path: 'artifacts\bin' - artifactName: bin - condition: succeededOrFailed() - - # Publishes setup VSIXes to a drop. - # Note: The insertion tool looks for the display name of this task in the logs. - - task: 1ES.MicroBuildVstsDrop@1 - displayName: Upload VSTS Drop - inputs: - dropName: $(VisualStudio.DropName) - dropFolder: 'artifacts\VSSetup\$(BuildConfiguration)\Insertion' - dropRetentionDays: '30' # extended by insertion + VS release - accessToken: '$(System.AccessToken)' - dropServiceUri: 'https://devdiv.artifacts.visualstudio.com' - vsDropServiceUri: 'https://vsdrop.corp.microsoft.com/file/v1' - condition: succeeded() - - # Publish an artifact that the RoslynInsertionTool is able to find by its name. - - task: 1ES.PublishBuildArtifacts@1 - displayName: 'Publish Artifact: VSSetup' - inputs: - PathtoPublish: 'artifacts\VSSetup\$(BuildConfiguration)' - ArtifactName: VSSetup - condition: succeeded() - - # Archive NuGet packages to DevOps. - # Publish our NuPkgs as an artifact. The name of this artifact must be PackageArtifacts as the - # arcade templates depend on the name. - - task: 1ES.PublishBuildArtifacts@1 - displayName: 'Publish Artifact: packages' - inputs: - PathtoPublish: 'artifacts\packages\$(BuildConfiguration)' - ArtifactName: PackageArtifacts - condition: succeeded() - - # Publish "IntelliSense" XSD files to their own artifact - # so it can be consumed by the insertion-to-VS job - - task: 1ES.PublishPipelineArtifact@1 - displayName: 'Publish Artifact: xsd' - inputs: - path: 'artifacts\xsd' - artifactName: xsd - condition: succeeded() - - # Publish Asset Manifests for Build Asset Registry job - - task: 1ES.PublishBuildArtifacts@1 - displayName: Publish Asset Manifests - inputs: - PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/AssetManifest' - ArtifactName: AssetManifests - condition: succeeded() - - # Tag the build at the very end when we know it's been successful. - - task: colinsalmcorner.colinsalmcorner-buildtasks.tag-build-task.tagBuildOrRelease@0 - displayName: Tag build as ready for optimization training - inputs: - tags: 'ready-for-training' - condition: succeeded() - - - task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1 - displayName: Execute cleanup tasks - condition: succeededOrFailed() - - - template: /eng/common/templates-official/steps/component-governance.yml@self - parameters: - ${{ if or(startsWith(variables['Build.SourceBranch'], 'refs/heads/vs'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}: - disableComponentGovernance: false - ${{ else }}: - disableComponentGovernance: true - - - template: /eng/common/templates-official/jobs/source-build.yml@self - parameters: - platforms: - - name: Managed - pool: - name: AzurePipelines-EO - image: 1ESPT-Ubuntu22.04 - os: linux - - - template: /eng/common/templates-official/job/publish-build-assets.yml@self + - template: /azure-pipelines/.vsts-dotnet-build-jobs.yml@self parameters: - enablePublishBuildArtifacts: true - publishUsingPipelines: true - dependsOn: - - Windows_NT - - Source_Build_Managed - pool: - name: $(DncEngInternalBuildPool) - image: $(WindowsImage) - os: windows + isExperimental: false + enableComponentGovernance: true - - template: eng\common\templates-official\post-build\post-build.yml@self + - template: /eng/common/templates-official/post-build/post-build.yml@self parameters: publishingInfraVersion: 3 enableSymbolValidation: true enableSourceLinkValidation: false enableNugetValidation: false + enableSigningValidation: ${{ parameters.enableSigningValidation }} SDLValidationParameters: enable: true continueOnError: false diff --git a/azure-pipelines/.vsts-dotnet-build-jobs.yml b/azure-pipelines/.vsts-dotnet-build-jobs.yml new file mode 100644 index 00000000000..b5c4b65f34e --- /dev/null +++ b/azure-pipelines/.vsts-dotnet-build-jobs.yml @@ -0,0 +1,243 @@ +# Template for the main Windows_NT build job +parameters: +- name: isExperimental + type: boolean + default: false +- name: enableComponentGovernance + type: boolean + default: false + +jobs: +- job: Windows_NT + pool: + name: VSEngSS-MicroBuild2022-1ES + demands: + - agent.os -equals Windows_NT + + timeoutInMinutes: 180 + + variables: + - group: Publish-Build-Assets + - name: TeamName + value: MSBuild + - name: VisualStudio.MajorVersion + value: 17 + - name: VisualStudio.ChannelName + value: 'int.d17.10' # MSBuild's vs17.10 branch corresponds to this VS channel + - name: VisualStudio.DropName + value: Products/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber) + + steps: + - task: NuGetToolInstaller@1 + displayName: 'Install NuGet.exe' + - pwsh: Get-MpComputerStatus + + - pwsh: Set-MpPreference -DisableRealtimeMonitoring $true + + - task: PowerShell@2 + displayName: Setup Private Feeds Credentials + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 + arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token + env: + Token: $(dn-bot-dnceng-artifact-feeds-rw) + + + - task: NuGetCommand@2 + displayName: Restore internal tools + inputs: + command: restore + feedsToUse: config + restoreSolution: 'eng\common\internal\Tools.csproj' + nugetConfigPath: 'eng\common\internal\NuGet.config' + restoreDirectory: '$(Build.SourcesDirectory)\.packages' + + - task: MicroBuildSigningPlugin@4 + displayName: Install MicroBuild plugin + inputs: + signType: $(SignType) + zipSources: false + feedSource: https://devdiv.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json + ${{ if and(eq(variables['SignType'], 'real'), eq(variables['System.TeamProject'], 'DevDiv')) }}: + ConnectedPMEServiceName: 6cc74545-d7b9-4050-9dfa-ebefcc8961ea + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + condition: and(succeeded(), in(variables['SignType'], 'test', 'real')) + + - task: MicroBuildOptProfPlugin@6 + inputs: + ProfilingInputsDropName: '$(VisualStudio.DropName)' + ShouldSkipOptimize: true + AccessToken: '$(System.AccessToken)' + feedSource: 'https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json' + displayName: 'Install OptProf Plugin' + + # Required by MicroBuildBuildVSBootstrapper + - task: MicroBuildSwixPlugin@4 + inputs: + dropName: $(VisualStudio.DropName) + + - script: eng/CIBuild.cmd + -configuration $(BuildConfiguration) + -officialBuildId $(Build.BuildNumber) + -officialSkipApplyOptimizationData $(SkipApplyOptimizationData) + /p:RepositoryName=$(Build.Repository.Name) + /p:VisualStudioIbcSourceBranchName=$(SourceBranch) + /p:VisualStudioDropAccessToken=$(System.AccessToken) + /p:VisualStudioDropName=$(VisualStudio.DropName) + /p:DotNetSignType=$(SignType) + /p:TeamName=MSBuild + /p:DotNetPublishUsingPipelines=true + /p:VisualStudioIbcDrop=$(OptProfDrop) + /p:GenerateSbom=true + /p:SuppressFinalPackageVersion=${{ parameters.isExperimental }} + displayName: Build + condition: succeeded() + + # Required by Microsoft policy + - template: /eng/common/templates-official/steps/generate-sbom.yml@self + + # Publish OptProf configuration files + - task: 1ES.PublishArtifactsDrop@1 + inputs: + dropServiceURI: 'https://devdiv.artifacts.visualstudio.com' + buildNumber: 'ProfilingInputs/DevDiv/$(Build.Repository.Name)/$(Build.SourceBranchName)/$(Build.BuildNumber)' + sourcePath: '$(Build.SourcesDirectory)\artifacts\OptProf\$(BuildConfiguration)\Data' + toLowerCase: false + usePat: true + displayName: 'OptProf - Publish to Artifact Services - ProfilingInputs' + condition: succeeded() + + # Build VS bootstrapper + # Generates $(Build.StagingDirectory)\MicroBuild\Output\BootstrapperInfo.json + - task: MicroBuildBuildVSBootstrapper@3 + inputs: + vsMajorVersion: $(VisualStudio.MajorVersion) + channelName: $(VisualStudio.ChannelName) + manifests: $(VisualStudio.SetupManifestList) + outputFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(BuildConfiguration)\Insertion' + displayName: 'OptProf - Build VS bootstrapper' + condition: succeeded() + + # Publish run settings + - task: PowerShell@2 + inputs: + filePath: eng\common\sdk-task.ps1 + arguments: -configuration $(BuildConfiguration) + -task VisualStudio.BuildIbcTrainingSettings + /p:VisualStudioDropName=$(VisualStudio.DropName) + /p:BootstrapperInfoPath=$(Build.StagingDirectory)\MicroBuild\Output\BootstrapperInfo.json + /p:VisualStudioIbcTrainingSettingsPath=$(Build.SourcesDirectory)\eng\config\OptProf.runsettings + displayName: 'OptProf - Build IBC training settings' + condition: succeeded() + + # Publish bootstrapper info + - task: 1ES.PublishBuildArtifacts@1 + inputs: + PathtoPublish: $(Build.StagingDirectory)\MicroBuild\Output + ArtifactName: MicroBuildOutputs + ArtifactType: Container + displayName: 'OptProf - Publish Artifact: MicroBuildOutputs' + condition: succeeded() + + - task: 1ES.PublishBuildArtifacts@1 + displayName: 'Publish Artifact: logs' + inputs: + PathtoPublish: 'artifacts\log\$(BuildConfiguration)' + ArtifactName: logs + condition: succeededOrFailed() + + - task: 1ES.PublishPipelineArtifact@1 + displayName: 'Publish Artifact: bin' + inputs: + path: 'artifacts\bin' + artifactName: bin + condition: succeededOrFailed() + + # Publishes setup VSIXes to a drop. + # Note: The insertion tool looks for the display name of this task in the logs. + - task: 1ES.MicroBuildVstsDrop@1 + displayName: Upload VSTS Drop + inputs: + dropName: $(VisualStudio.DropName) + dropFolder: 'artifacts\VSSetup\$(BuildConfiguration)\Insertion' + dropRetentionDays: '30' # extended by insertion + VS release + accessToken: '$(System.AccessToken)' + dropServiceUri: 'https://devdiv.artifacts.visualstudio.com' + vsDropServiceUri: 'https://vsdrop.corp.microsoft.com/file/v1' + condition: succeeded() + + # Publish an artifact that the RoslynInsertionTool is able to find by its name. + - task: 1ES.PublishBuildArtifacts@1 + displayName: 'Publish Artifact: VSSetup' + inputs: + PathtoPublish: 'artifacts\VSSetup\$(BuildConfiguration)' + ArtifactName: VSSetup + condition: succeeded() + + # Archive NuGet packages to DevOps. + # Publish our NuPkgs as an artifact. The name of this artifact must be PackageArtifacts as the + # arcade templates depend on the name. + - task: 1ES.PublishBuildArtifacts@1 + displayName: 'Publish Artifact: packages' + inputs: + PathtoPublish: 'artifacts\packages\$(BuildConfiguration)' + ArtifactName: PackageArtifacts + condition: succeeded() + + # Publish "IntelliSense" XSD files to their own artifact + # so it can be consumed by the insertion-to-VS job + - task: 1ES.PublishPipelineArtifact@1 + displayName: 'Publish Artifact: xsd' + inputs: + path: 'artifacts\xsd' + artifactName: xsd + condition: succeeded() + + # Publish Asset Manifests for Build Asset Registry job + - task: 1ES.PublishBuildArtifacts@1 + displayName: Publish Asset Manifests + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(BuildConfiguration)/AssetManifest' + ArtifactName: AssetManifests + condition: succeeded() + + # Tag the build at the very end when we know it's been successful. + - task: colinsalmcorner.colinsalmcorner-buildtasks.tag-build-task.tagBuildOrRelease@0 + displayName: Tag build as ready for optimization training + inputs: + tags: 'ready-for-training' + condition: succeeded() + + - task: ms-vseng.MicroBuildTasks.521a94ea-9e68-468a-8167-6dcf361ea776.MicroBuildCleanup@1 + displayName: Execute cleanup tasks + condition: succeededOrFailed() + + - template: /eng/common/templates-official/steps/component-governance.yml@self + parameters: + ${{ if or(startsWith(variables['Build.SourceBranch'], 'refs/heads/vs'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}: + disableComponentGovernance: false + ${{ else }}: + disableComponentGovernance: true + +- template: /eng/common/templates-official/jobs/source-build.yml@self + parameters: + platforms: + - name: Managed + pool: + name: AzurePipelines-EO + image: 1ESPT-Ubuntu22.04 + os: linux + +- template: /eng/common/templates-official/job/publish-build-assets.yml@self + parameters: + enablePublishBuildArtifacts: true + publishUsingPipelines: true + dependsOn: + - Windows_NT + - Source_Build_Managed + pool: + name: $(DncEngInternalBuildPool) + image: $(WindowsImage) + os: windows + diff --git a/azure-pipelines/.vsts-dotnet-exp-perf.yml b/azure-pipelines/.vsts-dotnet-exp-perf.yml new file mode 100644 index 00000000000..33ea1e6fc91 --- /dev/null +++ b/azure-pipelines/.vsts-dotnet-exp-perf.yml @@ -0,0 +1,82 @@ +trigger: +- exp/* + +# If defined here, these values are not overrideable +# Once they exist, we should define these as "runtime parameters" +# https://github.com/Microsoft/azure-pipelines-yaml/pull/129 +# variables: +# SignType: test +# SkipApplyOptimizationData: false + +parameters: +- name: OptProfDropName + displayName: Optional OptProfDrop Override + type: string + default: 'default' +- name: enableSigningValidation + displayName: Enable Signing Validation + type: boolean + default: false + +variables: + # if OptProfDrop is not set, string '$(OptProfDrop)' will be passed to the build script. + - name: OptProfDrop + value: '' + - name: SourceBranch + value: $(IbcSourceBranchName) + # Use main as our optprof collection branch by default in exp branches. + - ${{ if not(startsWith(variables['Build.SourceBranch'], 'refs/heads/vs')) }}: + - name: SourceBranch + value: main + # if OptProfDropName is set as a parameter, set OptProfDrop to the parameter and unset SourceBranch + - ${{ if ne(parameters.OptProfDropName, 'default') }}: + - name: OptProfDrop + value: ${{parameters.OptProfDropName}} + - name: SourceBranch + value: '' + - name: Codeql.Enabled + value: false + - group: DotNet-MSBuild-SDLValidation-Params + - group: AzureDevOps-Artifact-Feeds-Pats + - name: cfsNugetWarnLevel + value: warn + - name: nugetMultiFeedWarnLevel + value: none + - name: NugetSecurityAnalysisWarningLevel + value: none + +resources: + repositories: + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + parameters: + featureFlags: + autoBaseline: true + pool: + name: VSEngSS-MicroBuild2022-1ES + os: windows + sdl: + # We generate SBOM ourselves, so don't need steps injected by 1ES. + sbom: + enabled: false + + stages: + - stage: build + displayName: Build + jobs: + - template: /azure-pipelines/.vsts-dotnet-build-jobs.yml@self + parameters: + isExperimental: true + enableComponentGovernance: false + + - template: /eng/common/templates/post-build/post-build.yml@self + parameters: + publishingInfraVersion: 3 + enableSymbolValidation: true + enableSourceLinkValidation: false + enableNugetValidation: false + enableSigningValidation: ${{ parameters.enableSigningValidation }} \ No newline at end of file diff --git a/azure-pipelines/vs-insertion-experimental.yml b/azure-pipelines/vs-insertion-experimental.yml index 0e248a57da9..5d0c0f1ef82 100644 --- a/azure-pipelines/vs-insertion-experimental.yml +++ b/azure-pipelines/vs-insertion-experimental.yml @@ -2,11 +2,21 @@ trigger: none name: $(Date:yyyyMMdd).$(Rev:r) +# Since our release branch is the one flowing into main +# we will keep our main experimental insertions to make sure everything is alright +schedules: + - cron: '0 3 * * 1,3,5' # Runs every Monday, Wednesday and Friday at 3AM UTC + displayName: Experimental VS insertion main + branches: + include: + - main + always: false # Don't run if there are no code changes + resources: pipelines: - - pipeline: 'MSBuild' + - pipeline: 'MSBuildExpPerf' project: 'DevDiv' - source: 'MSBuild' + source: 'MSBuild/MSBuild-ExpPerf' trigger: branches: include: @@ -33,6 +43,7 @@ parameters: - rel/d17.6 - rel/d17.3 - rel/d17.0 + - rel/d16.11 variables: - name: TeamName @@ -40,9 +51,9 @@ variables: - name: TeamEmail value: msbtm@microsoft.com - name: MSBuild_CI_BuildNumber - value: $(resources.pipeline.MSBuild.runName) + value: $(resources.pipeline.MSBuildExpPerf.runName) - name: MSBuild_CI_SourceVersion - value: $(resources.pipeline.MSBuild.sourceCommit) + value: $(resources.pipeline.MSBuildExpPerf.sourceCommit) - name: ArtifactPackagesPath value: $(Build.ArtifactStagingDirectory)/PackageArtifacts @@ -80,11 +91,11 @@ extends: templateContext: inputs: - input: pipelineArtifact - pipeline: 'MSBuild' + pipeline: 'MSBuildExpPerf' artifactName: 'xsd' targetPath: '$(Pipeline.Workspace)/xsd' - input: pipelineArtifact - pipeline: 'MSBuild' + pipeline: 'MSBuildExpPerf' artifactName: 'PackageArtifacts' targetPath: '$(Build.ArtifactStagingDirectory)/PackageArtifacts' # the CI build creates a sourcebuild intermediate package that is not signed, remove it to avoid warning from Guardian @@ -99,7 +110,7 @@ extends: targetType: inline script: | # Extract the last section after the last '/' - $fullBranch = "$(resources.pipeline.MSBuild.sourceBranch)" + $fullBranch = "$(resources.pipeline.MSBuildExpPerf.sourceBranch)" $branchSegments = $fullBranch -split '/' $branch = $branchSegments[-1] Write-Host "Setting drops branch to '$branch'" @@ -179,3 +190,4 @@ extends: InsertionReviewers: MSBuild CustomScriptExecutionCommand: $(InsertCustomScriptExecutionCommand) InsertionBuildPolicy: Request Perf DDRITs + diff --git a/eng/Versions.props b/eng/Versions.props index 89b4c4cb318..898568bb06e 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -2,7 +2,7 @@ - 17.10.41 + 17.10.42 release 17.8.3 15.1.0.0 diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh old mode 100755 new mode 100644 diff --git a/eng/common/post-build/nuget-validation.ps1 b/eng/common/post-build/nuget-validation.ps1 index dab3534ab53..5973bb05994 100644 --- a/eng/common/post-build/nuget-validation.ps1 +++ b/eng/common/post-build/nuget-validation.ps1 @@ -13,7 +13,7 @@ try { New-Item -ItemType 'directory' -Path ${ToolDestinationPath} -Force - Invoke-WebRequest $url -OutFile ${ToolDestinationPath}\verify.ps1 + Invoke-WebRequest $url -OutFile ${ToolDestinationPath}\verify.ps1 & ${ToolDestinationPath}\verify.ps1 ${PackagesPath}\*.nupkg } diff --git a/eng/common/tools.sh b/eng/common/tools.sh old mode 100755 new mode 100644