The following list outlines the steps necessary for a successful release of Azure PowerShell. Please check off the boxes as you complete the steps.
- On aka.ms, request access to
azure-powershellget(redirect link for Azure PowerShell),azure-powershellget2(second redirect link for Azure PowerShell),azps-release(redirect link to GitHub release) andazure-powershellvs(redirect link for Azure Stack) - Join the Microsoft organization on GitHub to gain access to the
WebPlatformInstallerFeedrepository- Note: you can join this organization on the same page that you join the Azure organization (https://aka.ms/azuregithub)
- After gaining access to this repository, create your own fork and clone it to your machine
- Install Orca
- You can find a link to the msi here:
\\aaptfile01\ADXSDK\PowerShell\Orca.msi
- You can find a link to the msi here:
-
For all existing PRs in the
azure-powershellrepo targeting thepreviewbranch, run thepowershell-demandJenkins job on each one, and merge if the build is successful, does not conflict with thepreviewbranch, and has been signed off by a member of the team -
Run the
powershell-demandJenkins job against thepreviewbranch and fix any issues if the build is not green -
In the Azure PowerShell repo, create a branch for the release and name it
release-X.X.X -
Restrict access to the release branch through the GitHub settings so partners cannot merge their PRs themselves
- In the settings window, find the
Protected branchessection, and select the release branch from the drop-down menu - Make sure the following are the only things checked off:
- Protect this branch
- Require pull request reviews before merging
- Dismiss stale pull request approvals when new commits are pushed
- Require status checks to pass before merging
- default (located under Status checks found in the last week for this repository)
- continuous-integration/travis-ci
- license/cla
- Restrict who can push to this branch
- Make sure to add Azure/adx-sdk-manage to this list of people with push access
- You can check the settings for the
previewbranch if you have any questions
- In the settings window, find the
-
Clone your fork of the Azure PowerShell repo to your computer, and switch to the release branch
- Make sure to run
git clean -xdfto wipe any changes from a previous branch - Rebuild the solution by opening the VS Developer Prompt and running
msbuild build.proj
- Make sure to run
-
Versioning tool
-
Create a pull request (targeted at the release branch) with these changes to the versions
- Kick off a
ps-signjob based on this pull request to ensure that all packages are signed and show up in theBuild Artifacts - Kick off a
powershell-demandjob based on this pull request - Merge the pull request when all jobs have passed and have been signed-off (i.e., successfull installation verification and passed all smoke tests)
- Kick off a
-
From the above
ps-signjob, click onBuild Artifactsdownload the zip, and unzip it somewhere on your machine- This zip file will contain the .msi for Azure PowerShell, and all of its .nupkg packages
-
Navigate to
\\aaptfile01\ADXSDK\PowerShelland create a new folder the release- Follow the format of previous release folders:
yyyy_mm_dd_PowerShell
- Follow the format of previous release folders:
-
Copy the contents from the
PSReleaseDropfolder to the folder you just created- The contents include:
scriptsfolderREADME.txtRegisterRepository.ps1removewebpiReg.regwebpiReg.regwpilauncher.exe
- The contents include:
-
Open the
webpiReg.regfile and make sure thatProductXmlLocationis updated with the new shared folder path -
Copy the msi (from the achive folder you unzipped) over to the shared folder you created above, renaming it to
azure-powershell.X.X.X.msi -
Create a folder called
pkgsin the shared folder and copy the.nupkgfiles fromarchive/src/Packageinto it -
Run Orca and drag
azure-powershell.X.X.X.msiinto the window. On the left side of the window, clickPropertyand copy the entry forProductCode -
In your cloned
WebPlatformInstallerrepository, create a new branch calledrelease-X.X.X. -
Modify
Src/azuresdk/AzurePS/DH_AzurePS.xml- Copy the last
<discoveryHint>entry (including<msiProductCode>) who shares the same<msiProductCode>as the discovery hint inDH_WindowsAzurePowerShellGet. Paste those three lines after the three lines you just copied, and update the<msiProductCode>with theProductCodeyou retrieved earlier - Update the
<msiProductCode>entry inDH_WindowsAzurePowerShellGetwith theProductCodeyou retrieved earlier
- Copy the last
-
Modify
Src/azuresdk/AzurePS/WebProductList_AzurePS.xml- Find the section for
<productId>WindowsAzurePowerShellGet</productId> - Update the
<version>entry - Update the
<published>and<updated>entries to the date of the release - Update the version in both
<trackingURL>entries - Update both
<installerURL>entries to point at the shared folder you created
- Find the section for
-
Using
cmd, navigate toWebPlatformInstaller/Toolsand runBuild.cmd -
Copy the
.xmlfiles fromWebPlatformInstaller/binand paste them into the shared folder
-
Testing scenarios
-
Once all of the tests have passed, send an email to all partners with the path to the shared folder
- Make sure to tell the partners to update their change log with any changes that they made that aren't currently found in it for the release
- Copy the e-mail contents and post it on the slack channels (
#powershelland#powershell-announce)
-
After the initial release candidate was sent out, give the partner teams three business days to sign off
-
Run the
tools\UpdateChangeLog.ps1script to update the root change log to include all of the changes made this release to each service- Create a pull request to submit these changes to the release branch and make sure that all of the change logs get updated properly and that the psd1 files include the changes in their release notes
-
Give anyone with an open PR, or those that are creating a new PR making quick additions, a chance to target the release branch, get their code reviewed, and run a successful
powershell-demandjob -
Once candidate PRs are either merged or pushed back, run the
powershell-signjob on the release branch and notify partner teams of this release candidate- Note: For additional release candidates created, make sure to update the
DH_AzurePS.xmlfile with the new product code of the .msi (obtained from Orca) and regenerate the other .xml files as mentioned previously (or with theBuildDrop.ps1script)
- Note: For additional release candidates created, make sure to update the
-
After the final release candidate is out, push the modules to the test gallery using the
ModulePublishermodule. To install the modules necessary for test publishing to the gallery, open up a new PowerShell window, change your directory to the scripts folder in the registry entry, and run the following command:Import-Module "ModulePublisher\ModulePublisher.psd1"
-
Use
Login-AzureRmAccountto login to your corporate account -
Run the following command to test publishing to the gallery
Publish-RMModules $Path $NugetExe $RepoName -WhatIf
$Pathis the path to thepkgsfolder (you may want to copy these files somewhere locally so you don't have to get them from the shared folder)$NugetExeis the path to thenuget.exefile on your computer$RepoNameis the name of the gallery you are pushing to, so in this case, it will beTestGalleryWhatIfis a SwitchParameter that will allow you to see in what order the modules will be published. You want to make sure thatAzureRM.Profilewill be published first, followed byAzureRM.Storage, and thenAzure, and the last module to be published isAzureRM. Once you see that this is the correct ordering of modules, remove theWhatIfparameter to push them to the test gallery.- NOTE: make sure that the "Release Notes" section of
AzureRM.psd1do not contain more than 10,000 characters, or the push to the gallery will fail
-
Smoke test these modules with the same steps used above for testing
-
Install Azure Storage Explorer and upload the .msi file to the download blob container
- The storage account name and storage account key can be retrieved from KeyVault
- Upload the
azure-powershell.X.X.X.msifile from the shared folder to the latest downloads folder
-
Update
aka.ms/azure-powershellgetoraka.ms/azure-powershellget2with the link to the msi you just uploaded to Storage Explorer- You will update whichever aka.ms link contains the older Azure PowerShell msi. For example, if
azure-powershellgetcontains a link to 3.0.0, andazure-powershellget2contains a link to 3.1.0, you will updateazure-powershellget(since it contains the older of the two links)
- You will update whichever aka.ms link contains the older Azure PowerShell msi. For example, if
-
Submit a pull request to the WebPI feed and send an email to Chris Sfanos asking to merge the PR at the time of the release
- The pull request should just include changes to the
WebProductList_AzurePS.xmlandDH_AzurePS.xmlfiles - Note: make sure that the changes to the installerUrl have been reverted to the
aka.mslinks and that they point to theaka.mslink that was updated in the previous step
- The pull request should just include changes to the
-
Follow the same steps for test publishing, except
$RepoNamewill now bePSGallery- It may be helpful to run the command with the
WhatIfparameter to make sure thatProfileis being published first,Storageis published second, andAzureRMis published last' - NOTE: update the release notes in each psd1 file to include a link to the change log from the public GitHub Release that we just created
- It may be helpful to run the command with the
-
Follow the same steps for smoke testing that we followed above
-
Smoke test the live WebPI feed
-
Create a public GitHub Release with appropriate tag
- Use the change log from this release as the content of the document
- Include the .msi file and include a link to it at the top of the document with "Installer: Windows Standalone"
- Include the changes since the last release at the end of the document
-
Send an email to all partners with the locations of where the release can be accessed: the PowerShell Gallery modules (both Azure and AzureRM), the WebPI feed, and the GitHub release
- Copy the e-mail contents and post it on the slack channels (specifically
#powershelland#powershell-announce)
- Copy the e-mail contents and post it on the slack channels (specifically
-
Create a pull request to merge the release branch to master, and then merge it once the build passes
-
Delete the release branch
-
Create a pull request to merge the master branch to dev, and then merge it once the build passes
-
Resolve any issues, close the release milestone, and create a new milestone for +3 months
- Contact partners about any of their bugs still open in the release milestone, and ensure that all bugs are either closed or moved into the appropriate milestone
Place the .nupkg files from this release and the previous release in a common folder on your machine. Run the following command to register the repository:
Register-PSRepository -Name {{repositoryName}} -SourceLocation {{folderPath}} -PackageManagementProvider NuGet -InstallationPolicy TrustedInstall-Module -Name AzureRM -Repository {{repositoryName}}
.\RunInstallationTests.ps1Install-Module -Name AzureRM -Repository {{repositoryName}} -RequiredVersion {{previousVersion}}
Update-Module -Name AzureRM
.\RunInstallationTests.ps1Install-Module -Name AzureRM.Compute -Repository {{repositoryName}}
Get-AzureRmVM
Get-ModuleInstall-Module -Name AzureRM.Compute -Repository {{repositoryName}} -RequiredVersion {{previousVersion}}
Update-Module -Name AzureRM.Compute
Get-AzureRmVM
Get-Module