* Run publish on failed or succeeded
* Expand agent os string detection
* Check agent job status env var for artifact name detection
* Add sbomEnabled flag to publish template
* Fix image and artifact name conditional
---------
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
* Support resolving environment variable references in matrix config
* Improve type and null handling
* Fix reference bug
* Change behavior on missing env vars to throw
---------
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
* Prepare-Release.ps1: Make dateTime.ToString("MM/dd/yyyy") to work on exotic set-ups
On my machine, I experimented with the registry, and the worst part is that I don't remember/know how to reset it back.
The work items that script produces, do have datetimes for the upcoming releases in the `MM-dd-yyyy` format, and then I have to correct them by hand.
`dateTime.ToString("MM/dd/yyyy")` does produce the date in the format of `MM-dd-yyyy` on my machine. This also happens if I write a corresponding .NET app.
The fix that I am proposing makes it work on my specific setup and hopefully breaks no one else. I understand if you are hesitant to take it. Let me know, I'll see how I can restore my setting.
But on the other hand, I don't think it makes anything worse, it only makes things more robust, so maybe take it?
* Use [CultureInfo]::InvarialtCulture
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
* Update eng/common/scripts/Prepare-Release.ps1
* Update eng/common/scripts/Prepare-Release.ps1
---------
Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
* Remove package retrieval when verify pkg version
* Modified description of PackageName parameter
---------
Co-authored-by: Ray Chen <raychen@microsoft.com>
* Correct the name of JS package folder
* Uncomment the package verification
* Logging more info for troubleshooting
* Get sdkType and directory from the package info
---------
Co-authored-by: Ray Chen <raychen@microsoft.com>
* Add ConflictedFile to git-helpers.ps1, add git-helpers.tests.ps1 to exercise basic functionality.
* Add `resolve-asset-conflict.ps1` a script that can autoresolve an assets.json file.
---------
Co-authored-by: Scott Beddall (from Dev Box) <scbedd@microsoft.com>
Co-authored-by: Scott Beddall <45376673+scbedd@users.noreply.github.com>
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
* Added script and pipeline for spec location validation
SDK release pipeline would run this validation to ensure the spec comes from
the main branch of Azure/azure-rest-api-specs repo
* Update parameter
* Use github rest api to validate commit
* Added token parameter
* Support more yaml cases and other languages
* Removed the default setting in yaml template
* Only validate in case of GA package
* Follow APIView to retrieve package version for verification
* Get github token from env variable
* Removed obsolete parameter
---------
Co-authored-by: raychen <raychen@microsoft.com>
* Add package filter parameter to select recursively found packages in release
* Handle empty value for packageFilter
---------
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
Http Status code 401 just be unauthorized and not necessarily that the link isn't valid. Removing this from the list of codes to error from.
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
* Create new pipeline to create package work item
* Update powershell script to pass tag
* Fixes as per review comments
* Update as per review comments
* Login as az devops
* Create new entry point script to create package work item
* Load common ps module
* Add devops login step
* Pipe login token to devops login
* Pipe login token to devops login
* Add looging
* more logging
* Remove duplicate login from new script and add more logging
* More logging to debug create work item
* Remove script added for debugging
* Skip az interactive login when PAT is passed
* Remove debug logging
---------
Co-authored-by: praveenkuttappan <praveenkuttappan@gmail.com>
* Update branch deletion code
- Update to use the gh cli for github operations
- Switch to using graphql for pulling branches as the rest api
starts to fail after a certain number of branches and we can
also pull back all the associated data like pull request info
and commit date all in one query.
- switc to running on ubuntu 1ES pool
Improve query error handling
Fix condition
Fix slash escaping on the command line
clean-up pipeline
* Update eng/common/scripts/Delete-RemoteBranches.ps1
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
* Update eng/common/scripts/Delete-RemoteBranches.ps1
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
---------
Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
* Remove codeowners resolution logic from docs scripts
* Remove parameters that aren't needed
* Remove auth information from update-docsms-metadata.yml
---------
Co-authored-by: Daniel Jurek <djurek@microsoft.com>
* Add autorest-preview pipeline
* Add emitternpminstall
* Always install
* Use shorter leg name
* Add short circuiting to emitter install
* Use language matrix function
* Don't look for subfolders in the matrix package folders
* Revert unnecessary eng/common changes
* Rewrite GetPullRequestUrl to Get-BuildSourceDescription
* Remove alias from Invoke-LoggedCommand
* Use invoke-expression instead of shelling out
* Add better job splitting
* Replace Folder with Directory
---------
Co-authored-by: Patrick Hallisey <pahallis@microsoft.com>
* Add LockDeletionForDays parameter to set PodDisruptionBudget and cleanup job
* Use matrix for parallel tests. PDB improvements+docs.
* Fix kubectl namespace context preservation on login
---------
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
* fixes
* ongoing
* ongoing
* add top-level throw/catches showing exception info
* fix handling of cases when there is 1 link and when there is no RetryAfter.Delta
* handle lack of Exception.Headers property
* handle gracefully obtaining status code from $_.Exception.InnerException.ErrorCode
---------
Co-authored-by: Konrad Jamrozik <kojamroz@microsoft.com>
* Docs Onboarding 2 - Add eng/common changes
* Dictionary Syntax
* Remove $UpdatePackageMetadata, it can be handled in other places
* Set exit code to 0 on success. The last executable to run (pip or docker or other) may be passed through
* Add optional _DocsOnboardingOrdinal sorting to work around onboarding sequence problems
* Update-DocsMsPackages2.ps1 -> Update-DocsMsPackages.ps1
---------
Co-authored-by: Daniel Jurek <djurek@microsoft.com>
* Create Epic work item type as Service or product when running prepare release script
* Updated epic type field name
* Additional change to create release plan work item
* Exclude work items created from release planner test
* Fix issue in params
* Updated as per review comments
---------
Co-authored-by: praveenkuttappan <prmarott@microsoft.com>
The previous property was calculated so didn't exist from the REST-based
call. Also updated the api-version to the latest stable control plane
version.
Co-authored-by: Heath Stewart <heaths@microsoft.com>
* Only save package properties for track 2 packages (prevents overwrites of track 2 package info by track 1 packages)
* Only overwrite if the package is track 2
---------
Co-authored-by: Daniel Jurek <djurek@microsoft.com>
* Update-DocsMsMetadata.ps1 can fail the build on invalid packages
* Better error handling and logging
* Review feedback
---------
Co-authored-by: Daniel Jurek <djurek@microsoft.com>
* Support localspecrepo if pass in this parameter
* Support regen sdk code based on local typespecs
* Added reference doc to error message
---------
Co-authored-by: raychen <raychen@microsoft.com>
* Revert the change and return tsplocation folder
* Out null for the new-item command
* exit if return failure when call sync script
* Added repo assignment in local path scenario
* Added more output
* Fix path processing in windows
* exit when run generate script with error
---------
Co-authored-by: raychen <raychen@microsoft.com>
* Adding initial commit of TypeSpecE2E common script
* add TODO comment
* Updated per feedback
---------
Co-authored-by: raychen <raychen@microsoft.com>
* Switch to using standard PAT tokens instead of base 64
For most of these we can use the standard System.AccessToken given to
the build instead of maintaining a specific token. However that
token isn't base 64 encoded so we need to encode it.
With this we can stop explicitly passing PAT's unless we need to
access another DevOps org and we also don't have to remember
to keep the PAT's in KV base 64 encoded.
Add error detection for queue build script to fail if we get login response.
* PR Feedback
---------
Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
* ongoing
* Move get-codeowners scripts and tests to their own dirs
* address PR remarks
* Fix CodeOwnerFileLocation path, fix casing, and dedup param defaults
* fix param names
* add todos on needed changes in cpp repo
* Add CodeownersFileLocation to Get-Codeowners and use $null for default param values
* move get-codeowners back to scripts/ and rename -functions to .lib
* fix: use empty string as defaults instead of $nulls, to fix invocation
* fix bug with invocation of Get-Codeowners + add support for passing IncludeNonUserAliases as switch
* fix path iin Metadata-Helpers.ps1
* fix typo
* Update archetype-cpp-release.yml
---------
Co-authored-by: Konrad Jamrozik <kojamroz@microsoft.com>
* rerun flag
* rerun failed stress test
* naming & commenting
* update
* function and var renaming for better readability
* readability & exit on error
---------
Co-authored-by: Albert Cheng <albertcheng@microsoft.com>
* add some default output to see about minimizing any occurrence of the task failing for no reason. perhaps having some output will allow devops to have an easier time with the invocation
* update message
* Update eng/common/scripts/trust-proxy-certificate.ps1
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
* typespec renaming
* add back scripts for cadl
* support .cadl and .tsp
* rename
* add newline at the end of file
---------
Co-authored-by: FAREAST\chunyu <chunyu@microsoft.com>
* Add todos to update packages to pick up the newest CODEOWNERS interpreter
* update
---------
Co-authored-by: Konrad Jamrozik <kojamroz@microsoft.com>
* add documentation for cadl sync and generate
* move the file to doc/common and link to it from each script
* update links after file rename
---------
Co-authored-by: m-nash <prognash@gmail.com>
* move scripts to common
* add reference to common script
* address feedback
* couple tweaks to relative path updates
* update copy paste issue with emitter path
* updates to make scripts more generic
---------
Co-authored-by: m-nash <prognash@gmail.com>
With new PS command line parsing update in 7.3 they explicitly
pass "" to the native commands which in our usage here we don't
want. However setting the variable to null instead works for our
scenario with both command line parsing strategies so using it here.
Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
* Add new check in APIView to verify and enforce package name approval
* Changes as per review feedback
* Apply suggestions from code review
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
Co-authored-by: praveenkuttappan <praveen.kuttappan@gmail.com>
Co-authored-by: Praven Kuttappan <55455725+praveenkuttappan@users.noreply.github.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
* Make the env variable upper case
* Adding debug messages.
* Log out the link
Co-authored-by: sima-zhu <sizhu@microsoft.com>
Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com>
* Service readme index table stays the same even the table content needs to update
* adjust the edge cases tests
* change the helper function to helper folder
* add missing files
* Fixed the service name
Co-authored-by: sima-zhu <sizhu@microsoft.com>
* Fix contains method in stress generate function
* Update stress examples to addons 0.2.0. Script QOL fixes.
* Skip CI print for stress matrix. Minor improvements.
* Fix non-matching Chart.yaml files being evaluated too soon
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
* Added yaml support for job matrix creation
* autogen scenario matrix for stress test
* Temporary Working State
* update to default sparse
* pr comments and some error handling
* custom matrixfilename and ordering of generatedValues.yaml
* common module import
* JobMatrix write host
Co-authored-by: Albert Cheng <albertcheng@microsoft.com>
We have hit a few 50x errors while pulling a page to get
links and that has caused the rest of the link checking to
terminate early. To fix that we switching to LogError which will
output an error in devops instead of Write-Error which terminates
immediately. We also add some retry count to the page retrieval
and cache file retrieval to help with these transitent 50x issues.
Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
This should fix https://github.com/Azure/azure-sdk-tools/issues/3538
as it will now upgrade the devops extension to the latest version
which has the auth fix needed.
Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
* Detect API changes using new snadboxinx approach
* Added strictmode
* Remove unset variable
* Changes as per strict mode 3
* Rervert strict mode to allow language level fixes to merge first
Co-authored-by: praveenkuttappan <prmarott@microsoft.com>
* Fixed the common contract.
* Fix for current regex
* Add new line
* Update eng/common/scripts/Service-Level-Readme-Automation.ps1
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
* move compare and merge into gerenerate function
* Fix on new lines
Co-authored-by: sima-zhu <sizhu@microsoft.com>
Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
* stress test script and docs migration from test to pg cluster
* comments for stress-test-deployment-lib script
Co-authored-by: Albert Cheng <albertcheng@microsoft.com>
* Update verify-readme to take a single or multiple paths
* chance ScanPaths to a comma delimited list and coalesce ScanPath/ScanPaths into a single variable for the script
* VS Code was nice enough to add an extra single quote when adding a quote to the end of the line'
* Capture ScanPaths.Split into an array so we don't have to call Split again
Co-authored-by: James Suplizio <jasupliz@microsoft.com>
* Support local addons path override in stress test deployment
* Support username based deployId in local stress deployment
* Support WhatIf in stress infrastructure provision script
* Simplify stress user detection
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
* Run helm plugin add with helper
* Add WhatIf support to ps module install helper function
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
* Use seperate scripts
* address comments.
* do compare and update
* save on the service level readme
* have the helper for reuse function
* remove mgmt table
* changes
* fix
* no return on error
* return if no contents
* Address comments
* change the table
* address wes comments.
* address wes comments.
* address more comments.
Co-authored-by: sima-zhu <sizhu@microsoft.com>
* Use the batch version of ValidateDocsMsPackagesFn
* Use proper pipelining for GetPackageInfoJson function
Co-authored-by: Patrick Hallisey <pahallis@microsoft.com>
* Verify changelog like a release is about to take place if a vlaid date is present
* Update eng/common/scripts/ChangeLog-Operations.ps1
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
* Update eng/common/scripts/ChangeLog-Operations.ps1
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
* Update eng/common/scripts/ChangeLog-Operations.ps1
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
* Update eng/common/scripts/ChangeLog-Operations.ps1
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
* Update eng/common/scripts/ChangeLog-Operations.ps1
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
* Remove strict date verification
* Add function for sorting changelog entries
* Minor cleanups
Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
Co-authored-by: Chidozie Ononiwu (His Righteousness) <31145988+chidozieononiwu@users.noreply.github.com>
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
* Fix bug where job matrices with leading numbers generated duplicate job names
* Fail matrix generation when config path or import paths are not found
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
* Use common script for git diff changes
* remove extra files
* suppress spell check
* suppress false positive cspelling
* Address comments
* make changes to cspell
* Suppress to right values
* More fix
Co-authored-by: sima-zhu <sizhu@microsoft.com>
* archetype-sdk-tests-generate.yml now provides an opportunity for additional steps after the target has been cloned but before matrix generation is invoked
Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>
* Verify changelog like a release is about to take place if a vlaid date is present
* Update eng/common/scripts/ChangeLog-Operations.ps1
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
* Update eng/common/scripts/ChangeLog-Operations.ps1
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
* Update eng/common/scripts/ChangeLog-Operations.ps1
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
* Update eng/common/scripts/ChangeLog-Operations.ps1
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
* Update eng/common/scripts/ChangeLog-Operations.ps1
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
Co-authored-by: Chidozie Ononiwu (His Righteousness) <31145988+chidozieononiwu@users.noreply.github.com>
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
* Common scripts for git diff changes
* Remove the localizer.
* Check not PR triggered case
* Pretty print
Co-authored-by: sima-zhu <sizhu@microsoft.com>
* Improve Cosmos Emulator logic
* Run cosmos db emulator in two steps
* Using povershell < core for emulator
* add retry logic to cosmosdb-emulator launch
* Add Retry step fir cosmos emulator launch
Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
* Non stop on readme checking
* Print the right variable name
Co-authored-by: sima-zhu <sizhu@microsoft.com>
Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com>
* Get ms alias from github identity.
* Update Update-DocsMsMetadata.ps1
Co-authored-by: sima-zhu <sizhu@microsoft.com>
Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com>
- Fix bug in Add-ReleaseLease helper script
- Enable better local logging for handling token
- Enable strict mode to help catch issues like this in the future
* Use stress test environment defaults for group and subscription
* Fix parameter passing from deploy-stress-tests.ps1 script
* Redact stress deployment logs and simplify image handling
* Use DevopsLogging parameter to prevent secret logging in non-devops CI environments
* Use switch type for DevopsLogging parameter
* Remove boolean parameter usage in favor of [switch]
* Add default parameter set usage comment
* Throw when clusterGroup and/or subscription is not specified for custom environments
* Add helper function for logging azure pipelines vso commands
* Invert SuppressVsoCommands binary default value
* Vso command fixes
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
* Add disk metrics script and template
* Support linux disk matrics
* Add continueOnError to write-filesystemmetrics.yml
Co-authored-by: Patrick Hallisey <pahallis@microsoft.com>
* Add PowerShell Script for Validating READMEs
* Remember my VSCode doesn't use autosave
Co-authored-by: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com>
* Add spell check pin changes
* Apply suggestions from code review
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
* Add package-lock.json
* Set node version and upgrade npm in check-spelling.yml
* Do not mutate local NPM environment
* Remove unnecessary comment, we no longer use npm exec
Co-authored-by: Daniel Jurek <djurek@microsoft.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
* Consume Codeowners parser library, ceperate users from teams in codeownerse
* Update get-pr-owners and related logic
Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
* Mitigate relative path calculation error on multiple iterations
* Revert "Mitigate relative path calculation error on multiple iterations"
This reverts commit 45baedd990c6a3085742a38a4891d8706a93be77.
* GetRelativePath should check if path is already relative before calling [IO.Path]::GetRelativePath
Co-authored-by: Daniel Jurek <djurek@microsoft.com>
* Handle assembly already loaded errors in deploy stress test script
* Add dependency checks and installation links to deploy-stress-tests.ps1
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
* Remove empty sections in changelog entry as part of prepare release
* Update SECTIONS_HEADER_REGEX to accomodate various header levels
Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
* Common pipeline template and script to detect API changes
* Cahnges as per review comments
* Review comment changes
* CCahgnes as per review comments
* Show warning for list of failed packages to detect API changes
* Apply suggestions from code review
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
Co-authored-by: praveenkuttappan <prmarott@microsoft.com>
Co-authored-by: praveenkuttappan <55455725+praveenkuttappan@users.noreply.github.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
Since we are treating v0 versions as prerelease we need to make sure
we don't accidently start to add the bogus prerelease label in cases where
we call ToString() on the version.
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
* Add ability to exit gracefully when all files in the diff are excluded
* Address case where cspell exits with an error when all files from the 'files' config list are excluded by the expressions in 'ignorePaths'
* Add tests
* Review feedback: impl goes at the bottom and should be treated as a script, logic for testing should happen above that and exit appropriately if running tests
* Import common instead of logging
* Enable strict mode
Co-authored-by: Daniel Jurek <djurek@microsoft.com>
* Stress test deployment script resiliency fixes
* Use PSModule-Helpers to install powershell-yaml
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
* Attempt to purge all vaults, managed HSMs
Reverts #1910. Vaults and managed HSMs are automatically purged on their purge date. The point was to purge them daily to preserve capacity. The default purge date is +90 days.
* Add timeout and more logging
* Pass required -Resource
* Fix log message
* Ensure the $Resource is correctly captured
Added comment to new code explaining why, since ScriptBlock.GetNewClosure() is not working as expected.
* Add -ErrorAction to Receive-Job
Worked without terminating when run locally, but failed on the first error in the AzDO agent.
* Use $using:r instead of creating ScriptBlock
More idiomatic for passing ScriptBlocks to jobs.
* Resolve PR feedback
* Change default DeleteAfterHours to 120
Resolves#1917
* Use the Az cmdlets built-in -AsJob
Co-authored-by: Heath Stewart <heaths@microsoft.com>
- Fix rg.Name to rg.ResourceGroupName
- Add more verbose logging for better debugging
- Handle deleted resource groups when gathering puragable resource
- Remove coerce now that we are collecting in functions
Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>