Skip to content

Commit

Permalink
Remove redundant pipeline variable (#116)
Browse files Browse the repository at this point in the history
# Pull Request

## Description

We are removing a pipeline path variable that is no longer required.

Here is a successful e2e test run with the updated bootstrap code:
https://github.com/Azure/accelerator-bootstrap-modules/actions/runs/9450687525/job/26029889532

These are the sister PRs related to this: 

* Azure/accelerator-bootstrap-modules#23
* Azure/alz-terraform-accelerator#152

## License

By submitting this pull request, I confirm that my contribution is made
under the terms of the projects associated license.
  • Loading branch information
jaredfholgate authored Jun 11, 2024
1 parent 58015ba commit 3bf65b4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ function Get-BootstrapAndStarterConfig {
$starterModuleUrl = ""
$starterModuleSourceFolder = ""
$starterReleaseTag = ""
$starterPipelineFolder = ""
$starterReleaseArtifactName = ""
$starterConfigFilePath = ""

Expand Down Expand Up @@ -64,7 +63,6 @@ function Get-BootstrapAndStarterConfig {

$starterModuleUrl = $starterModuleDetails.Value.$iac.url
$starterModuleSourceFolder = $starterModuleDetails.Value.$iac.release_artifact_root_path
$starterPipelineFolder = $starterModuleDetails.Value.$iac.release_artifact_ci_cd_path
$starterReleaseArtifactName = $starterModuleDetails.Value.$iac.release_artifact_name
$starterConfigFilePath = $starterModuleDetails.Value.$iac.release_artifact_config_file
}
Expand All @@ -80,7 +78,6 @@ function Get-BootstrapAndStarterConfig {
starterModuleUrl = $starterModuleUrl
starterModuleSourceFolder = $starterModuleSourceFolder
starterReleaseTag = $starterReleaseTag
starterPipelineFolder = $starterPipelineFolder
starterReleaseArtifactName = $starterReleaseArtifactName
starterConfigFilePath = $starterConfigFilePath
validationConfig = $validationConfig
Expand Down
13 changes: 2 additions & 11 deletions src/ALZ/Private/Deploy-Accelerator-Helpers/New-Bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ function New-Bootstrap {
[Parameter(Mandatory = $false)]
[string] $starterRelease,

[Parameter(Mandatory = $false)]
[string] $starterPipelineFolder,

[Parameter(Mandatory = $false)]
[switch] $autoApprove,

Expand Down Expand Up @@ -83,18 +80,15 @@ function New-Bootstrap {
# Get starter module
$starter = ""
$starterModulePath = ""
$pipelineModulePath = ""

if($hasStarter) {
$starter = Request-SpecialInput -type "starter" -starterConfig $starterConfig -userInputOverrides $userInputOverrides

Write-Verbose "Selected Starter: $starter"

$starterModulePath = Resolve-Path (Join-Path -Path $starterPath -ChildPath $starterConfig.starter_modules.$starter.location)
$pipelineModulePath = Resolve-Path (Join-Path -Path $starterPath -ChildPath $starterPipelineFolder)

Write-Verbose "Starter Module Path: $starterModulePath"
Write-Verbose "Pipeline Module Path: $pipelineModulePath"
}

# Getting the configuration for the interface user input
Expand Down Expand Up @@ -174,9 +168,8 @@ function New-Bootstrap {

# Set computed interface inputs
$computedInputMapping = @{
"iac_type" = $iac
"module_folder_path" = $starterModulePath
"pipeline_folder_path" = $pipelineModulePath
"iac_type" = $iac
"module_folder_path" = $starterModulePath
}

foreach($inputConfigItem in $inputConfig.inputs.PSObject.Properties) {
Expand Down Expand Up @@ -214,8 +207,6 @@ function New-Bootstrap {
-autoApprove:$autoApprove.IsPresent `
-computedInputs $bootstrapComputed



# Getting the user input for the starter module
Write-InformationColored "The following inputs are specific to the '$starter' starter module that you selected:" -ForegroundColor Green -NewLineBefore -InformationAction Continue
$starterConfiguration = Request-ALZEnvironmentConfig `
Expand Down
3 changes: 0 additions & 3 deletions src/ALZ/Public/New-ALZEnvironment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ function New-ALZEnvironment {
$starterModuleUrl = $bicepLegacyUrl
$starterModuleSourceFolder = "."
$starterReleaseTag = "local"
$starterPipelineFolder = "local"
$starterReleaseArtifactName = ""
$starterConfigFilePath = ""

Expand All @@ -204,7 +203,6 @@ function New-ALZEnvironment {
$starterModuleUrl = $bootstrapAndStarterConfig.starterModuleUrl
$starterModuleSourceFolder = $bootstrapAndStarterConfig.starterModuleSourceFolder
$starterReleaseTag = $bootstrapAndStarterConfig.starterReleaseTag
$starterPipelineFolder = $bootstrapAndStarterConfig.starterPipelineFolder
$starterReleaseArtifactName = $bootstrapAndStarterConfig.starterReleaseArtifactName
$starterConfigFilePath = $bootstrapAndStarterConfig.starterConfigFilePath
$validationConfig = $bootstrapAndStarterConfig.validationConfig
Expand Down Expand Up @@ -274,7 +272,6 @@ function New-ALZEnvironment {
-bootstrapRelease $bootstrapReleaseTag `
-hasStarter:$hasStarterModule `
-starterTargetPath $starterTargetPath `
-starterPipelineFolder $starterPipelineFolder `
-starterRelease $starterReleaseTag `
-starterConfig $starterConfig `
-userInputOverrides $userInputOverrides `
Expand Down

0 comments on commit 3bf65b4

Please sign in to comment.