|
| 1 | +# Run on a schedule |
| 2 | +trigger: none |
| 3 | +pr: none |
| 4 | + |
| 5 | +schedules: |
| 6 | + - cron: '0 10 * * 1-5' # 10AM UTC (2AM PDT) MON-FRI (VS Code Pre-release builds at 9PM PDT) |
| 7 | + displayName: Nightly Pre-Release Schedule |
| 8 | + always: false # only run if there are source code changes |
| 9 | + branches: |
| 10 | + include: |
| 11 | + - main |
| 12 | + |
| 13 | +resources: |
| 14 | + repositories: |
| 15 | + - repository: MicroBuildTemplate |
| 16 | + type: git |
| 17 | + name: 1ESPipelineTemplates/MicroBuildTemplate |
| 18 | + ref: refs/tags/release |
| 19 | +variables: |
| 20 | + - name: TeamName |
| 21 | + value: VSCode-python-debugger |
| 22 | + - name: VsixName |
| 23 | + value: python-debugger.vsix |
| 24 | + - name: AZURE_ARTIFACTS_FEED |
| 25 | + value: 'https://devdiv.pkgs.visualstudio.com/DevDiv/_packaging/Pylance_PublicPackages/npm/registry/' |
| 26 | +parameters: |
| 27 | + - name: publishExtension |
| 28 | + displayName: 🚀 Publish Extension |
| 29 | + type: boolean |
| 30 | + default: false |
| 31 | + |
| 32 | + - name: buildPlatforms |
| 33 | + type: object |
| 34 | + default: |
| 35 | + - name: Linux |
| 36 | + vsceTarget: '' |
| 37 | + - name: Linux |
| 38 | + packageArch: arm64 |
| 39 | + vsceTarget: linux-arm64 |
| 40 | + - name: Linux |
| 41 | + packageArch: arm |
| 42 | + vsceTarget: linux-armhf |
| 43 | + - name: Linux |
| 44 | + packageArch: x64 |
| 45 | + vsceTarget: linux-x64 |
| 46 | + - name: MacOS |
| 47 | + packageArch: arm64 |
| 48 | + vsceTarget: darwin-arm64 |
| 49 | + - name: MacOS |
| 50 | + packageArch: x64 |
| 51 | + vsceTarget: darwin-x64 |
| 52 | + - name: Windows |
| 53 | + packageArch: arm |
| 54 | + vsceTarget: win32-arm64 |
| 55 | + - name: Windows |
| 56 | + packageArch: x64 |
| 57 | + vsceTarget: win32-x64 |
| 58 | + |
| 59 | + - name: buildSteps |
| 60 | + type: stepList |
| 61 | + default: |
| 62 | + - script: npm ci |
| 63 | + displayName: Install NPM dependencies |
| 64 | + |
| 65 | + - script: python -m pip install -U pip |
| 66 | + displayName: Upgrade pip |
| 67 | + |
| 68 | + - script: python -m pip install wheel |
| 69 | + displayName: Install wheel |
| 70 | + |
| 71 | + - script: python -m pip install nox |
| 72 | + displayName: Install nox |
| 73 | + |
| 74 | + - script: python -m nox --session install_bundled_libs |
| 75 | + displayName: Install Python dependencies |
| 76 | + |
| 77 | + - script: python ./build/update_ext_version.py --for-publishing |
| 78 | + displayName: Update build number |
| 79 | + |
| 80 | + - pwsh: Copy-Item -Path "pre-built/*" -Destination "." -Recurse -Force |
| 81 | + displayName: Copy pre-built files |
| 82 | + |
| 83 | + - script: npm run package |
| 84 | + displayName: Build extension |
| 85 | + |
| 86 | +extends: |
| 87 | + template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate |
| 88 | + parameters: |
| 89 | + sdl: |
| 90 | + sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES |
| 91 | + codeSignValidation: |
| 92 | + enabled: true |
| 93 | + sbom: |
| 94 | + enabled: false # Disable global SBOM generation; we'll enable selectively per artifact output |
| 95 | + pool: |
| 96 | + name: AzurePipelines-EO |
| 97 | + os: windows |
| 98 | + |
| 99 | + customBuildTags: |
| 100 | + - ES365AIMigrationTooling |
| 101 | + stages: |
| 102 | + - stage: Build |
| 103 | + displayName: Build & Package Extension |
| 104 | + jobs: |
| 105 | + - template: build/templates/package.yml@self |
| 106 | + parameters: |
| 107 | + buildPlatforms: ${{ parameters.buildPlatforms }} |
| 108 | + buildSteps: ${{ parameters.buildSteps }} |
| 109 | + isPreRelease: true |
| 110 | + standardizedVersioning: true |
| 111 | + |
| 112 | + - stage: Publish |
| 113 | + displayName: Publish Extension |
| 114 | + dependsOn: Build |
| 115 | + jobs: |
| 116 | + - template: build/templates/publish-extension.yml@self |
| 117 | + parameters: |
| 118 | + buildPlatforms: ${{ parameters.buildPlatforms }} |
| 119 | + publishExtension: ${{ parameters.publishExtension }} |
| 120 | + preRelease: true |
| 121 | + teamName: $(TeamName) |
| 122 | + ghCreateTag: true |
| 123 | + ghCreateRelease: true |
| 124 | + ghReleaseAddChangeLog: true |
0 commit comments