Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 17, 2025

Description

Build artifacts preserve directory structure (e.g., helper/package.json, helper/*.vsix), but the release pipeline assumes root-level placement, causing releases to fail for extensions in subdirectories.

Changes

Added artifactSubdirectory parameter to release-extension.yml:

  • Optional string parameter (default: "" for root-level extensions)
  • When set, all PowerShell scripts construct paths relative to the specified subdirectory
  • Updated scripts: build number generation, version verification, .vsix discovery, vsce working directory

Enhanced validation:

  • Fails explicitly when multiple .vsix files detected
  • Defensive array access using Select-Object -First 1

Documentation:

  • Added parameter reference and usage example in README.md

Usage

For extensions in subdirectories:

extends:
  template: azure-pipelines/release-extension.yml@azExtTemplates
  parameters:
    publishVersion: "1.0.0"
    artifactSubdirectory: "helper"  # Specify subdirectory
    environmentName: AzCodeDeploy

Root-level extensions require no changes (backward compatible).

Original prompt

This section details on the original issue you should resolve

<issue_title>pipelines: build/release process not working for extensions in subdirectories</issue_title>
<issue_description>The build and release pipeline doesn't work for extensions in sub directories.

What goes wrong is the published artifacts from the build https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=12974473&view=artifacts&pathAsName=false&type=publishedArtifacts

The artifacts are organized like this for the /azure helper extension
Image

And then when we go to release it, the release pipeline doesn't know where to look in the build artifacts to find the vsix and correct package.json.

Correct fix is to move to Brandon's new signing/release pipeline design. But a short term fix might be to add a new variable/parameter to the release pipeline that tells the release pipeline where to look for the release artifacts within the build artifacts.

Failed release example: https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=12974566&view=results</issue_description>

<agent_instructions>Implement the short term fix and add a way for the release pipeline to look in a specific directory for the artifacts</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix build/release process for extensions in subdirectories pipelines: Add artifactSubdirectory parameter to release pipeline Dec 17, 2025
Copilot AI requested a review from alexweininger December 17, 2025 18:30
@alexweininger alexweininger marked this pull request as ready for review December 17, 2025 20:03
@alexweininger alexweininger requested a review from a team as a code owner December 17, 2025 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pipelines: build/release process not working for extensions in subdirectories

2 participants