diff --git a/.textlintrc.json b/.textlintrc.json
index 7fa8bc8..29a6d33 100644
--- a/.textlintrc.json
+++ b/.textlintrc.json
@@ -20,6 +20,7 @@
"/-\\w+\\b/g", // FIXME: PowerShell Cmdlets/function parameter names
"/\\b\\w+[./]\\w+\\b/g", // paths // FIXME: (Note: Does not work for \ in paths)
"about_CommonParameters",
+ "about_Execution_Policies",
"about_Preference_Variables",
"CIDR",
"Containers[\\s\\.\\-]ToolKit/gi",
diff --git a/Containers-Toolkit.nuspec b/Containers-Toolkit.nuspec
new file mode 100644
index 0000000..25f6216
--- /dev/null
+++ b/Containers-Toolkit.nuspec
@@ -0,0 +1,32 @@
+
+
+
+ Containers-Toolkit
+ 0.0.0
+ Microsoft Corporation
+ true
+
+ https://github.com/microsoft/containers-toolkit.git
+ The Containers-Toolkit module contains PowerShell functions for downloading, installing, and configuring Containerd, Buildkit, nerdctl, and Windows CNI plugins for container networks. It also allows you to get a list of the container tools and their installation statuses.
+
+Configurations done with these functions are default configurations that allow you to get started with interacting with the tools. Further configurations may be necessary.
+You can find documentation for these functions here: [Containers-Toolkit Documentation](https://github.com/microsoft/containers-toolkit/tree/main/docs/command-reference.md)
+
+This module requires the HNS module to execute the "Initialize-NatNetwork" command. The Host Networking Service (HNS) and the Host Compute Service (HCS) work together to create containers and attach endpoints to a network. The HNS module is necessary because the HostNetworkingService module does not include the "New-HNSNetwork" cmdlet.
+
+Note that the HostNetworkingService module is available only when the Hyper-V Windows feature is enabled.
+
+
+ (c) Microsoft Corporation. All rights reserved.
+ Containerd Buildkit nerdctl CNI WindowsContainers ContainerTools
+
+
+
+ LICENSE.txt
+ README.md
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 94be064..87e9efb 100644
--- a/README.md
+++ b/README.md
@@ -26,6 +26,7 @@
Containers-Toolkit is a Windows PowerShell module for downloading, installing, and configuring Containerd, Buildkit, nerdctl, and Windows CNI plugins for container networks. It also allows you to get a list of the container tools and their installation statuses.
Configurations done with these functions are default configurations that allow you to get started with interacting with the tools. Further configurations may be necessary.
+
You can find documentation for these functions here: [Containers-Toolkit Documentation](https://github.com/microsoft/containers-toolkit/tree/main/docs/command-reference.md)
## Prerequisites
@@ -44,11 +45,49 @@ You can find documentation for these functions here: [Containers-Toolkit Documen
### Install Containers-Toolkit module from PowerShell Gallery
-> COMING SOON: We are currently working on publishing this module to PS Gallery to make it easier to import the module
+```PowerShell
+Install-Module -Name containers-toolkit
+```
+
+> [!TIP]
+> To find the latest version of the module, use:
+>
+> ```PowerShell
+> Find-Module -Name containers-toolkit -AllowPrerelease
+> ```
### Download signed source files
-> Coming soon
+1. Download source files
+
+ ```PowerShell
+ $Version = ""
+ Invoke-WebRequest -Uri "https://github.com/microsoft/containers-toolkit/releases/download/v$Version/containers-toolkit-v$Version.tar.gz" -OutFile "containers-toolkit.tar.gz"
+ ```
+
+1. Verify the signature
+
+ ```PowerShell
+ $HASH_VALUE = ""
+ (Get-FileHash -Algorithm SHA256 containers-toolkit.tar.gz).Hash -eq $HASH_VALUE
+ ```
+
+1. Expand the tar file
+
+ ```PowerShell
+ $ModulePath = "$env:USERPROFILE\Documents\WindowsPowerShell\Modules"
+ if (!(Test-Path -Path $ModulePath)) {
+ New-Item -ItemType Directory -Path $ModulePath | Out-Null
+ }
+ tar.exe -xvf containers-toolkit.tar.gz -C $ModulePath
+ Remove-Item -Path containers-toolkit.tar.gz -Force
+ ```
+
+1. Unblock the files
+
+ ```PowerShell
+ Get-ChildItem -Path $ModulePath -Recurse | Unblock-File
+ ```
### Downloading the source code from Containers-Toolkit repository
@@ -56,6 +95,12 @@ To use the module, fork/clone the repository to your local machine and [setup yo
## Usage
+> [!IMPORTANT]
+> All the Containers-Toolkit files, including \*.ps1, \*.psd1, \*.psm1, and \*.ps1xml, have been
+> code signed. This means that you will be able to run the module in a PowerShell session
+> where the execution policy is set to `AllSigned` or `RemoteSigned`.
+> To learn more about PowerShell execution policies, see [about_Execution_Policies](https://go.microsoft.com/fwlink/?LinkID=135170).
+
### Get the module details
```PowerShell
@@ -85,13 +130,13 @@ Get-Command -Module containers-toolkit
Get-Help Install-Containerd
```
-2. List container tools (Containerd, BuildKit, and nerdctl) install status
+1. List container tools (Containerd, BuildKit, and nerdctl) install status
```PowerShell
Show-ContainerTools
```
-3. Installs Containerd version 1.7.7 at 'C:\Test\Path\containerd' and adds 'C:\Test\Path\containerd' in the environment path.
+1. Installs Containerd version 1.7.7 at 'C:\Test\Path\containerd' and adds 'C:\Test\Path\containerd' in the environment path.
```powershell
Install-Containerd -Version "1.7.7" -InstallPath 'C:\Test\Path\Containerd'
diff --git a/build/hacks/get-newversion.ps1 b/build/hacks/get-newversion.ps1
new file mode 100644
index 0000000..7a61ce5
--- /dev/null
+++ b/build/hacks/get-newversion.ps1
@@ -0,0 +1,111 @@
+<#
+.SYNOPSIS
+ Get the new version number for the release.
+
+.DESCRIPTION
+ Given a release version, this script will recursively check for a valid version number
+ by checking the PowerShell Gallery.
+
+.PARAMETER Version
+ The version number to check for. This should be a valid semantic version number.
+ Example: 1.2.3
+
+.PARAMETER Prerelease
+ The pre-release tag to check for. This should be a valid semantic version pre-release tag.
+ Example: alpha2, beta0, rc0
+
+.PARAMETER ReleaseType
+ The type of release to check for. This should be one of the following:
+ major, minor, patch
+
+.PARAMETER MaxPrerelease
+ The maximum number of pre-release tags to check for. This is used to limit the number of
+ iterations when checking for a valid version number. Default is 20.
+ For example, if the current version is 1.2.3-alpha2 and the next version is 1.2.3-alpha3,
+ this will check for 20 pre-release tags: alpha3, alpha4, ..., alpha20.
+
+ When the maximum number of pre-release tags is reached, the script will stop checking and increment
+ the version number based on the release type.
+
+ When MaxPrerelease is set to 0 (or less), the script will not check for pre-release tags and will
+ increment the version number based on the release type.
+
+.EXAMPLE
+ .\get-newversion.ps1 -Version 1.2.3 -Prerelease alpha2 -ReleaseType minor
+
+ This will check for the next version number based on the provided version, pre-release tag, and release type.
+#>
+
+[CmdletBinding()]
+param (
+ [Parameter(Mandatory = $true)]
+ [version]$Version,
+
+ [Parameter(Mandatory = $false)]
+ [string]$Prerelease,
+
+ [Parameter(Mandatory = $true)]
+ [ValidateSet("major", "minor", "patch")]
+ [string]$ReleaseType,
+
+ [Parameter(Mandatory = $false)]
+ [int]$MaxPrerelease = "20"
+)
+
+$ErrorActionPreference = "Stop"
+
+function Update-SemverTag($Semver, $ReleaseType) {
+ switch ($ReleaseType) {
+ "major" { return [version]::new($Semver.Major + 1, 0, 0) }
+ "minor" { return [version]::new($Semver.Major, $Semver.Minor + 1, 0) }
+ "patch" { return [version]::new($Semver.Major, $Semver.Minor, $Semver.Build + 1) }
+ }
+}
+
+function Get-PrereleaseValue($PrereleaseTag) {
+ $match = [regex]::Match($PrereleaseTag, "(.*?)(\d+)$")
+ return [int]$match.Groups[2].Value + 1
+}
+
+function Update-Prerelease($PrereleaseTag) {
+ $match = [regex]::Match("$PrereleaseTag", "(.*?)(\d+)$")
+ $prefix = [string]$match.Groups[1].Value
+ $number = [int]$match.Groups[2].Value
+ return "$prefix" + "$($number + 1)"
+}
+
+function Test-ModuleVersion($ModuleVersion) {
+ $PublishedVersions = Find-Module -AllowPrerelease `
+ -Name containers-toolkit `
+ -RequiredVersion "$ModuleVersion" `
+ -ErrorAction SilentlyContinue | Where-Object { $_.Version -eq $ModuleVersion }
+ return $PublishedVersions
+}
+
+while ($true) {
+ $ModuleVersion = "${Version}-${Prerelease}".TrimEnd("-")
+ Write-Host "Checking for module version: $ModuleVersion" -ForegroundColor Magenta
+
+ $PublishedVersions = Test-ModuleVersion $ModuleVersion
+ if (-not $PublishedVersions) {
+ Write-Host "Module version $ModuleVersion is not published." -ForegroundColor Magenta
+ return $ModuleVersion
+ }
+
+ # Find a pre-release tag that is not published
+ while ($Prerelease -and ($MaxPrerelease -gt 0) -and ($PublishedVersions.Version -match "$Prerelease")) {
+ $Prerelease = Update-Prerelease $Prerelease
+ $ModuleVersion = "${Version}-${Prerelease}"
+
+ Write-Host "Incrementing pre-release tag: $ModuleVersion" -ForegroundColor Magenta
+ $PublishedVersions = Test-ModuleVersion $ModuleVersion
+ if (-not $PublishedVersions) {
+ Write-Host "Module version $ModuleVersion is not published." -ForegroundColor Magenta
+ return $ModuleVersion
+ }
+
+ $MaxPrerelease -= 1
+ }
+
+ $Version = Update-SemverTag $Version $ReleaseType
+}
diff --git a/build/hacks/release-notes-template.md b/build/hacks/release-notes-template.md
index ec5064a..a8a5af5 100644
--- a/build/hacks/release-notes-template.md
+++ b/build/hacks/release-notes-template.md
@@ -16,38 +16,36 @@ _Ongoing issue that are still being worked on._
## Quick start guide
+> [!IMPORTANT]
+> All the Containers-Toolkit files, including `\*.ps1`, `\*.psd1`, `\*.psm1`, and `\*.ps1xml`, have been
+> code signed. This means that you will be able to run the module in a PowerShell session
+> where the execution policy is set to `AllSigned` or `RemoteSigned`.
+> To learn more about PowerShell execution policies, see [about_Execution_Policies](https://go.microsoft.com/fwlink/?LinkID=135170).
+
### Install from PowerShell Gallery
```PowerShell
-Install-Module -Name Containers-Toolkit -RequiredVersion "__NEW_VERSTION__"
+Install-Module -Name Containers-Toolkit -RequiredVersion "__MODULE_VERSION__" __ALLOW_PRERELEASE__
```
If the module is already installed, update the module:
```PowerShell
-Update-Module -Name Containers-Toolkit -RequiredVersion "__NEW_VERSTION__"
+Update-Module -Name Containers-Toolkit -RequiredVersion "__MODULE_VERSION__" __ALLOW_PRERELEASE__
```
### Download Source Files
-1. Download source files
-1. Open a new terminal
-1. cd into the location of the downloaded files
- Example: If downloaded to the downloads folder:
-
- ```PowerShell
- cd "$env:USERPROFILE\Downloads\containers-toolkit"
- ```
-
-1. Unblock the files
+> **⚠️ Caution:**
+> For security, we recommend using the source files named `containers-toolkit-__RELEASE_TAG__.tar.gz`, as these contain signed scripts.
+> The default **Source.zip** and **Source.tar.gz** files generated by GitHub are not signed and should be avoided.
- ```PowerShell
- Get-ChildItem -Path . -Recurse | Unblock-File"
- ```
+See instructions in the [Installing and importing Containers-Toolkit module](../../README.md#download-source-files) section.
-1. Import the module
-
-See instructions in the [Installing and importting Containers-Toolkit module](../../README.md#download-source-files) section
+```PowerShell
+Invoke-WebRequest -Uri "https://github.com/microsoft/containers-toolkit/releases/download/__RELEASE_TAG__/containers-toolkit-__RELEASE_TAG__.tar.gz" -OutFile "containers-toolkit.tar.gz"
+tar -xvf containers-toolkit.tar.gz -C $ENV:USERPROFILE\Documents\WindowsPowerShell\Modules
+```
## Visuals
@@ -57,7 +55,7 @@ _Screenshots, Side-by-side comparisons, 30-second videos_
_**Update the discussoin link**_
-For any questions or feedback on this release, see the discussion: [Containers.ToolKit v__NEW_VERSTION__]()
+For any questions or feedback on this release, see the discussion: [Containers.ToolKit **__RELEASE_TAG__**]()
## Release Authors
diff --git a/build/scripts/release/MAINTAINERS_GUIDE.md b/build/scripts/release/MAINTAINERS_GUIDE.md
new file mode 100644
index 0000000..5cb5af0
--- /dev/null
+++ b/build/scripts/release/MAINTAINERS_GUIDE.md
@@ -0,0 +1,141 @@
+## Creating a Containers-Toolkit release
+
+> [!IMPORTANT]
+> **It is recommended to test with pre-release versions before creating a final release.**
+> The PowerShell Gallery does not support permanent deletion of packages. If the module version already exists, you will need to increment the version number
+
+### Create a GitHub tag
+
+1. **Get the new module version:**
+
+ To choose the new version, you can use the [Semantic Versioning](https://semver.org/) scheme. The version number is in the format `X.Y.Z`, where:
+ - `X` is the *major* version number. Indicates significant **changes that may break backward compatibility** with previous versions (e.g., 1.0.0 to 2.0.0).
+ - `Y` is the *minor* version number. Represents **new features/ functionality** that are backward compatible (e.g., 1.0.0 to 1.1.0).
+ - `Z` is the *patch* version number. Refers to **bug fixes or minor changes** that do not affect functionality or compatibility (e.g., 1.0.0 to 1.0.1).
+
+ ```PowerShell
+ $NEW_VERSION = "" # e.g. 1.0.0
+ ```
+
+ If this is pre-release, concatenate the pre-release version to the module version. The pre-release version can be `-rc0`, `-beta0`, `-alpha0`, etc.
+
+ ```PowerShell
+ $PRERELEASE_TAG = "" # e.g. -rc0, -beta0, -alpha0
+ ```
+
+ Get the release version and tag:
+
+ ```PowerShell
+ $RELEASE_VERSION = "${NEW_VERSION}-${PRERELEASE_TAG}".TrimEnd("-")
+ $RELEASE_TAG = "v${RELEASE_VERSION}"
+ ```
+
+> [!IMPORTANT]
+> Ensure that the new version number is not already used in the [PowerShell Gallery][ctk-psg].
+> If the version already exists, you will need to increment the version number.
+> The PowerShell Gallery does not support permanent deletion of packages.
+> Use the `Find-Module` command to check if the version already exists.
+>
+> ```PowerShell
+> Find-Module -Name containers-toolkit -AllowPrerelease -RequiredVersion "$RELEASE_VERSION" | Where-Object { $_.Version -eq $RELEASE_VERSION }
+> ```
+>
+> Alternatively, you can use the [build/hacks/get-newversion.ps1](../../hacks/get-newversion.ps1) script to get the new version number.
+>
+> ```PowerShell
+> $RELEASE_TAG = build/hacks/get-newversion.ps1 -Version $NEW_VERSION -Prerelease $PRERELEASE_TAG -ReleaseType "major"
+> ```
+
+2. **Create a new branch from the main branch.**
+
+ ```bash
+ $BRANCH_NAME = "release/$RELEASE_TAG"
+ git checkout -b "$BRANCH_NAME"
+ ```
+
+3. **Cherry-pick the changes to a new branch** from the main branch. The new branch name should be `release/X.Y.Z`, where `X.Y.Z` is the new version number.
+
+ - Identify the commit hashes you want to include. You can find them using:
+
+ ```bash
+ git log
+ ```
+
+ - Cherry-pick the commits to the new branch. You can cherry-pick multiple commits at once by specifying their hashes separated by spaces.
+
+ ```bash
+ git cherry-pick
+ ```
+
+ - Resolve Any Conflicts (If Necessary)
+
+ If there are any conflicts during the cherry-pick process, Git will pause and allow you to resolve them. After resolving the conflicts, you can continue the cherry-pick process with:
+
+ ```bash
+ git status # Identify conflicts
+ # Resolve conflicts in your preferred editor
+ git add .
+ git cherry-pick --continue
+ ```
+
+4. **Create a tag and a release in GitHub.**
+
+ ```bash
+ git tag --sign "$RELEASE_TAG" -m "Release $RELEASE_TAG"
+ git push upstream "$BRANCH_NAME" --tags
+ ```
+
+> [!TIP]
+> To delete an existing tag, use the following command:
+>
+> ```bash
+> git tag --delete "$RELEASE_TAG"
+> git push upstream :refs/tags/"$RELEASE_TAG"
+> ```
+
+### Create a release using the ADO release pipeline
+
+Releases are created using the Containers-Toolkit ADO release pipeline. The release pipeline is triggered by the creation of a new release branch in GitHub. However, you can also create a [release manually](#manual-release).
+
+#### Manual release
+
+1. In the artifact section, select the `Default Branch` to use for the release.
+
+ *The branch created in step 2 should be selected.*
+
+ The release pipeline uses the branch name to determine the version number. The version number is derived from the branch name by removing the `release/` prefix.
+
+ For example:
+
+ | Branch Name | Version Number |
+ |----------------------|----------------|
+ | `release/v1.0.0` | `v1.0.0` |
+ | `release/v1.0.0-rc0` | `v1.0.0-rc0` |
+
+1. Create a new release.
+
+ This publishes the module to the [PowerShell Gallery][ctk-psg] and creates a new release in GitHub.
+
+### Verify the release
+
+1. Verify the PowerShell Gallery release:
+
+ ```PowerShell
+ Find-Module -Name containers-toolkit -AllVersions -AllowPrerelease
+ ```
+
+> [!IMPORTANT]
+> If the module has any issues, unlist the version in the [PowerShell Gallery][ctk-psg].
+
+2. Go to the created release in GitHub and do the following:
+ 1. Update the release notes.
+ 2. Verify that all files have been uploaded correctly and the scripts are signed. There should be three files:
+ - *containers-toolkit-.tar.gz*
+ - *containers-toolkit-.zip*
+ - *containers-toolkit-.SHA256*
+ 3. Publish the release. By default, the release is marked as a draft. To publish the release:
+ - Click on the **Edit** button.
+ - If it is a pre-release, check the **Set as a pre-releasee** checkbox.
+ - Finally, click on the **Publish release** button.
+
+[ctk-psg]: https://www.powershellgallery.com/packages/containers-toolkit
diff --git a/build/scripts/release/generate-hash.ps1 b/build/scripts/release/generate-hash.ps1
new file mode 100644
index 0000000..2a9cca9
--- /dev/null
+++ b/build/scripts/release/generate-hash.ps1
@@ -0,0 +1,63 @@
+###########################################################################
+# #
+# Copyright (c) Microsoft Corporation. All rights reserved. #
+# #
+# This code is licensed under the MIT License (MIT). #
+# #
+###########################################################################
+
+<#
+.SYNOPSIS
+Generates a hash for the specified file.
+
+.PARAMETER SourcePath
+The path to the file/folder to generate a hash for.
+ 1. To generate a hash for a file, specify the full path to the file.
+ 2. To generate a hash for all files in a folder, specify the full path to the folder and
+ use the wildcard '*'. E.g. 'C:\path\to\folder\*'.
+
+.PARAMETER ReleaseTag
+The release tag to use for the output file name.
+
+.PARAMETER Algorithm
+The hash algorithm to use. Defaults to SHA256.
+#>
+
+[CmdletBinding()]
+param (
+ [Parameter(Mandatory = $true)]
+ [ValidateScript({ Test-Path $_ })]
+ [String]$SourcePath,
+ [Parameter(Mandatory = $true)]
+ [String]$ReleaseTag,
+ [String]$Algorithm = "SHA256"
+)
+
+
+Write-Host "Generating hash: { Source: '$SourcePath', Algorithm '$Algorithm' }..." -ForegroundColor Cyan
+
+# Validate source path
+if (Test-Path -Path $SourcePath -PathType Container) {
+ # If the source path is a directory, check if it contains files.
+ if (-not (Get-ChildItem -Path $SourcePath -File -ErrorAction SilentlyContinue)) {
+ Write-Host "Source path is a directory but contains no files."
+ exit 1
+ }
+ if ($SourcePath -notmatch "(\*)$") {
+ # If the source path is a directory, append wildcard to the path.
+ # Get-FileHash supports wildcards, so we append '*' to the path,
+ # to include all files in the directory.
+ Write-Debug "Source path is a directory. Appending wildcard to the path."
+ $SourcePath = Join-Path -Path $SourcePath -ChildPath "*"
+ }
+}
+
+# Generate the output file name for the hash
+$sha_filename = "containers-toolkit-$ReleaseTag.$Algorithm"
+
+# Compute file Hash and dump to file
+Get-FileHash -Algorithm $Algorithm "$SourcePath" -ErrorAction Continue | `
+ ForEach-Object { "$($_.Hash) $($_.Path | Split-Path -Leaf)" } | `
+ Tee-Object -FilePath $sha_filename | Out-Null
+
+Write-Host "Created hash file '$sha_filename'" -ForegroundColor Green
diff --git a/build/scripts/release/generate-releasenotes.ps1 b/build/scripts/release/generate-releasenotes.ps1
new file mode 100644
index 0000000..b77440a
--- /dev/null
+++ b/build/scripts/release/generate-releasenotes.ps1
@@ -0,0 +1,62 @@
+<#
+ This script generates release notes for the current version of the project.
+ It uses a template file and replaces placeholders with actual values.
+
+ .PARAMETER ReleaseTag
+ The release tag to be used in the release notes. This is a mandatory parameter.
+
+ .PARAMETER ReleaseNotesTemplate
+ The path to the release notes template file. This is an optional parameter.
+ If not provided, the script will search for a file named "release-notes-template.md" in the current directory and its subdirectories.
+
+ .PARAMETER Destination
+ The destination path where the generated release notes will be saved. This is an optional parameter.
+ If not provided, the script will save the release notes in the root directory of the project with the name "release-note.txt".
+#>
+
+[CmdletBinding()]
+param (
+ [Parameter(Mandatory = $True)]
+ [String]$ReleaseTag,
+
+ [Parameter(Mandatory = $False)]
+ [ValidateScript({ Test-Path $_ -PathType Leaf })]
+ [String]$Template = (Get-ChildItem -Recurse -Filter "release-notes-template.md").FullName,
+
+ [Parameter(Mandatory = $False)]
+ [String]$Destination
+)
+
+$ROOT_DIR = (Get-Item "$PSScriptRoot").Parent.Parent.Parent.FullName
+Write-Host "Root directory: $ROOT_DIR"
+
+Write-Debug "Release tag: $ReleaseTag"
+Write-Debug "Release notes template: $Template"
+
+# Replace the placeholder with the actual release tag
+$trimmedTag = "$releaseTag".trim("v")
+$releaseNotes = [IO.File]::ReadAllText("$Template")
+$releaseNotes = $releaseNotes -replace "__MODULE_VERSION__", "$trimmedTag"
+$releaseNotes = $releaseNotes -replace "__RELEASE_TAG__", "$releaseTag"
+
+# Add the AllowPrerelease flag if this is a pre-release version
+$isPrelease = ($trimmedTag -split "-").Count -gt 1
+if ($isPrelease) {
+ Write-Debug "Pre-release version detected: $trimmedTag"
+ $releaseNotes = $releaseNotes -replace "__ALLOW_PRERELEASE__", "-AllowPrerelease"
+}
+else {
+ $releaseNotes = $releaseNotes -replace " __ALLOW_PRERELEASE__", ""
+}
+
+# Set destination path
+if ([String]::IsNullOrEmpty($Destination)) {
+ $Destination = "$ROOT_DIR"
+}
+
+# Generate the output file name for the release notes
+$RELEASENOTES_PATH = Join-Path -Path "$Destination" -ChildPath "release-note.txt"
+
+# Dump to file
+Write-Host "Publishing release notes to '$RELEASENOTES_PATH'"
+$releaseNotes | Out-File -FilePath "$RELEASENOTES_PATH" -Encoding utf8 -Force
diff --git a/build/scripts/release/get-versionfromBranch.ps1 b/build/scripts/release/get-versionfromBranch.ps1
new file mode 100644
index 0000000..c2197b2
--- /dev/null
+++ b/build/scripts/release/get-versionfromBranch.ps1
@@ -0,0 +1,56 @@
+<#
+This scripts gets the new version number based on the current release branch
+
+.PARAMETER ReleaseBranch
+The release branch to check for the new version number.
+Release branches are expected to be in the format 'release/X.Y.Z' or 'release/X.Y.Z-alpha'."
+
+.RETURN
+The new version number based on the current release branch.
+#>
+
+[CmdletBinding()]
+param (
+ [Parameter(Mandatory = $true)]
+ [string]$ReleaseBranch
+)
+
+$ErrorActionPreference = "Stop"
+
+$ValidationError = "Invalid version format in release branch: '$ReleaseBranch'. Expected format is 'release/X.Y.Z' or 'release/X.Y.Z-alpha'."
+
+# Validate the release branch
+if ($ReleaseBranch -notmatch '^(release/.*)$') {
+ Write-Error $ValidationError
+ exit 1
+}
+
+# Split the release branch to get the version number
+# Example: release/1.2.3-alpha
+$VersionSplit = ($ReleaseBranch -replace 'release/', '') -split "-"
+Write-Debug "VersionSplit ($($VersionSplit.Count)): $VersionSplit"
+
+# Set the version number based on the split
+$version = [Version]($VersionSplit[0] -replace 'v', '')
+switch ($VersionSplit.Count) {
+ 1 {
+ $ReleaseVersion = "$version"
+ }
+ 2 {
+ $PrereleaseTag = $VersionSplit[1].ToLower()
+ $ReleaseVersion = "$version-$PrereleaseTag"
+ }
+ Default {
+ Write-Error $ValidationError
+ }
+}
+
+# Generate the version object
+$result = [PSCustomObject]@{
+ Version = "$version"
+ Prerelease = $PrereleaseTag
+ ReleaseVersion = $ReleaseVersion
+ ReleaseTag = "v$ReleaseVersion"
+}
+Write-Debug $result
+return $result
diff --git a/build/scripts/release/publish-ctkmodule.ps1 b/build/scripts/release/publish-ctkmodule.ps1
new file mode 100644
index 0000000..e6883a0
--- /dev/null
+++ b/build/scripts/release/publish-ctkmodule.ps1
@@ -0,0 +1,323 @@
+###########################################################################
+# #
+# Copyright (c) Microsoft Corporation. All rights reserved. #
+# #
+# This code is licensed under the MIT License (MIT). #
+# #
+###########################################################################
+
+<#
+.SYNOPSIS
+Publishes the Containers-Toolkit module to the PowerShell Gallery.
+
+.PARAMETER ModulePath
+The path to the directory containing the module to publish. "containers-toolkit/"
+
+.PARAMETER ApiKey
+The PSGallery API key to use to publish the module.
+
+.PARAMETER ReleaseNotesPath
+Path to the release notes. Defaults to empty string.
+
+.PARAMETER Staging
+If specified, the module will be published to the staging repository.
+
+.PARAMETER Credential
+The credentials to use to register a repository. This is required if the staging repository does not exist.
+To generate credentials, use the following command:
+ $Credential = New-Object System.Management.Automation.PSCredential -ArgumentList $env:GITHUB_ACTOR, (ConvertTo-SecureString $env:GITHUB_TOKEN -AsPlainText -Force)
+
+Alternatively, you can use a key vault to store the credentials and retrieve them using the following command:
+ # https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.psresourceget/register-psresourcerepository?view=powershellget-3.x#example-4
+ $akv = Get-AzKeyVaultSecret -VaultName "" -Name ""
+ $Credential = New-Object System.Management.Automation.PSCredential("")
+
+#>
+
+
+[CmdletBinding()]
+param (
+ [Parameter(Mandatory = $false)]
+ [String]$ModulePath = "./containers-toolkit",
+
+ [Parameter(Mandatory = $true)]
+ [String]$ApiKey,
+
+ [Parameter(Mandatory = $false)]
+ [ValidateScript({ Test-Path $_ -PathType Leaf })]
+ [String]$ReleaseNotesPath,
+
+ [Parameter(Mandatory = $false)]
+ [Switch]$Staging,
+
+ [Parameter(Mandatory = $false)]
+ [String]$Credential
+)
+
+$ErrorActionPreference = "Stop"
+
+$SCRIPTS_DIR = $PSScriptRoot
+$ROOT_DIR = Split-Path -Parent (Split-Path -Parent $SCRIPTS_DIR)
+Write-Debug "Root directory: $ROOT_DIR"
+
+# Get module absolute path
+$ModulePath = Resolve-Path $ModulePath
+$ModuleManifestPath = Join-Path -Path $ModulePath -ChildPath "containers-toolkit.psd1"
+
+# Read the module manifest
+Write-Debug "Reading module manifest file: $ModuleManifestPath"
+$ModuleManifest = Invoke-Expression -Command (Get-Content -Path $ModuleManifestPath -Raw)
+$manifestPsData = $ModuleManifest.PrivateData.PSData
+
+# Get module info
+Write-Debug "Getting module info..."
+$ModuleInfo = Get-Module -ListAvailable "$ModuleManifestPath"
+
+# Get the module name in Camel Case
+Write-Debug "Extracting module name..."
+$ModuleName = $ModuleInfo.Name.ToLower()
+$separator = '-'
+$ModuleName = ($ModuleName -split "$separator" | ForEach-Object { $_.Substring(0, 1).ToUpper() + $_.Substring(1) }) -join "$separator"
+
+# Get the module version
+Write-Debug "Extracting module version..."
+$ReleaseVersion = $ModuleInfo.Version.ToString()
+if ($manifestPsData.Prerelease) {
+ $ReleaseVersion = "$ReleaseVersion-$($manifestPsData.Prerelease)"
+}
+
+# Get the release notes
+Write-Debug "Getting release notes..."
+$ReleaseNotes = if ($ReleaseNotesPath) { Get-Content -Path $ReleaseNotesPath -Raw } else { '' }
+
+# Set variables for the script
+Set-Variable -Name ModuleVersion -Value $ReleaseVersion -Scope Script -Force
+Set-Variable -Name ModuleName -Value $ModuleName -Scope Script -Force
+Set-Variable -Name ModuleManifestPath -Value $ModuleManifestPath -Scope Script -Force
+Set-Variable -Name ReleaseNotes -Value $ReleaseNotes -Scope Script -Force
+Set-Variable -Name ApiKey -Value $ApiKey -Scope Script -Force
+Set-Variable -Name Staging -Value $Staging -Scope Script -Force
+
+function Register-CossRepository {
+ param (
+ [Parameter(Mandatory = $true)]
+ [String]$RepositoryName
+ )
+
+ $repository = Get-PSRepository -Name $RepositoryName -ErrorAction SilentlyContinue
+ if ($repository) {
+ return
+ }
+
+ if (-not $Credential) {
+ Write-Error ([System.ArgumentNullException]::new("Credential is required to register a repository. Please provide a valid credential using the '-Credential' parameter.")) -ErrorAction Stop
+ }
+
+ $Uri = "https://nuget.pkg.github.com/microsoft/index.json"
+ Write-Host "Registering repository...`n`t{ Name: '$RepositoryName', Uri: '$Uri' }"
+ Register-PSResourceRepository -Name $RepositoryName -Trusted -Uri "$Uri" -Credential $Credential
+}
+
+function New-NugetSpec {
+ # Update the nuget spec
+ $NugetSpecPath = Join-Path -Path (Split-Path -Parent $ModulePath) -ChildPath "containers-toolkit.nuspec"
+ if (-not (Test-Path -Path $NugetSpecPath)) {
+ Write-Host "Creating nuspec file: '$NugetSpecPath'"
+ nuget.exe spec "$ModuleName"
+ }
+
+ # Read the nuspec file
+ [xml]$NugetSpec = Get-Content $NugetSpecPath
+ $metadata = $NugetSpec.package.metadata
+ $files = $NugetSpec.package.files
+
+ # Update nuspec file metadata
+ $metadata.version = $ReleaseVersion
+ $metadata.authors = $ModuleManifest.Author
+ $metadata.description = $ModuleManifest.Description
+ $metadata.copyright = $ModuleManifest.Copyright
+ $metadata.requireLicenseAcceptance = $manifestPsData.RequireLicenseAcceptance.ToString().ToLower()
+ $metadata.projectUrl = $manifestPsData.ProjectUri
+ $metadata.releaseNotes = $manifestPsData.releaseNotes
+ $metadata.tags = ($manifestPsData.Tags -join ' ')
+
+ # Update release branch
+ $branchName = "release/v$ReleaseVersion"
+ $repoNode = $metadata.SelectSingleNode("repository")
+ if (!$repoNode) {
+ Write-Debug "Creating node in the nuspec file"
+ $repoNode = $NugetSpec.CreateElement("repository")
+ $repoNode.SetAttribute("type", "git")
+ $repoNode.SetAttribute("url", "$($manifestPsData.ProjectUri)")
+ $metadata.AppendChild($repoNode) | Out-Null
+ }
+ $repoNode.SetAttribute("branch", "$branchName") | Out-Null
+
+ # Create the node if it doesn't exist
+ if (!$files) {
+ Write-Debug "Creating node in the nuspec file"
+ $files = $NugetSpec.CreateElement("files")
+ $NugetSpec.package.AppendChild($files) | Out-Null
+ }
+ $filesNode = $NugetSpec.package.SelectSingleNode("files")
+
+ # Add files to the nuspec file
+ @( "LICENSE", "README.md") | ForEach-Object {
+ $fileInfo = Get-ChildItem -Path $ROOT_DIR -File -Filter "$_" -ErrorAction SilentlyContinue | Select-Object -First 1
+ $fileName = $fileInfo.Name
+ if ($fileName) {
+ $f = [System.IO.Path]::GetFileNameWithoutExtension($fileName).ToLower() # File name without extension
+ if ($f -eq "LICENSE") {
+ $fileName = "LICENSE.txt"
+ Copy-Item -Path $fileInfo.FullName -Destination "$ROOT_DIR/$fileName" -Force | Out-Null
+ }
+
+ # Update the node and node
+ $elementNode = $metadata.SelectSingleNode($f)
+ if ($elementNode) {
+ $metadata.RemoveChild($elementNode) | Out-Null
+ }
+ Write-Debug "Adding '$fileName' element to nuspec file"
+ $elementNode = $NugetSpec.CreateElement($f)
+ if ($f -eq "LICENSE") { $elementNode.SetAttribute("type", "file") }
+ $elementNode.InnerText = $([System.IO.Path]::GetFileName($fileName))
+ $metadata.AppendChild($elementNode) | Out-Null
+
+ # Update the node
+ $fileNode = $filesNode.SelectSingleNode("file[@src='$fileName']")
+ if (!$fileNode) {
+ Write-Debug "Adding '$fileName' file to nuspec file"
+ $fileNode = $NugetSpec.CreateElement("file")
+ $fileNode.SetAttribute("src", $([System.IO.Path]::GetFileName($fileName)))
+ $fileNode.SetAttribute("target", "")
+ $filesNode.AppendChild($fileNode) | Out-Null
+ }
+ }
+ }
+
+ # Create the node if it doesn't exist
+ $dependenciesNode = $metadata.SelectSingleNode("dependencies")
+ if (!$dependenciesNode) {
+ Write-Debug "Creating node in the nuspec file"
+ $dependenciesNode = $NugetSpec.CreateElement("dependencies")
+ $metadata.AppendChild($dependenciesNode) | Out-Null
+ }
+
+ # Remove default grouped dependencies
+ if ($metadata.dependencies.group) {
+ Write-Debug "Removing default grouped dependencies from the nuspec file"
+ $groupNode = $metadata.SelectSingleNode("dependencies").SelectSingleNode("group")
+ $metadata.dependencies.RemoveChild($groupNode) | Out-Null
+ }
+
+ # Update the dependencies
+ $dependencies = $manifestPsData.ExternalModuleDependencies
+ if ($dependencies) {
+ # Add dependencies
+ Write-Debug "Adding dependencies to the nuspec file"
+ foreach ($dependency in $dependencies ) {
+ # Check if the dependency already exists
+ $existingDependency = $metadata.SelectSingleNode("dependencies/dependency[@id='$dependency']")
+ if ($existingDependency) {
+ Write-Debug "Dependency '$dependency' already exists in the nuspec file"
+ continue
+ }
+ $dependencyElement = $NugetSpec.CreateElement("dependency")
+ $dependencyElement.SetAttribute("id", $dependency)
+ $dependencyElement.SetAttribute("version", "0.0.0")
+ $metadata.SelectSingleNode("dependencies").AppendChild($dependencyElement) | Out-Null
+ }
+ }
+
+ # Update the nuget spec file
+ $NugetSpec.Save($NugetSpecPath)
+
+ return $NugetSpecPath
+}
+
+function Publish-CTKModule {
+ param (
+ [Parameter(Mandatory = $false)]
+ [String]$RepositoryName = "PsGallery",
+
+ [Parameter(Mandatory = $true)]
+ [ValidateScript({ Test-Path $_ })]
+ [String]$Path
+ )
+
+ Write-Host "Publishing module...`n`t{ Repository: '$RepositoryName', Source: '$Path' }"
+
+ # Set parameters for Publish-PSResource
+ $params = @{
+ Repository = "$RepositoryName"
+ }
+ switch ($RepositoryName) {
+ "PsGallery" {
+ $params.Path = $Path
+ }
+ Default {
+ $params.NupkgPath = $Path
+ }
+ }
+ Write-Debug "Publish-PSResource parameters: $([pscustomobject]$params)"
+
+ # Set the API key
+ $params.ApiKey = $ApiKey
+
+ # Publish the module
+ Publish-PSResource @params
+}
+
+
+################################################################
+################################################################
+######################## PUBLISH MODULE ########################
+################################################################
+################################################################
+
+# Parameters: PSGallery
+$ReleasePath = $ModulePath
+$RepositoryName = "PSGallery"
+
+# Parameters: staging repository
+if ($Staging) {
+ # Register the staging repository
+ $RepositoryName = "COSS.CTK.Staging"
+ Register-CossRepository -RepositoryName $RepositoryName
+
+ # Generate nuget spec
+ $NugetSpecPath = New-NugetSpec
+
+ # Pack the module
+ Write-Host "Packing module to nuget package...`n`t{ Source: '$NugetSpecPath' }"
+ nuget pack "$NugetSpecPath" -BasePath "$ROOT_DIR" -OutputDirectory "$ROOT_DIR"
+
+ # Get the nuget package
+ $nugetPackages = Get-ChildItem -Path "$OutputDirectory" -Filter "$ModuleName*.nupkg"
+ if ($nugetPackages.Count -eq 0) {
+ Write-Error "No nuget packages found in '$ModulePath'"
+ return
+ }
+
+ if ($nugetPackages.Count -gt 1) {
+ $packagePaths = $nugetPackages.FullName -join ", "
+ Write-Error "Multiple nuget packages found in '$ModulePath': $packagePaths"
+ }
+
+ # Parameters for Publish-Module
+ $ReleasePath = $nugetPackages[0].FullName
+}
+
+# Publish the module
+$params = @{
+ RepositoryName = $RepositoryName
+ Path = $ReleasePath
+}
+Publish-CTKModule @params
+
+# Clean up
+Write-Debug "Cleaning up files..."
+@("LICENSE.txt", "*.nupkg") | ForEach-Object {
+ Write-Debug "Removing files: $_"
+ Get-ChildItem -Path "$ROOT_DIR" -Filter "$_" | Remove-Item -Force -ErrorAction SilentlyContinue
+}
diff --git a/build/scripts/release/setup-env.ps1 b/build/scripts/release/setup-env.ps1
new file mode 100644
index 0000000..1ba9f35
--- /dev/null
+++ b/build/scripts/release/setup-env.ps1
@@ -0,0 +1,44 @@
+<#
+ This script sets up the environment for releasing the Containers-Toolkit modules.
+ It installs the required modules and sets up the PSGallery repository.
+#>
+
+Write-Host "Installing Nuget provider..."
+Install-PackageProvider -Name NuGet -Force -ErrorAction Continue | Out-Null
+
+# Install the latest version of PowerShellGet and PackageManagement
+@("PowerShellGet", "PackageManagement") | ForEach-Object {
+ $ModuleName = $_
+
+ if (Get-Module -ListAvailable -Name $ModuleName) {
+ Write-Host "Updating $ModuleName..."
+ Update-Module $ModuleName -AcceptLicense -Confirm:$false -Force -ErrorAction Continue
+ }
+ else {
+ Write-Host "Installing $ModuleName..."
+ Install-Module $ModuleName -AllowClobber -Force -ErrorAction Continue
+ }
+}
+
+# Install the latest version of Microsoft.PowerShell.PSResourceGet
+if (-not (Get-Module -ListAvailable -Name Microsoft.PowerShell.PSResourceGet)) {
+ Write-Host "Installing Microsoft.PowerShell.PSResourceGet..."
+ Install-Module Microsoft.PowerShell.PSResourceGet -AllowClobber -Force -ErrorAction Continue
+}
+
+# Validate the installation
+Get-Module Microsoft.PowerShell.PSResourceGet -ListAvailable | Format-List
+
+# Set PSGallery as trusted repository
+Write-Host "Setting PSGallery as trusted repository..."
+try {
+ $PSGallery = Get-PSResourceRepository -Name "PSGallery" -ErrorAction Stop
+ if (-not $PSGallery.Trusted) {
+ Write-Host "Setting PSGallery as trusted repository..."
+ Set-PSResourceRepository -Name "PSGallery" -Trusted -ErrorAction Stop
+ }
+}
+catch {
+ Write-Host "Initializing PSResourceRepository store..."
+ Register-PSResourceRepository -PSGallery -Trusted -ErrorAction Stop
+}
diff --git a/build/scripts/release/update-ctkmanifest.ps1 b/build/scripts/release/update-ctkmanifest.ps1
new file mode 100644
index 0000000..e34e98c
--- /dev/null
+++ b/build/scripts/release/update-ctkmanifest.ps1
@@ -0,0 +1,92 @@
+###########################################################################
+# #
+# Copyright (c) Microsoft Corporation. All rights reserved. #
+# #
+# This code is licensed under the MIT License (MIT). #
+# #
+###########################################################################
+
+<#
+.SYNOPSIS
+Updates the version of the containers-toolkit module in the module manifest file.
+
+The script is a PowerShell script that takes two parameters:
+.PARAMETER ManifestPath
+The path to the module manifest file.
+Defaults to the first containers-toolkit.psd1 file found in the repository.
+
+.PARAMETER Version
+The new version number to update the module manifest file to.
+
+.PARAMETER Prerelease
+Pre-release version string. Defaults to empty string.
+Examples of supported Prerelease string are: -alpha, -alpha1, -BETA, -update20171020
+
+.PARAMETER ReleaseNotesPath
+Path to the release notes. Defaults to empty string.
+#>
+
+[CmdletBinding()]
+param (
+ [Parameter(Mandatory = $false)]
+ [ValidateScript({ Test-Path $_ -PathType Leaf })]
+ [String]$ManifestPath = (Get-ChildItem -Recurse -Filter "containers-toolkit.psd1").FullName,
+
+ [Parameter(Mandatory = $true)]
+ [String]$Version,
+
+ [Parameter(Mandatory = $false)]
+ [String]$PrereleaseTag,
+
+ [Parameter(Mandatory = $false)]
+ [String]$ReleaseNotesPath
+)
+
+$ErrorActionPreference = 'Stop'
+
+Set-Variable -Name ManifestPath -Value $ManifestPath -Scope Script -Force
+Set-Variable -Name Version -Value $Version -Scope Script -Force
+Set-Variable -Name ReleaseNotesPath -Value $ReleaseNotesPath -Scope Script -Force
+Set-Variable -Name Prerelease -Value $Prerelease -Scope Script -Force
+
+
+function Update-CTKModuleManifest {
+ [CmdletBinding(
+ SupportsShouldProcess = $true,
+ ConfirmImpact = 'High'
+ )]
+ param()
+
+ begin {
+ $WhatIfMessage = "Module version will be updated to new version. { Version: '$Version', Prerelease: '$PrereleaseTag' }"
+ }
+
+ process {
+ if ($PSCmdlet.ShouldProcess($ManifestPath, $WhatIfMessage)) {
+ Write-Information -MessageData "Updating module version in manifest file '$ManifestPath'. $WhatIfMessage." -InformationAction Continue
+
+ # Get release notes
+ $ReleaseNotes = if ($ReleaseNotesPath) { Get-Content -Path $ReleaseNotesPath -Raw } else { '' }
+
+ # Update the module manifest
+ $params = @{
+ Path = $manifestPath
+ ModuleVersion = $Version
+ Prerelease = $PrereleaseTag
+ ReleaseNotes = $ReleaseNotes
+ RequireLicenseAcceptance = $true
+ }
+ Update-ModuleManifest @params
+
+ # Test the manifest script is valid
+ Test-ModuleManifest -Path $manifestPath | Out-Null
+ }
+ else {
+ # Code that should be processed if doing a WhatIf operation
+ # Must NOT change anything outside of the function / script
+ return
+ }
+ }
+}
+
+Update-CTKModuleManifest -Confirm:$false
diff --git a/build/scripts/update-ctkmanifest.ps1 b/build/scripts/update-ctkmanifest.ps1
deleted file mode 100644
index 179678f..0000000
--- a/build/scripts/update-ctkmanifest.ps1
+++ /dev/null
@@ -1,103 +0,0 @@
-###########################################################################
-# #
-# Copyright (c) Microsoft Corporation. All rights reserved. #
-# #
-# This code is licensed under the MIT License (MIT). #
-# #
-###########################################################################
-
-<#
-.SYNOPSIS
-Updates the version of the containers-toolkit module in the module manifest file.
-
-The script is a PowerShell script that takes two parameters:
-.PARAMETER ManifestPath
-The path to the module manifest file.
-Defaults to the first containers-toolkit.psd1 file found in the repository.
-
-.PARAMETER ReleaseType
-The type of release to perform.
-Defaults to 'patch'.
-#>
-
-[CmdletBinding()]
-param (
- [Parameter(Mandatory = $false)]
- [ValidateScript({ Test-Path $_ -PathType Leaf })]
- [String]$ManifestPath = (Get-ChildItem -Recurse -Filter "containers-toolkit.psd1").FullName,
-
- [Parameter(Mandatory = $false)]
- [ValidateSet('major', 'minor', 'patch')]
- [String]$ReleaseType = 'patch'
-)
-
-$Script:ManifestPath = $ManifestPath
-$Script:ReleaseType = $ReleaseType
-
-function Get-NewVersion {
- [version]$currentVersion = (Get-Module -ListAvailable -Name $Script:ManifestPath).Version
-
- $Major = $currentVersion.Major
- $Minor = $currentVersion.Minor
- $Build = $currentVersion.Build
-
- switch ($Script:ReleaseType) {
- # MAJOR version is increased for incompatible API changes.
- 'major' {
- $Major++
- $Minor = 0
- $Build = 0
- }
- # MINOR version is increased for backward-compatible feature additions.
- 'minor' {
- $Minor++
- $Build = 0
- }
- # PATCH version is increased for backward-compatible bug fixes.
- 'patch' {
- $Build++
- }
- Default {
- Write-Error "Invalid release type specified: '$Script:ReleaseType'"
- exit 1
- }
- }
-
- return (New-Object Version -ArgumentList $major, $minor, $build).ToString()
-}
-
-function Update-CTKModuleManifest {
- [CmdletBinding(
- SupportsShouldProcess = $true,
- ConfirmImpact = 'High'
- )]
- param()
-
- begin {
- $NewSemVer = Get-NewVersion
- $WhatIfMessage = "Module version will be updated to version $NewSemVer"
- }
-
- process {
- if ($PSCmdlet.ShouldProcess($Script:ManifestPath, $WhatIfMessage)) {
- $Params = @{
- Path = $manifestPath
- ModuleVersion = $NewSemVer
- LicenseUri = "https://github.com/microsoft/containers-toolkit/blob/v$NewSemVer/LICENSE"
- }
- Update-ModuleManifest @Params
-
- # Test the manifest script is valid
- Test-ModuleManifest -Path $manifestPath | Out-Null
-
- return $NewSemVer
- }
- else {
- # Code that should be processed if doing a WhatIf operation
- # Must NOT change anything outside of the function / script
- return
- }
- }
-}
-
-Update-CTKModuleManifest -Confirm:$false
diff --git a/containers-toolkit/containers-toolkit.psd1 b/containers-toolkit/containers-toolkit.psd1
index b6ded73..6aea094 100644
--- a/containers-toolkit/containers-toolkit.psd1
+++ b/containers-toolkit/containers-toolkit.psd1
@@ -136,13 +136,13 @@ Note that the HostNetworkingService module is available only when the Hyper-V Wi
PrivateData = @{
PSData = @{
# Tags applied to this module. These help with module discovery in online galleries.
- Tags = 'Containerd', 'Buildkit', 'nerdctl', 'Windows Containers', 'Container Tools'
+ Tags = 'Containerd', 'Buildkit', 'nerdctl', 'CNI', 'WindowsContainers', 'ContainerTools'
# A URL to the license for this module.
- LicenseUri = 'https://raw.githubusercontent.com/microsoft/containers-toolkit/main/LICENSE'
+ LicenseUri = 'https://raw.githubusercontent.com/microsoft/containers-toolkit/refs/heads/main/LICENSE'
# A URL to the main website for this project.
- ProjectUri = 'https://github.com/microsoft/containers-toolkit'
+ ProjectUri = 'https://github.com/microsoft/containers-toolkit.git'
# A URL to an icon representing this module.
# IconUri = ''
@@ -164,7 +164,7 @@ Note that the HostNetworkingService module is available only when the Hyper-V Wi
} # End of PrivateData hashtable
# HelpInfo URI of this module
- # HelpInfoURI = ''
+ HelpInfoURI = 'https://github.com/microsoft/containers-toolkit/blob/main/README.md'
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''