Skip to content

Adding MAR Manifest file generator - #726

Open
Kris Baranek (krbar) wants to merge 11 commits into
Azure:mainfrom
krbar:users/krbar/setBicepMcr
Open

Kris Baranek (krbar) wants to merge 11 commits into
Azure:mainfrom
krbar:users/krbar/setBicepMcr

Conversation

@krbar

@krbar Kris Baranek (krbar) commented Mar 7, 2024

Copy link
Copy Markdown
Contributor

Overview/Summary

Adding script to re-create the MAR Manifest file from the current CSV module indexes.

This PR fixes/adds/changes/removes

  1. adds Script utilities/tools/MARManifestGenerator/Set-MARManifest.ps1
  2. adds Header/Template file utilities/tools/MARManifestGenerator/src/manifestHeader.yml, which contains the constant part of the manifest file

Script usage example:

# Load the function Set-MARManifest
. .\utilities\tools\MARManifestGenerator\Set-MARManifest.ps1  

# Run the function
Set-MARManifest -OutputFile .\bicep-new.yml 

Breaking Changes

none

As part of this Pull Request I have

  • Read the Contribution Guide and ensured this PR is compliant with the guide
  • Checked for duplicate Pull Requests
  • Associated it with relevant GitHub Issues or ADO Work Items (Internal Only)
  • Ensured my code/branch is up-to-date with the latest changes in the main branch
  • Ensured PR tests are passing
  • Updated relevant and associated documentation (e.g. Contribution Guide, Docs etc.)

@microsoft-github-policy-service microsoft-github-policy-service Bot added the Needs: Triage 🔍 Maintainers need to triage still label Mar 7, 2024
@krbar
Kris Baranek (krbar) marked this pull request as ready for review March 7, 2024 20:10
@krbar
Kris Baranek (krbar) requested a review from a team March 7, 2024 20:10
@matebarabas Máté Barabás (matebarabas) added Type: Hygiene 🧹 things related to testing, issue triage etc. and removed Needs: Triage 🔍 Maintainers need to triage still labels Mar 7, 2024
@krbar
Kris Baranek (krbar) marked this pull request as draft March 7, 2024 21:35
@krbar
Kris Baranek (krbar) marked this pull request as ready for review April 6, 2024 23:09
[CmdletBinding(SupportsShouldProcess)]
param (
[Parameter(Mandatory = $false)]
[string] $OutputFile = $(Join-Path $PSScriptRoot 'bicep.yml')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[string] $OutputFile = $(Join-Path $PSScriptRoot 'bicep.yml')
[string] $OutputFile = Join-Path $PSScriptRoot 'bicep.yml'

# Loop through each item in the filtered data
foreach ($item in $formattedBicepFullCsv) {
# Remove '@Azure/' from the ModuleOwnersGHTeam property
$item.ModuleOwnersGHTeam = $item.ModuleOwnersGHTeam -replace '@Azure/', ''

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$item.ModuleOwnersGHTeam = $item.ModuleOwnersGHTeam -replace '@Azure/', ''
$item.ModuleOwnersGHTeam = $item.ModuleOwnersGHTeam -replace '@Azure\/', ''

Careful with the regex

# Remove '@Azure/' from the ModuleOwnersGHTeam property
$item.ModuleOwnersGHTeam = $item.ModuleOwnersGHTeam -replace '@Azure/', ''
# Remove '@Azure/' from the ModuleContributorsGHTeam property
$item.ModuleContributorsGHTeam = $item.ModuleContributorsGHTeam -replace '@Azure/', ''

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$item.ModuleContributorsGHTeam = $item.ModuleContributorsGHTeam -replace '@Azure/', ''
$item.ModuleContributorsGHTeam = $item.ModuleContributorsGHTeam -replace '@Azure\/', ''

@@ -0,0 +1,330 @@
version: 2.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Máté Barabás (@matebarabas) , a comment of rememberence

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Hygiene 🧹 things related to testing, issue triage etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants