Configuring extension registry (Tech preview)

You can configure a local extension registry in Code as an admin to ensure that only approved extensions are available to team members within your teamspace.

Before you begin

Before you begin:

  • Gained access to DevOps Control with permission to create repositories.
  • Download the required .vsix extension files from a trusted source, or use non-published extension files that you have access to. You can visit the specific extension's page in the Open VSX registry, download the desired stable release's .vsix file. Generally, prerelease versions are also listed in Open VSX and only release versions are recommended for deploying.
  • Read Authenticating with DevOps Code UI.

About this task

A local extension registry decides which extensions are available in your teamspace. Extensions are stored and versioned in the .devopsconfig Control repository. The DevOps Code extension provides commands that you can use as an administrator to deploy and manage extensions within the extension registry.

The key commands provided by the DevOps Code extension in the cloud IDE are:

  • DevOps Code: Deploy to Extension Registry (Tech Preview) - Deploys extension files to the local registry.
  • DevOps Code: Fetch from Extension Registry (Tech Preview) - Refreshes the registry after new extensions are pushed to the repository.
Important:
This feature is in Tech Preview. Commands and parameters are subject to change in future releases.

Procedure

  1. Configure settings.json in the .devopsconfig Control repository to use the local registry:
    1. Update the settings.json file in the repository root. Add or update the file with the following content:
      {
          "extensions_gallery": "local",
          "storage_type": "control"
      }

      The extensions_gallery parameter supports these values:

      • local: Uses the administrator-controlled registry.
      • disabled: Prevents the user from installing new extensions from the Code IDE.
      • default: Uses the public Open VSX registry.

      Set the value to local to ensure that teamspace members can install only approved extensions from the local extension registry.

  2. Add approved extensions in Code:
    1. Select Open with DevOps Code to clone the .devopsconfig Control repository in Code.
    2. After cloning the main branch of the .devopsconfig repository in Code, create an extensions folder in the repository root if one does not exist. Note that you can also create other branches and version the extensions on different branches.
    3. Upload the .vsix files into the extensions folder.
  3. Deploy and publish the extensions:
    1. Right-click the .vsix file in the Explorer pane and select Deploy to Extension Registry (Tech Preview).
      A dialog confirms that the extension was deployed successfully. The extension folder is created inside extensions in the Control repository. The extension is not available to teamspace members until you commit and push the changes.
  4. Commit and push the changes to Control:
    1. Commit the following items:
      • extensions folder
      • settings.json file
    2. Push these changes to the Control repository.
      After the push completes, the extension is published to the local registry and is available to all team members.
  5. Refresh the extension registry:

    In Tech Preview, the registry does not automatically detect new extensions after a push.

    1. Open the Command Palette and run DevOps Code: Fetch from Extension Registry (Tech Preview) to refresh the registry content.
      A notification confirms that the registry refresh is complete, and you can see the new extension(s).

Results

The extensions are now available in the local registry. Members in a teamspace can view and install only the extensions that you have added and published.

What to do next

Install the extensions approved by administrator from the Extensions view in Code.