Skip to content

Latest commit

 

History

History
206 lines (154 loc) · 4.81 KB

Initialize-AvmBicepWorkflowMatrix.md

File metadata and controls

206 lines (154 loc) · 4.81 KB

Initialize-AvmBicepWorkflowMatrix

Synopsis

Discover a checked-out Bicep workflow matrix for a push, pull request, or manual run.

Description

Validates the exact checked-out target commit before building a module matrix. Pull request discovery requires the tested merge commit to have exactly two parents and verifies the supplied pull request head is the second parent. Push discovery uses the supplied base when available and otherwise selects every current module for static-only preview. Manual dispatch uses explicit module paths.

Syntax

Initialize-AvmBicepWorkflowMatrix [-Root] <string> [-EventName] <string> [-TargetCommit] <string> [[-BaseCommit] <string>] [[-PullRequestHeadCommit] <string>] [[-ModulePaths] <string>] [[-CreateReleaseTag] <bool>] [[-PublishOnly] <bool>] [[-StaticValidation] <bool>] [[-DeploymentValidation] <bool>] [[-RemoveDeployment] <bool>] [[-CustomLocation] <string>] [-SkipModuleVersionCheck] [<CommonParameters>]

Parameters

-BaseCommit

Full SHA-1 comparison commit for push discovery.

Property Value
Type String
Required false
Position 4
Default value
Accept pipeline input false
Accept wildcard characters false

-CreateReleaseTag

Indicates a release-tag workflow request.

Property Value
Type Boolean
Required false
Position 7
Default value False
Accept pipeline input false
Accept wildcard characters false

-CustomLocation

Optional deployment location in the returned workflow input.

Property Value
Type String
Required false
Position 12
Default value
Accept pipeline input false
Accept wildcard characters false

-DeploymentValidation

Enables deployment validation in the returned workflow input.

Property Value
Type Boolean
Required false
Position 10
Default value True
Accept pipeline input false
Accept wildcard characters false

-EventName

GitHub event type: push, pull_request, or workflow_dispatch.

Property Value
Type String
Required true
Position 2
Default value
Accept pipeline input false
Accept wildcard characters false

-ModulePaths

Comma-separated manual module selection for workflow_dispatch.

Property Value
Type String
Required false
Position 6
Default value
Accept pipeline input false
Accept wildcard characters false

-PublishOnly

Indicates tag-only publication, which requires CreateReleaseTag.

Property Value
Type Boolean
Required false
Position 8
Default value False
Accept pipeline input false
Accept wildcard characters false

-PullRequestHeadCommit

Full SHA-1 pull request head that must be the tested merge's second parent.

Property Value
Type String
Required false
Position 5
Default value
Accept pipeline input false
Accept wildcard characters false

-RemoveDeployment

Requests deployment cleanup in the returned workflow input.

Property Value
Type Boolean
Required false
Position 11
Default value True
Accept pipeline input false
Accept wildcard characters false

-Root

Existing filesystem repository root.

Property Value
Type String
Required true
Position 1
Default value
Accept pipeline input false
Accept wildcard characters false

-SkipModuleVersionCheck

Skip the PowerShell Gallery version check for source or offline callers.

Property Value
Type Switch
Required false
Position named
Default value False
Accept pipeline input false
Accept wildcard characters false

-StaticValidation

Enables static validation in the returned workflow input.

Property Value
Type Boolean
Required false
Position 9
Default value True
Accept pipeline input false
Accept wildcard characters false

-TargetCommit

Full SHA-1 commit checked out at Root.

Property Value
Type String
Required true
Position 3
Default value
Accept pipeline input false
Accept wildcard characters false

Examples

EXAMPLE 1

Initialize-AvmBicepWorkflowMatrix -Root $repo -EventName workflow_dispatch -TargetCommit $sha -ModulePaths 'avm/res/storage/storage-account'

Outputs

  • PSCustomObject containing commit data, selection flags, a structured ModuleMatrix, and structured WorkflowInput settings.