* Add CompatibleConvertFrom-Yaml to common Package-Helpers
* Add CI artifact parsing to Save-Package-Properties, now each individual packageinfo.json file contains the relevant ci artifact lines for the package. This short circuits needing to re-parse this information in common checks.
---------
Co-authored-by: Scott Beddall <scbedd@microsoft.com>
* don't verify changelog for packages that aren't actively published anymore
---------
Co-authored-by: Scott Beddall <scbedd@microsoft.com>
Co-authored-by: Scott Beddall <45376673+scbedd@users.noreply.github.com>
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
* updating package properties with direct/indirect (if named differently) as well as pulling BuildDocs from ci.yml artifact list if it exists
* eliminate the addition of buildDocs property. it requires powershell-yaml to be present on our base function. not good
* remove call to InitializeBuildDocs
---------
Co-authored-by: Scott Beddall <scbedd@microsoft.com>
* Apply a few changes to Get-PRPackageProperties to make it more customizable for our users. Remove wonky gap + extra spacing that should pass the patch application process now that we've manually aligned common.ps1
* account for feedback -- rename CanaryPackages to AdditionalValidationPackages
* dependentPackagesforInclusion -> additionalValidationPackages
---------
Co-authored-by: Scott Beddall <scbedd@microsoft.com>
* Add RestAPISpecsDocsRepos to branch cleanup.
* Remove commented out yml, add pre-message to limit output and output core limit at the start of processing
* updates for feedback
---------
Co-authored-by: James Suplizio <jasupliz@microsoft.com>
* more compatibility with expanding/contracting packages. add ability for packages to have DependentPackages that must be included in the set of packages that should be built given a changeset
---------
Co-authored-by: Scott Beddall <scbedd@microsoft.com>
Co-authored-by: Scott Beddall <45376673+scbedd@users.noreply.github.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
* add additional argument to Save-Package-Properties to allow for usage in pull request context
---------
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: Wes Haggard <weshaggard@users.noreply.github.com>
* Set storage account test resources to disable blob public access
* Skip adding network rules to storage accounts that don't need them during cleanup
* Add succeeded check to set pipeline subnet info step
* Disable network firewall by default in resource creation/removal
---------
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
* Support storage network access and worm removal in remove test resources script
* Move storage network access script to common resource helpers file
* Improve storage container deletion resilience
* Plumb through pool variable to live test cleanup template
* Add sleep for network rule application
---------
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
* Removal of the devops release PAT
* Don't pass in the access token, just use the AzureCLI task and do everything in the scripts
* Updates for feedback
---------
Co-authored-by: James Suplizio <jasupliz@microsoft.com>
* Reuse same branch name for previews of a PR
* Default AddBuildSummary parameter using pipeline variable existence
---------
Co-authored-by: Patrick Hallisey <pahallis@microsoft.com>
* Changes to scripts to deal with PATs and AccessTokens
* swap access and auth for add-retention-lease
* AuthToken to BearerToken and remove unused Base64EncodedAuthToken from the script parameters
* remove unneccsary if not null check for the mandatory parameter
---------
Co-authored-by: James Suplizio <jasupliz@microsoft.com>
* Migrate stress cluster to use workload identity
* Only sleep to sync fed creds when namespace is new
---------
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
* Only make one call to GetPackageInfoJson
* fix copy/paste, it should be packageInfoLocation not packageInfoJsonLocation
---------
Co-authored-by: James Suplizio <jasupliz@microsoft.com>
* Pass flag to suppress errors correctly when verifying release change log
* Changes as per review comments
---------
Co-authored-by: Praveen Kuttappan <prmarott@microsoft.com>
* Pipeline template to validate package and update package work item
* Changes to restructure validations
* Additional fixes as per comments
* Remove explicit exit code
* Set erroractionpreference for change log check
---------
Co-authored-by: Praveen Kuttappan <prmarott@microsoft.com>
In the case there is exactly one previous release PS will return the single object and thus the Count property will not exist. Instead this change ensures that we always have a list.
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
* 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>