|
| 1 | +################################################################################# |
| 2 | +# OneBranch Pipelines - Official and CI # |
| 3 | +# This pipeline was created by EasyStart from a sample located at: # |
| 4 | +# https://aka.ms/obpipelines/easystart/samples # |
| 5 | +# Documentation: https://aka.ms/obpipelines # |
| 6 | +# Yaml Schema: https://aka.ms/obpipelines/yaml/schema # |
| 7 | +# Retail Tasks: https://aka.ms/obpipelines/tasks # |
| 8 | +# Support: https://aka.ms/onebranchsup # |
| 9 | +################################################################################# |
| 10 | + |
| 11 | +trigger: none # https://aka.ms/obpipelines/triggers |
| 12 | + |
| 13 | +parameters: # parameters are shown up in ADO UI in a build queue time |
| 14 | + - name: 'debug' |
| 15 | + displayName: 'Enable debug output' |
| 16 | + type: boolean |
| 17 | + default: false |
| 18 | + |
| 19 | +variables: |
| 20 | + CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning |
| 21 | + system.debug: ${{ parameters.debug }} |
| 22 | + ENABLE_PRS_DELAYSIGN: 1 |
| 23 | + ROOT: $(Build.SourcesDirectory) |
| 24 | + REPOROOT: $(Build.SourcesDirectory) |
| 25 | + OUTPUTROOT: $(REPOROOT)\out |
| 26 | + NUGET_XMLDOC_MODE: none |
| 27 | + |
| 28 | + WindowsContainerImage: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest' # https://aka.ms/obpipelines/containers |
| 29 | + |
| 30 | +resources: |
| 31 | + repositories: |
| 32 | + - repository: templates |
| 33 | + type: git |
| 34 | + name: OneBranch.Pipelines/GovernedTemplates |
| 35 | + ref: refs/heads/main |
| 36 | + |
| 37 | +extends: |
| 38 | + template: v2/OneBranch.NonOfficial.CrossPlat.yml@templates # https://aka.ms/obpipelines/templates |
| 39 | + parameters: |
| 40 | + cloudvault: # https://aka.ms/obpipelines/cloudvault |
| 41 | + 'enabled': false |
| 42 | + globalSdl: # https://aka.ms/obpipelines/sdl |
| 43 | + asyncSdl: # https://aka.ms/obpipelines/asyncsdl |
| 44 | + enabled: false |
| 45 | + # tsa: |
| 46 | + # enabled: true |
| 47 | + # breakOnFailure: true |
| 48 | + # credscan: |
| 49 | + # suppressionsFile: $(Build.SourcesDirectory)\.config\CredScanSuppression.json |
| 50 | + binskim: |
| 51 | + break: true # always break the build on binskim issues. You can disable it by setting to 'false' |
| 52 | + policheck: |
| 53 | + break: true # always break the build on policheck issues. You can disable it by setting to 'false' |
| 54 | + exclusionsFile: $(Build.SourcesDirectory)\.config\PolicheckExclusion.xml |
| 55 | + suppression: |
| 56 | + suppressionFile: $(Build.SourcesDirectory)\.gdn\global.gdnsuppress #suppressing signing issues for Xamarin dlls |
| 57 | + perStage: |
| 58 | + sdl_sources: |
| 59 | + checkout_all_repos: true |
| 60 | + featureFlags: |
| 61 | + WindowsHostVersion: '1ESWindows2022' |
| 62 | + |
| 63 | + stages: |
| 64 | + - stage: build |
| 65 | + jobs: |
| 66 | + - job: main |
| 67 | + timeoutInMinutes: 120 |
| 68 | + pool: |
| 69 | + type: windows # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs |
| 70 | + |
| 71 | + variables: |
| 72 | + ob_outputDirectory: '$(Build.ArtifactStagingDirectory)' # this directory is uploaded to pipeline artifacts, reddog and cloudvault. More info at https://aka.ms/obpipelines/artifacts |
| 73 | + ob_sdl_binskim_break: true # https://aka.ms/obpipelines/sdl |
| 74 | + ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}: # conditionally enable symbolsPublishing for default branch only |
| 75 | + ob_symbolsPublishing_enabled: true # https://aka.ms/obpipelines/symbols |
| 76 | + ob_symbolsPublishing_searchPattern: '**/*.pdb' |
| 77 | + ob_symbolsPublishing_indexSources: true |
| 78 | + ob_symbolsPublishing_symbolsFolder: $(Build.SourcesDirectory)/microsoft-authentication-library-for-java/msal4j-sdk/src |
| 79 | + ${{ if eq(variables['variables.UploadPackages'], 'true') }}: #Uploads packages to VSTS feed. Only enabled on official build |
| 80 | + ob_nugetPublishing_enabled: true |
| 81 | + |
| 82 | + steps: |
| 83 | + - checkout: self |
| 84 | + submodules: false |
| 85 | + |
| 86 | + - script: | |
| 87 | + python -m pip install build --user |
| 88 | + python -m build --sdist --wheel --outdir "$(Build.ArtifactStagingDirectory)" . |
| 89 | +
|
| 90 | + - task: EsrpRelease@7 |
| 91 | + inputs: |
| 92 | + DisplayName: 'Publish to PyPI' |
| 93 | + ConnectedServiceName: 'AuthSdkResourceManager' |
| 94 | + KeyVaultName: 'buildautomation' |
| 95 | + AuthCertName: 'MSALJava-ESRP-Release-Auth-PrivateCA' |
| 96 | + SignCertName: 'MSALJava-ESRP-Release-Sign-PublicCA' |
| 97 | + ClientId: 'b8d01fe0-7a50-4af7-abce-571ec99e87a0' |
| 98 | + Intent: 'PackageDistribution' |
| 99 | + ContentType: 'PyPI' |
| 100 | + ContentSource: 'Folder' |
| 101 | + FolderLocation: '$(Build.ArtifactStagingDirectory)/dist' |
| 102 | + waitforreleasecompletion: true |
| 103 | + |
| 104 | + |
| 105 | + ServiceEndpointUrl: 'https://api.esrp.microsoft.com' |
| 106 | + MainPublisher: 'ESRPRELPACMAN' |
| 107 | + DomainTenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47' |
| 108 | + |
0 commit comments