# Build and test Core project. name: $(FileVersion).$(Year:yy)$(DayOfYear).$(Rev:r) trigger: batch: true branches: include: - main - dev paths: include: - '*' exclude: - .github/* - .devcontainer/* - docs/* - CODE_OF_CONDUCT.md - README.md - SECURITY.md - LICENSE.TXT - THIRD-PARTY-NOTICES.TXT pr: branches: include: - main - dev paths: include: - '*' exclude: - .github/* - .devcontainer/* - docs/* - CODE_OF_CONDUCT.md - README.md - SECURITY.md - LICENSE.TXT - THIRD-PARTY-NOTICES.TXT variables: - template: /eng/pipelines/common-variables.yml@self - template: /eng/pipelines/common/version.yml@self - name: _BuildConfig value: Release - name: Build.Arcade.ArtifactsPath value: $(Build.SourcesDirectory)/artifacts/ - name: Build.Arcade.LogsPath value: $(Build.Arcade.ArtifactsPath)log/$(_BuildConfig)/ - name: Build.Arcade.TestResultsPath value: $(Build.Arcade.ArtifactsPath)TestResults/$(_BuildConfig)/ # Produce test-signed build for PR and Public builds - ${{ if or(eq(variables['_RunAsPublic'], 'true'), eq(variables['Build.Reason'], 'PullRequest')) }}: # needed for darc (dependency flow) publishing - name: _PublishArgs value: '' - name: _OfficialBuildIdArgs value: '' # needed for signing - name: _SignType value: test - name: _SignArgs value: '' - name: _Sign value: false # Set up non-PR build from internal project - ${{ if and(ne(variables['_RunAsPublic'], 'true'), ne(variables['Build.Reason'], 'PullRequest')) }}: # needed for darc (dependency flow) publishing - name: _PublishArgs value: >- /p:DotNetPublishUsingPipelines=true - name: _OfficialBuildIdArgs value: /p:OfficialBuildId=$(BUILD.BUILDNUMBER) # needed for signing - name: _SignType value: real - name: _SignArgs value: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) /p:Sign=$(_Sign) /p:DotNetPublishUsingPipelines=true - name: _Sign value: true resources: repositories: - repository: 1ESPipelineTemplates type: git name: 1ESPipelineTemplates/1ESPipelineTemplates ref: refs/tags/release extends: template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates parameters: sdl: eslint: enabled: false justificationForDisabling: 'see https://portal.microsofticm.com/imp/v3/incidents/incident/482258316/summary' sourceAnalysisPool: name: NetCore1ESPool-Internal image: windows.vs2022preview.amd64 os: windows stages: # ---------------------------------------------------------------- # This stage performs build, test, packaging # ---------------------------------------------------------------- - stage: build displayName: Build jobs: - template: /eng/common/templates-official/jobs/jobs.yml@self parameters: enableMicrobuild: true # Publish NuGet packages using v3 # https://github.com/dotnet/arcade/blob/main/Documentation/CorePackages/Publishing.md#basic-onboarding-scenario-for-new-repositories-to-the-current-publishing-version-v3 enablePublishUsingPipelines: true enablePublishBuildAssets: true enableTelemetry: true enableSourceIndex: false # Publish build logs enablePublishBuildArtifacts: true # Publish test logs enablePublishTestResults: true workspace: clean: all jobs: - job: Windows # timeout accounts for wait times for helix agents up to 30mins timeoutInMinutes: 60 pool: name: NetCore1ESPool-Internal image: windows.vs2022preview.amd64 os: windows variables: - name: _buildScript value: $(Build.SourcesDirectory)/build.cmd -ci preSteps: - checkout: self fetchDepth: 1 clean: true steps: - template: /eng/pipelines/templates/BuildAndTest.yml parameters: dotnetScript: $(Build.SourcesDirectory)/dotnet.cmd buildScript: $(_buildScript) buildConfig: $(_BuildConfig) repoArtifactsPath: $(Build.Arcade.ArtifactsPath) repoLogPath: $(Build.Arcade.LogsPath) repoTestResultsPath: $(Build.Arcade.TestResultsPath) isWindows: true - ${{ if and(notin(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}: - template: /eng/common/templates-official/job/onelocbuild.yml@self parameters: LclSource: lclFilesfromPackage LclPackageId: 'LCL-JUNO-PROD-ASPIRE' MirrorRepo: aspire MirrorBranch: main - template: /eng/common/templates-official/post-build/post-build.yml@self parameters: validateDependsOn: - build publishingInfraVersion: 3 enableSymbolValidation: false enableSigningValidation: false enableNugetValidation: false enableSourceLinkValidation: false # these param values come from the DotNet-Winforms-SDLValidation-Params azdo variable group SDLValidationParameters: enable: false params: ' -SourceToolsList $(_TsaSourceToolsList) -TsaInstanceURL $(_TsaInstanceURL) -TsaProjectName $(_TsaProjectName) -TsaNotificationEmail $(_TsaNotificationEmail) -TsaCodebaseAdmin $(_TsaCodebaseAdmin) -TsaBugAreaPath $(_TsaBugAreaPath) -TsaIterationPath $(_TsaIterationPath) -TsaRepositoryName $(_TsaRepositoryName) -TsaCodebaseName $(_TsaCodebaseName) -TsaOnboard $(_TsaOnboard) -TsaPublish $(_TsaPublish)'