microsoft/qdk
Publicmirrored fromhttps://github.com/microsoft/qdkAvailable
.ado/publish.yml
591lines · modecode
| 1 | name: qdk-publish-$(BuildId) |
| 2 | |
| 3 | # Run on merges to main to ensure that the latest code |
| 4 | # is always able to be published. |
| 5 | trigger: |
| 6 | branches: |
| 7 | include: |
| 8 | - main |
| 9 | |
| 10 | # Run the pipeline every day at 6:00 AM to ensure |
| 11 | # codeql and other governance checks are up-to-date. |
| 12 | schedules: |
| 13 | - cron: "0 6 * * *" |
| 14 | displayName: "Build for Component Governance" |
| 15 | branches: |
| 16 | include: |
| 17 | - main |
| 18 | always: true |
| 19 | |
| 20 | variables: |
| 21 | CARGO_TERM_COLOR: always |
| 22 | RUST_TOOLCHAIN_VERSION: "1.95" |
| 23 | |
| 24 | resources: |
| 25 | repositories: |
| 26 | - repository: 1ESPipelineTemplates |
| 27 | type: git |
| 28 | name: 1ESPipelineTemplates/1ESPipelineTemplates |
| 29 | ref: refs/tags/release |
| 30 | |
| 31 | parameters: |
| 32 | - name: matrix |
| 33 | type: object |
| 34 | default: |
| 35 | - name: linux_x86_64 |
| 36 | poolName: "Azure-Pipelines-DevTools-GPU" |
| 37 | imageName: "ubuntu-2204-qdk-gpu" |
| 38 | os: linux |
| 39 | arch: x86_64 |
| 40 | envVars: |
| 41 | QDK_GPU_TESTS: "1" |
| 42 | - name: linux_aarch64 |
| 43 | poolName: "Azure-Pipelines-DevTools-ARM64-EO" |
| 44 | imageName: "azurelinux-3.0-gen2-arm64" |
| 45 | os: linux |
| 46 | arch: aarch64 |
| 47 | - name: mac_x86_64 |
| 48 | poolName: "Azure Pipelines" |
| 49 | imageName: "macOS-latest" # MacOS-specific Py (Mac is usually quite limited). |
| 50 | os: macOS |
| 51 | arch: x86_64 |
| 52 | - name: mac_aarch64 |
| 53 | poolName: "AcesShared" |
| 54 | os: macOS |
| 55 | arch: aarch64 |
| 56 | envVars: |
| 57 | QDK_GPU_TESTS: "1" |
| 58 | - name: windows_x86_64 |
| 59 | poolName: "Azure-Pipelines-DevTools-GPU" |
| 60 | imageName: "1es-pt-dsvm-windows-2022" # Win-specific Py + Platform-independent Py. |
| 61 | os: windows |
| 62 | arch: x86_64 |
| 63 | envVars: |
| 64 | QDK_GPU_TESTS: "1" |
| 65 | - name: windows_aarch64 |
| 66 | poolName: "Azure-Pipelines-DevTools-ARM64-EO" |
| 67 | imageName: "windows-2025-gen2-arm64" |
| 68 | os: windows |
| 69 | arch: aarch64 |
| 70 | |
| 71 | # variables set by pipeline |
| 72 | # - BASE_IMAGE |
| 73 | # - BUILD_NUMBER |
| 74 | # - BUILD_TYPE |
| 75 | # - cratesIoFeedOverride |
| 76 | # - OwnerPersonalAlias |
| 77 | # - toolchainFeed |
| 78 | |
| 79 | extends: |
| 80 | template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates |
| 81 | parameters: |
| 82 | sdl: |
| 83 | sourceAnalysisPool: |
| 84 | name: "Azure-Pipelines-DevTools-EO" |
| 85 | image: windows-2025 |
| 86 | os: windows |
| 87 | stages: |
| 88 | - stage: build |
| 89 | displayName: Build |
| 90 | jobs: |
| 91 | - job: "Node" |
| 92 | pool: |
| 93 | name: "Azure-Pipelines-DevTools-EO" |
| 94 | image: "ubuntu-latest" |
| 95 | os: linux |
| 96 | timeoutInMinutes: 90 |
| 97 | templateContext: |
| 98 | outputs: |
| 99 | - output: pipelineArtifact |
| 100 | displayName: "Upload NPM Package Artifact" |
| 101 | targetPath: $(System.DefaultWorkingDirectory)/target/npm/qsharp |
| 102 | artifactName: NPM |
| 103 | condition: succeeded() |
| 104 | steps: |
| 105 | # common init steps |
| 106 | - task: RustInstaller@1 |
| 107 | inputs: |
| 108 | rustVersion: ms-prod-$(RUST_TOOLCHAIN_VERSION) |
| 109 | additionalTargets: wasm32-unknown-unknown |
| 110 | cratesIoFeedOverride: $(cratesIoFeedOverride) |
| 111 | toolchainFeed: $(toolchainFeed) |
| 112 | displayName: Install Rust toolchain |
| 113 | |
| 114 | - task: UsePythonVersion@0 |
| 115 | inputs: |
| 116 | versionSpec: "3.11" |
| 117 | githubToken: "$(GH_PACKAGE_READ_TOKEN)" |
| 118 | |
| 119 | - task: UseNode@1 |
| 120 | inputs: |
| 121 | version: "22.x" |
| 122 | |
| 123 | - script: | |
| 124 | python ./prereqs.py --install && python ./version.py |
| 125 | displayName: Install Prereqs and set version |
| 126 | |
| 127 | # build steps |
| 128 | |
| 129 | - script: | |
| 130 | python build.py --npm --wasm --no-check-prereqs |
| 131 | displayName: Build npm package |
| 132 | |
| 133 | - script: | |
| 134 | mkdir -p $(System.DefaultWorkingDirectory)/target/npm/qsharp |
| 135 | npm pack --pack-destination $(System.DefaultWorkingDirectory)/target/npm/qsharp |
| 136 | displayName: Pack NPM Package |
| 137 | workingDirectory: $(System.DefaultWorkingDirectory)/source/npm/qsharp |
| 138 | |
| 139 | - job: "VSCode" |
| 140 | pool: |
| 141 | name: "Azure-Pipelines-DevTools-EO" |
| 142 | image: "ubuntu-latest" |
| 143 | os: linux |
| 144 | timeoutInMinutes: 90 |
| 145 | templateContext: |
| 146 | outputs: |
| 147 | - output: pipelineArtifact |
| 148 | displayName: "Upload VSCode Extension Artifact" |
| 149 | targetPath: $(System.DefaultWorkingDirectory)/target/vscode |
| 150 | artifactName: VSIX |
| 151 | condition: succeeded() |
| 152 | steps: |
| 153 | # common init steps |
| 154 | - task: RustInstaller@1 |
| 155 | inputs: |
| 156 | rustVersion: ms-prod-$(RUST_TOOLCHAIN_VERSION) |
| 157 | additionalTargets: wasm32-unknown-unknown |
| 158 | cratesIoFeedOverride: $(cratesIoFeedOverride) |
| 159 | toolchainFeed: $(toolchainFeed) |
| 160 | displayName: Install Rust toolchain |
| 161 | |
| 162 | - task: UsePythonVersion@0 |
| 163 | inputs: |
| 164 | versionSpec: "3.11" |
| 165 | githubToken: "$(GH_PACKAGE_READ_TOKEN)" |
| 166 | |
| 167 | - task: UseNode@1 |
| 168 | inputs: |
| 169 | version: "22.x" |
| 170 | |
| 171 | - script: | |
| 172 | python ./prereqs.py --install && python ./version.py |
| 173 | displayName: Install Prereqs and set version |
| 174 | |
| 175 | # Below VS Code extension build only needs to run on one platform (Linux x86_64 for now) |
| 176 | - script: | |
| 177 | npm install -g @vscode/vsce |
| 178 | displayName: Install Prereqs for VSCode Extension |
| 179 | |
| 180 | # build steps |
| 181 | # we use xvfb-run to provide a virtual framebuffer for the VS Code tester, |
| 182 | # which requires a display to run |
| 183 | - script: | |
| 184 | xvfb-run -a python build.py --wasm --npm --vscode --integration-tests --no-check-prereqs |
| 185 | displayName: Build VSCode Extension |
| 186 | |
| 187 | - script: | |
| 188 | vsce package --pre-release |
| 189 | mkdir -p $(System.DefaultWorkingDirectory)/target/vscode |
| 190 | mv *.vsix $(System.DefaultWorkingDirectory)/target/vscode |
| 191 | condition: and(succeeded(), eq(variables['BUILD_TYPE'], 'dev')) |
| 192 | displayName: Pack pre-release VSCode Extension |
| 193 | workingDirectory: "$(System.DefaultWorkingDirectory)/source/vscode" |
| 194 | |
| 195 | - script: | |
| 196 | vsce package |
| 197 | mkdir -p $(System.DefaultWorkingDirectory)/target/vscode |
| 198 | mv *.vsix $(System.DefaultWorkingDirectory)/target/vscode |
| 199 | condition: and(succeeded(), ne(variables['BUILD_TYPE'], 'dev')) |
| 200 | displayName: Pack VSCode Extension |
| 201 | workingDirectory: "$(System.DefaultWorkingDirectory)/source/vscode" |
| 202 | |
| 203 | - script: | |
| 204 | VSIX_RPATH="$(System.DefaultWorkingDirectory)/target/vscode" |
| 205 | VSIX_FNAME=`ls $VSIX_RPATH/*.vsix` |
| 206 | echo "RPATH: $VSIX_RPATH" |
| 207 | echo "FNAME: $VSIX_FNAME" |
| 208 | |
| 209 | VSIX_FNAME_NOEXT="${VSIX_FNAME%.vsix}" |
| 210 | MANIFEST_FILE="${VSIX_FNAME_NOEXT}.manifest" |
| 211 | SIGNATURE_FILE="${VSIX_FNAME_NOEXT}.signature.p7s" |
| 212 | |
| 213 | vsce generate-manifest -i $VSIX_FNAME -o $MANIFEST_FILE |
| 214 | cp $MANIFEST_FILE $SIGNATURE_FILE |
| 215 | |
| 216 | echo "##vso[task.setvariable variable=VSIX_FNAME;]$VSIX_FNAME" |
| 217 | echo "##vso[task.setvariable variable=MANIFEST_FILE;]$MANIFEST_FILE" |
| 218 | echo "##vso[task.setvariable variable=SIGNATURE_FILE;]$SIGNATURE_FILE" |
| 219 | displayName: Prepare VSCode Extension Manifest and Signature for Signing |
| 220 | |
| 221 | - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@6 |
| 222 | displayName: "ESRP CodeSigning" |
| 223 | condition: succeeded() |
| 224 | inputs: |
| 225 | ConnectedServiceName: "PME ESRP Azure Connection" |
| 226 | AppRegistrationClientId: "ced85fbc-381c-467d-958e-ee86a128e63a" |
| 227 | AppRegistrationTenantId: "975f013f-7f24-47e8-a7d3-abc4752bf346" |
| 228 | EsrpClientId: "832c049d-cd07-4c1c-bfa5-c07250d190cb" |
| 229 | UseMSIAuthentication: true |
| 230 | AuthAKVName: "quantum-esrp-kv" |
| 231 | AuthSignCertName: ESRPCert |
| 232 | FolderPath: "target/vscode" |
| 233 | Pattern: "*.signature.p7s" |
| 234 | signConfigType: inlineSignParams |
| 235 | inlineOperation: | |
| 236 | [ |
| 237 | { |
| 238 | "keyCode": "CP-401405", |
| 239 | "operationSetCode": "VSCodePublisherSign", |
| 240 | "parameters" : [], |
| 241 | "toolName": "sign", |
| 242 | "toolVersion": "1.0" |
| 243 | } |
| 244 | ] |
| 245 | SessionTimeout: 90 |
| 246 | MaxConcurrency: 25 |
| 247 | MaxRetryAttempts: 5 |
| 248 | PendingAnalysisWaitTimeoutMinutes: 5 |
| 249 | |
| 250 | - script: | |
| 251 | echo "Command: vsce verify-signature --packagePath $VSIX_FNAME --manifestPath $MANIFEST_FILE --signaturePath $SIGNATURE_FILE" |
| 252 | vsce verify-signature --packagePath $VSIX_FNAME --manifestPath $MANIFEST_FILE --signaturePath $SIGNATURE_FILE |
| 253 | condition: succeeded() |
| 254 | displayName: Confirming signature verification before publishing |
| 255 | |
| 256 | - job: "Platform_Agnostic_Python" |
| 257 | pool: |
| 258 | name: "Azure-Pipelines-DevTools-EO" |
| 259 | image: "ubuntu-latest" |
| 260 | os: linux |
| 261 | timeoutInMinutes: 90 |
| 262 | templateContext: |
| 263 | outputs: |
| 264 | - output: pipelineArtifact |
| 265 | displayName: "Upload Platform-Agnostic Python Artifacts" |
| 266 | targetPath: $(System.DefaultWorkingDirectory)/target/wheels/ |
| 267 | artifactName: Wheels.PlatformAgnostic |
| 268 | condition: succeeded() |
| 269 | steps: |
| 270 | # common init steps |
| 271 | - task: RustInstaller@1 |
| 272 | inputs: |
| 273 | rustVersion: ms-prod-$(RUST_TOOLCHAIN_VERSION) |
| 274 | cratesIoFeedOverride: $(cratesIoFeedOverride) |
| 275 | toolchainFeed: $(toolchainFeed) |
| 276 | displayName: Install Rust toolchain |
| 277 | |
| 278 | - task: UsePythonVersion@0 |
| 279 | inputs: |
| 280 | versionSpec: "3.11" |
| 281 | githubToken: "$(GH_PACKAGE_READ_TOKEN)" |
| 282 | |
| 283 | - task: UseNode@1 |
| 284 | inputs: |
| 285 | version: "22.x" |
| 286 | |
| 287 | - script: | |
| 288 | python ./prereqs.py --skip-wasm && python ./version.py |
| 289 | displayName: Install Prereqs and set version |
| 290 | |
| 291 | # Build platform-agnostic Python wheels: jupyterlab, widgets, and the |
| 292 | # qsharp shim (pure Python). The qdk native wheel is built per-platform. |
| 293 | - script: | |
| 294 | python ./build.py --jupyterlab --widgets --pip --no-check --no-test --no-check-prereqs |
| 295 | displayName: Build Platform-Agnostic Packages |
| 296 | |
| 297 | - script: | |
| 298 | ls target/wheels/* |
| 299 | |
| 300 | - ${{ each target in parameters.matrix }}: |
| 301 | - job: Python_${{ target.name }}_job |
| 302 | pool: |
| 303 | name: ${{ target.poolName }} |
| 304 | image: ${{ target.imageName }} |
| 305 | os: ${{ target.os }} |
| 306 | ${{ if and(eq(target.arch, 'aarch64'), eq(target.os, 'linux')) }}: |
| 307 | hostArchitecture: Arm64 |
| 308 | ${{ if eq(target.poolName, 'AcesShared') }}: |
| 309 | demands: |
| 310 | - ImageOverride -equals ACES_VM_SharedPool_Sequoia |
| 311 | variables: |
| 312 | arch: ${{ target.arch }} |
| 313 | additionalRustTargets: ${{ target.additionalRustTargets }} |
| 314 | ${{ if target.envVars }}: |
| 315 | ${{ each envVar in target.envVars }}: |
| 316 | ${{ envVar.key }}: ${{ envVar.value }} |
| 317 | timeoutInMinutes: 90 |
| 318 | templateContext: |
| 319 | outputs: |
| 320 | - output: pipelineArtifact |
| 321 | displayName: "Upload Python Artifacts Mac" |
| 322 | condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) |
| 323 | targetPath: $(System.DefaultWorkingDirectory)/target/wheels |
| 324 | artifactName: Wheels.Mac.${{ target.arch }} |
| 325 | - output: pipelineArtifact |
| 326 | displayName: "Upload Python Artifacts Win" |
| 327 | condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) |
| 328 | targetPath: $(System.DefaultWorkingDirectory)/target/wheels |
| 329 | artifactName: Wheels.Win.${{ target.arch }} |
| 330 | - output: pipelineArtifact |
| 331 | displayName: "Upload Python Artifacts Linux" |
| 332 | condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) |
| 333 | targetPath: $(System.DefaultWorkingDirectory)/target/wheels |
| 334 | artifactName: Wheels.Linux.${{ target.arch }} |
| 335 | steps: |
| 336 | # common init steps |
| 337 | # if we have additional rust targets, we need to install them |
| 338 | - task: RustInstaller@1 |
| 339 | inputs: |
| 340 | rustVersion: ms-prod-$(RUST_TOOLCHAIN_VERSION) |
| 341 | additionalTargets: wasm32-unknown-unknown |
| 342 | cratesIoFeedOverride: $(cratesIoFeedOverride) |
| 343 | toolchainFeed: $(toolchainFeed) |
| 344 | displayName: Install Rust toolchain |
| 345 | |
| 346 | - script: | |
| 347 | rustc --version |
| 348 | rustc --print target-list |
| 349 | displayName: View rust target info |
| 350 | |
| 351 | - task: UsePythonVersion@0 |
| 352 | inputs: |
| 353 | versionSpec: "3.11" |
| 354 | githubToken: "$(GH_PACKAGE_READ_TOKEN)" |
| 355 | ${{ if eq(target.arch, 'aarch64') }}: |
| 356 | architecture: "arm64" |
| 357 | condition: not(and(eq(variables['Agent.OS'], 'Linux'), eq(variables['arch'], 'aarch64'))) |
| 358 | |
| 359 | # UsePythonVersion@0 does not support aarch64, so we install Python manually |
| 360 | # using tdnf on Azure Linux 3.0 aarch64 |
| 361 | # We also need alias python3 as python |
| 362 | - script: | |
| 363 | sudo tdnf install python3-3.12.9 python3-pip-24.2 -y |
| 364 | sudo alternatives --install /usr/bin/python python /usr/bin/python3 1 |
| 365 | displayName: Install Python on Azure Linux 3.0 aarch64 |
| 366 | condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'), eq(variables['arch'], 'aarch64')) |
| 367 | |
| 368 | - task: UseNode@1 |
| 369 | inputs: |
| 370 | version: "22.x" |
| 371 | |
| 372 | - script: | |
| 373 | sudo apt update |
| 374 | sudo apt install -y patchelf |
| 375 | displayName: Install Linux x86_64 prereqs |
| 376 | condition: and(eq(variables['Agent.OS'], 'Linux'), eq(variables['arch'], 'x86_64')) |
| 377 | |
| 378 | # on Azure Linux 3.0 aarch64 we need to install: |
| 379 | # ld with binutils |
| 380 | # crt1.o and others with glibc-devel |
| 381 | # std lib headers with kernel-headers |
| 382 | # patchelf for modifying ELF files via auditwheel |
| 383 | - script: | |
| 384 | sudo tdnf install binutils glibc-devel kernel-headers patchelf gcc -y |
| 385 | displayName: Install c++ build tools on Azure Linux 3.0 aarch64 |
| 386 | condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'), eq(variables['arch'], 'aarch64')) |
| 387 | |
| 388 | - script: | |
| 389 | python ./prereqs.py --skip-wasm |
| 390 | displayName: Install Prereqs |
| 391 | condition: and(ne(variables['Agent.OS'], 'Linux'), ne(variables['arch'], 'aarch64')) |
| 392 | |
| 393 | - script: | |
| 394 | python ./version.py |
| 395 | displayName: Set version |
| 396 | |
| 397 | # Windows arm64 |
| 398 | - script: | |
| 399 | python build.py --qdk --no-check-prereqs --no-integration-tests --no-optional-dependencies |
| 400 | displayName: Build Platform-Dependent Py Packages |
| 401 | condition: and(eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['arch'], 'aarch64')) |
| 402 | |
| 403 | # every other platform |
| 404 | - script: | |
| 405 | python build.py --qdk --no-check-prereqs --integration-tests |
| 406 | displayName: Build Platform-Dependent Py Packages |
| 407 | condition: not(and(eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['arch'], 'aarch64'))) |
| 408 | |
| 409 | - script: | |
| 410 | dir target\wheels\* |
| 411 | displayName: List Py Packages on Win |
| 412 | condition: eq(variables['Agent.OS'], 'Windows_NT') |
| 413 | |
| 414 | - script: | |
| 415 | ls target/wheels/* |
| 416 | displayName: List Py Packages on non-Win |
| 417 | condition: ne(variables['Agent.OS'], 'Windows_NT') |
| 418 | |
| 419 | - stage: approval |
| 420 | displayName: Approval |
| 421 | dependsOn: build |
| 422 | condition: and(succeeded(), eq(variables['Build.Reason'], 'Manual')) |
| 423 | jobs: |
| 424 | - job: "Approval" |
| 425 | pool: server |
| 426 | timeoutInMinutes: 1440 # job times out in 1 day |
| 427 | steps: |
| 428 | - task: ManualValidation@0 |
| 429 | timeoutInMinutes: 1440 # task times out in 1 day |
| 430 | inputs: |
| 431 | notifyUsers: "" |
| 432 | instructions: "Please verify artifacts and approve the release" |
| 433 | onTimeout: "reject" |
| 434 | |
| 435 | - stage: release |
| 436 | displayName: Release |
| 437 | dependsOn: approval |
| 438 | condition: and(succeeded(), eq(variables['Build.Reason'], 'Manual')) |
| 439 | jobs: |
| 440 | - job: "Publish_VSIX_Package" |
| 441 | pool: |
| 442 | name: "Azure-Pipelines-DevTools-EO" |
| 443 | image: "ubuntu-latest" |
| 444 | os: linux |
| 445 | templateContext: |
| 446 | type: releaseJob |
| 447 | isProduction: true |
| 448 | inputs: # All input build artifacts must be declared here |
| 449 | - input: pipelineArtifact |
| 450 | artifactName: VSIX |
| 451 | targetPath: $(System.DefaultWorkingDirectory)/target/vscode |
| 452 | steps: |
| 453 | - script: | |
| 454 | npm install -g @vscode/vsce |
| 455 | displayName: Install Prereqs for VSCode Ext Publishing |
| 456 | |
| 457 | - script: | |
| 458 | VSIX_RPATH="$(System.DefaultWorkingDirectory)/target/vscode" |
| 459 | VSIX_FNAME=`ls $VSIX_RPATH/*.vsix` |
| 460 | |
| 461 | VSIX_FNAME_NOEXT="${VSIX_FNAME%.vsix}" |
| 462 | MANIFEST_FILE="${VSIX_FNAME_NOEXT}.manifest" |
| 463 | SIGNATURE_FILE="${VSIX_FNAME_NOEXT}.signature.p7s" |
| 464 | |
| 465 | echo "##vso[task.setvariable variable=VSIX_FNAME;]$VSIX_FNAME" |
| 466 | echo "##vso[task.setvariable variable=MANIFEST_FILE;]$MANIFEST_FILE" |
| 467 | echo "##vso[task.setvariable variable=SIGNATURE_FILE;]$SIGNATURE_FILE" |
| 468 | displayName: Get VSCode Extension, Manifest, and Signature files for Publishing |
| 469 | |
| 470 | - script: | |
| 471 | echo "Command: vsce verify-signature --packagePath $VSIX_FNAME --manifestPath $MANIFEST_FILE --signaturePath $SIGNATURE_FILE" |
| 472 | vsce verify-signature --packagePath $VSIX_FNAME --manifestPath $MANIFEST_FILE --signaturePath $SIGNATURE_FILE |
| 473 | condition: succeeded() |
| 474 | displayName: Reconfirming signature verification before publishing |
| 475 | |
| 476 | - task: AzureCLI@2 |
| 477 | condition: and(succeeded(), eq(variables['BUILD_TYPE'], 'dev')) |
| 478 | displayName: Publish pre-release VSCode Extension |
| 479 | inputs: |
| 480 | azureSubscription: QDK Publish Connection |
| 481 | scriptType: bash |
| 482 | scriptLocation: inlineScript |
| 483 | inlineScript: | |
| 484 | echo "Command: vsce publish --pre-release --azure-credential --packagePath $VSIX_FNAME --manifestPath $MANIFEST_FILE --signaturePath $SIGNATURE_FILE" |
| 485 | vsce publish --pre-release --azure-credential --packagePath $VSIX_FNAME --manifestPath $MANIFEST_FILE --signaturePath $SIGNATURE_FILE 2>&1 > pub.log |
| 486 | |
| 487 | - task: AzureCLI@2 |
| 488 | condition: and(succeeded(), ne(variables['BUILD_TYPE'], 'dev')) |
| 489 | displayName: Publish VSCode Extension |
| 490 | inputs: |
| 491 | azureSubscription: QDK Publish Connection |
| 492 | scriptType: bash |
| 493 | scriptLocation: inlineScript |
| 494 | inlineScript: | |
| 495 | echo "Command: vsce publish --azure-credential --packagePath $VSIX_FNAME --manifestPath $MANIFEST_FILE --signaturePath $SIGNATURE_FILE" |
| 496 | vsce publish --azure-credential --packagePath $VSIX_FNAME --manifestPath $MANIFEST_FILE --signaturePath $SIGNATURE_FILE 2>&1 > pub.log |
| 497 | |
| 498 | - script: | |
| 499 | dir |
| 500 | cat pub.log |
| 501 | displayName: If failed, display VSCode Publishing Results |
| 502 | condition: failed() |
| 503 | workingDirectory: "$(System.DefaultWorkingDirectory)" |
| 504 | |
| 505 | - job: "Publish_Python_Packages" |
| 506 | pool: |
| 507 | name: "Azure-Pipelines-DevTools-EO" |
| 508 | image: "ubuntu-latest" |
| 509 | os: linux |
| 510 | templateContext: |
| 511 | type: releaseJob |
| 512 | isProduction: true |
| 513 | inputs: # All input build artifacts must be declared here |
| 514 | - input: pipelineArtifact |
| 515 | artifactName: Wheels.Win.x86_64 |
| 516 | targetPath: $(System.DefaultWorkingDirectory)/artifacts/win-x86_64 |
| 517 | - input: pipelineArtifact |
| 518 | artifactName: Wheels.Win.aarch64 |
| 519 | targetPath: $(System.DefaultWorkingDirectory)/artifacts/win-aarch64 |
| 520 | - input: pipelineArtifact |
| 521 | artifactName: Wheels.Mac.x86_64 |
| 522 | targetPath: $(System.DefaultWorkingDirectory)/artifacts/mac-x86_64 |
| 523 | - input: pipelineArtifact |
| 524 | artifactName: Wheels.Mac.aarch64 |
| 525 | targetPath: $(System.DefaultWorkingDirectory)/artifacts/mac-aarch64 |
| 526 | - input: pipelineArtifact |
| 527 | artifactName: Wheels.Linux.x86_64 |
| 528 | targetPath: $(System.DefaultWorkingDirectory)/artifacts/linux-x86_64 |
| 529 | - input: pipelineArtifact |
| 530 | artifactName: Wheels.Linux.aarch64 |
| 531 | targetPath: $(System.DefaultWorkingDirectory)/artifacts/linux-aarch64 |
| 532 | - input: pipelineArtifact |
| 533 | artifactName: Wheels.PlatformAgnostic |
| 534 | targetPath: $(System.DefaultWorkingDirectory)/artifacts/platform-agnostic |
| 535 | steps: |
| 536 | - script: | |
| 537 | mkdir -p $(System.DefaultWorkingDirectory)/target/wheels |
| 538 | find $(System.DefaultWorkingDirectory)/artifacts -name "*.whl" -exec cp {} $(System.DefaultWorkingDirectory)/target/wheels/ \; |
| 539 | ls $(System.DefaultWorkingDirectory)/target/wheels |
| 540 | displayName: Collect and Display Py Artifacts in Publishing Dir |
| 541 | |
| 542 | - task: EsrpRelease@9 |
| 543 | condition: succeeded() |
| 544 | displayName: Publish Py Packages |
| 545 | inputs: |
| 546 | connectedservicename: "PME ESRP Azure Connection" |
| 547 | usemanagedidentity: true |
| 548 | keyvaultname: "quantum-esrp-kv" |
| 549 | signcertname: ESRPCert |
| 550 | clientid: "832c049d-cd07-4c1c-bfa5-c07250d190cb" |
| 551 | contenttype: PyPi |
| 552 | domaintenantid: "975f013f-7f24-47e8-a7d3-abc4752bf346" |
| 553 | folderlocation: "$(System.DefaultWorkingDirectory)/target/wheels" |
| 554 | waitforreleasecompletion: true |
| 555 | owners: "billti@microsoft.com" |
| 556 | approvers: "billti@microsoft.com" |
| 557 | mainpublisher: ESRPRELPACMAN |
| 558 | |
| 559 | - job: "Publish_NPM_Package" |
| 560 | pool: |
| 561 | name: "Azure-Pipelines-DevTools-EO" |
| 562 | image: "ubuntu-latest" |
| 563 | os: linux |
| 564 | templateContext: |
| 565 | type: releaseJob |
| 566 | isProduction: true |
| 567 | inputs: # All input build artifacts must be declared here |
| 568 | - input: pipelineArtifact |
| 569 | artifactName: NPM |
| 570 | targetPath: $(System.DefaultWorkingDirectory)/target/npm/qsharp |
| 571 | steps: |
| 572 | - script: | |
| 573 | ls $(System.DefaultWorkingDirectory)/target/npm/qsharp/* |
| 574 | displayName: Display NPM Artifacts in Publishing Dir |
| 575 | |
| 576 | - task: EsrpRelease@9 |
| 577 | condition: succeeded() |
| 578 | displayName: Publish NPM Package |
| 579 | inputs: |
| 580 | connectedservicename: "PME ESRP Azure Connection" |
| 581 | usemanagedidentity: true |
| 582 | keyvaultname: "quantum-esrp-kv" |
| 583 | signcertname: ESRPCert |
| 584 | clientid: "832c049d-cd07-4c1c-bfa5-c07250d190cb" |
| 585 | contenttype: "NPM" |
| 586 | domaintenantid: "975f013f-7f24-47e8-a7d3-abc4752bf346" |
| 587 | folderlocation: "$(System.DefaultWorkingDirectory)/target/npm/qsharp" |
| 588 | waitforreleasecompletion: true |
| 589 | owners: "billti@microsoft.com" |
| 590 | approvers: "billti@microsoft.com" |
| 591 | mainpublisher: ESRPRELPACMAN |
| 592 | |