From e5acfcb33b22be9c068e07463db5dfe143563aa4 Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 13:14:45 -0400 Subject: [PATCH 01/19] Create dotnet_sql_infra_build_stage.yml --- stages/dotnet_sql_infra_build_stage.yml | 64 +++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 stages/dotnet_sql_infra_build_stage.yml diff --git a/stages/dotnet_sql_infra_build_stage.yml b/stages/dotnet_sql_infra_build_stage.yml new file mode 100644 index 0000000..b22bcbf --- /dev/null +++ b/stages/dotnet_sql_infra_build_stage.yml @@ -0,0 +1,64 @@ +parameters: + projectNamesConfigurations: + - projectName: '' + publishWebProject: true + dotnetTest: true + efMigrationScript: false + startUpProjectName: '' + projectExtension: '.sqlproj' + buildArguments: '' + solutionName: '' + serviceName: '' + sdkVersion: '' + zipAppAfterPublish: true + publishArguments: '' + artifactsToPublish: ['infrastructure'] + bicepParamExt: false + +stages: +- stage: '${{ parameters.serviceName }}_build' + variables: + solutionPath: '$(Build.SourcesDirectory)/${{ parameters.solutionName }}/' + ${{ if eq(parameters.BicepParamExt, true)}} : + bicepParamString: '.bicepparam' + ${{ else }} : + bicepParamString: '.json' + jobs: + - ${{ each artifactToPublish in parameters.artifactsToPublish }} : + - template: ../jobs/ado_publish_job.yml + parameters: + targetPath: ${{ artifactToPublish }} + artifactname: ${{ artifactToPublish }} + - ${{ each environmentObject in parameters.environmentObjects }} : + - ${{ each regionAbrv in environmentObject.regionAbrvs }} : + - ${{ if eq(parameters.deploymentScope, 'subscription')}} : + - template: ../jobs/bicep_whatif_env_job.yml + parameters: + environmentName: ${{ environmentObject.environmentName }} + templateFileName: ${{ parameters.templateFileName }} + templateDirectory: ${{ parameters.templateDirectory }} + serviceName: ${{ parameters.serviceName }} + regionAbrv: ${{ regionAbrv }} + paramExt: ${{ variables.bicepParamString }} + - ${{ elseif eq(parameters.deploymentScope, 'resourceGroup')}} : + - template: ../jobs/bicep_whatif_rg_env_job.yml + parameters: + environmentName: ${{ environmentObject.environmentName }} + templateFileName: ${{ parameters.templateFileName }} + templateDirectory: ${{ parameters.templateDirectory }} + serviceName: ${{ parameters.serviceName }} + regionAbrv: ${{ regionAbrv }} + paramExt: ${{ variables.bicepParamString }} + - ${{ each projectNamesConfiguration in parameters.projectNamesConfigurations }} : + - template: ../jobs/dotnetcore_sql_build_publish_job.yml + parameters: + solutionName: ${{ parameters.solutionName }} + projectName: ${{replace(projectNamesConfiguration.projectName,'.','_')}} + publishWebProject: ${{ projectNamesConfiguration.publishWebProject }} + sdkVersion: ${{ parameters.sdkVersion }} + dotNetTest: ${{ projectNamesConfiguration.dotnetTest }} + zipAfterPublish: ${{ parameters.zipAppAfterPublish }} + publishArguments: ${{ parameters.publishArguments }} + startUpProjectName: ${{ projectNamesConfiguration.startUpProjectName }} + projectExtension: ${{ projectNamesConfiguration.projectExtension }} + buildArguments: ${{ projectNamesConfiguration.buildArguments }} From d50f5cb32551dd8fbff17834811ac68b2b5ccc88 Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 13:22:27 -0400 Subject: [PATCH 02/19] Create dacpacp_infra_deploy_stage.yml --- stages/dacpacp_infra_deploy_stage.yml | 68 +++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 stages/dacpacp_infra_deploy_stage.yml diff --git a/stages/dacpacp_infra_deploy_stage.yml b/stages/dacpacp_infra_deploy_stage.yml new file mode 100644 index 0000000..fc3a826 --- /dev/null +++ b/stages/dacpacp_infra_deploy_stage.yml @@ -0,0 +1,68 @@ +parameters: +- name: projectConfigurations + type: object + default: + projectName: '' + environmentName: 'dev' + regionAbrvs: ['cus'] + sqlServerName: '' + sqlDatabaseName: '' + resourceGroupName: '' + authenticationType: 'servicePrincipal' + ipDetectionMethod: 'AutoDetect' + deployType: 'DacpacTask' +- name: serviceName + type: string + default: '' +- name: deploymentScope + type: string + default: 'subscription' +- name: bicepParamExt + type: boolean + default: false +- name: templateDirectory + type: string + default: 'infrastructure' +- name: templateFileName + type: string + default: 'main' + + +stages: + + - ${{ each projectConfiguration in parameters.projectConfigurations }} : + - ${{ each regionAbrv in projectConfiguration.regionAbrvs }} : + - stage: '${{ parameters.serviceName }}_${{ projectConfiguration.environmentName}}_${{regionAbrv}}_dacpac_deploy' + jobs: + - ${{ if eq(parameters.deploymentScope, 'subscription')}} : + - template: ../jobs/bicep_deploy_env_job.yml + parameters: + environmentName: ${{ projectConfiguration.environmentName }} + templateFileName: ${{ parameters.templateFileName }} + templateDirectory: ${{ parameters.templateDirectory }} + serviceName: ${{ parameters.serviceName}} + regionAbrv: ${{ regionAbrv }} + paramExt: ${{ variables.bicepParamString }} + - ${{ elseif eq(parameters.deploymentScope, 'resourceGroup')}} : + - template: ../jobs/arm_rg_deploy_env_job.yml + parameters: + environmentName: ${{ environmentObject.environmentName }} + templateFileName: ${{ parameters.templateFileName }} + templateDirectory: ${{ parameters.templateDirectory }} + serviceName: ${{ parameters.serviceName}} + regionAbrv: ${{ regionAbrv }} + paramExt: ${{ variables.bicepParamString }} + - template: ../jobs/dacpac_deploy_env_job.yml + parameters: + environmentName: ${{ projectConfiguration.environmentName }} + serviceName: ${{ parameters.serviceName}} + regionAbrv: ${{ regionAbrv }} + sqlServerName: ${{ projectConfiguration.sqlServerName }} + resourceGroupName: ${{ projectConfiguration.resourceGroupName }} + sqlDatabaseName: ${{ projectConfiguration.sqlDatabaseName }} + authenticationType: ${{ projectConfiguration.authenticationType }} + ipDetectionMethod: ${{ projectConfiguration.ipDetectionMethod }} + deployType: ${{ projectConfiguration.deployType }} + dacpacFilePath: ${{ projectConfiguration.projectName }}\**\*.dacpac + dependsOn: ['${{ parameters.serviceName }}_infrastructure_${{ environmentObject.environmentName }}_${{ regionAbrv }}'] + From 3fb5f55d282ed1da2eac70d8808dad2dff4e87b6 Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 13:24:50 -0400 Subject: [PATCH 03/19] Update dotnet_sql_infra_build_stage.yml --- stages/dotnet_sql_infra_build_stage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stages/dotnet_sql_infra_build_stage.yml b/stages/dotnet_sql_infra_build_stage.yml index b22bcbf..f52ba02 100644 --- a/stages/dotnet_sql_infra_build_stage.yml +++ b/stages/dotnet_sql_infra_build_stage.yml @@ -48,7 +48,7 @@ stages: templateDirectory: ${{ parameters.templateDirectory }} serviceName: ${{ parameters.serviceName }} regionAbrv: ${{ regionAbrv }} - paramExt: ${{ variables.bicepParamString }} + paramExt: ${{ variables.bicepParamString }} - ${{ each projectNamesConfiguration in parameters.projectNamesConfigurations }} : - template: ../jobs/dotnetcore_sql_build_publish_job.yml parameters: From d02c91345aca527726b0a6610c25f3f96aec8f67 Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 13:30:09 -0400 Subject: [PATCH 04/19] Rename dacpacp_infra_deploy_stage.yml to dacpac_infra_deploy_stage.yml --- ...cpacp_infra_deploy_stage.yml => dacpac_infra_deploy_stage.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename stages/{dacpacp_infra_deploy_stage.yml => dacpac_infra_deploy_stage.yml} (100%) diff --git a/stages/dacpacp_infra_deploy_stage.yml b/stages/dacpac_infra_deploy_stage.yml similarity index 100% rename from stages/dacpacp_infra_deploy_stage.yml rename to stages/dacpac_infra_deploy_stage.yml From 43074e6b374a382ff87da357ce3d1830e7f3058c Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 13:31:12 -0400 Subject: [PATCH 05/19] Update dacpac_infra_deploy_stage.yml --- stages/dacpac_infra_deploy_stage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stages/dacpac_infra_deploy_stage.yml b/stages/dacpac_infra_deploy_stage.yml index fc3a826..3a5ad9a 100644 --- a/stages/dacpac_infra_deploy_stage.yml +++ b/stages/dacpac_infra_deploy_stage.yml @@ -64,5 +64,5 @@ stages: ipDetectionMethod: ${{ projectConfiguration.ipDetectionMethod }} deployType: ${{ projectConfiguration.deployType }} dacpacFilePath: ${{ projectConfiguration.projectName }}\**\*.dacpac - dependsOn: ['${{ parameters.serviceName }}_infrastructure_${{ environmentObject.environmentName }}_${{ regionAbrv }}'] + dependsOn: ['${{ parameters.serviceName }}_infrastructure_${{ projectConfiguration.environmentName}}_${{ regionAbrv }}'] From cb8ae9faa25f1f5f21f2160f5c3a4d715c4e9611 Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 13:32:09 -0400 Subject: [PATCH 06/19] Update bicep_deploy_env_job.yml --- jobs/bicep_deploy_env_job.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jobs/bicep_deploy_env_job.yml b/jobs/bicep_deploy_env_job.yml index a44a85b..a2ab9b7 100644 --- a/jobs/bicep_deploy_env_job.yml +++ b/jobs/bicep_deploy_env_job.yml @@ -11,8 +11,10 @@ parameters: type: string - name: infrastructureHasSecrets type: boolean + default: false - name: infrastructureSecrets type: object + default: false - name: dependsOn type: object default: [] From 4c97b6baed90fa8ff3bd91f78fe0ff8d5b0939f4 Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 13:41:25 -0400 Subject: [PATCH 07/19] Update dotnet_sql_infra_build_stage.yml --- stages/dotnet_sql_infra_build_stage.yml | 40 ++++++++++++++----------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/stages/dotnet_sql_infra_build_stage.yml b/stages/dotnet_sql_infra_build_stage.yml index f52ba02..58fc9cc 100644 --- a/stages/dotnet_sql_infra_build_stage.yml +++ b/stages/dotnet_sql_infra_build_stage.yml @@ -7,6 +7,8 @@ parameters: startUpProjectName: '' projectExtension: '.sqlproj' buildArguments: '' + environmentName: 'dev' + regionAbrvs: ['eus'] solutionName: '' serviceName: '' sdkVersion: '' @@ -14,6 +16,7 @@ parameters: publishArguments: '' artifactsToPublish: ['infrastructure'] bicepParamExt: false + deploymentScope: 'subscription' stages: - stage: '${{ parameters.serviceName }}_build' @@ -31,24 +34,7 @@ stages: artifactname: ${{ artifactToPublish }} - ${{ each environmentObject in parameters.environmentObjects }} : - ${{ each regionAbrv in environmentObject.regionAbrvs }} : - - ${{ if eq(parameters.deploymentScope, 'subscription')}} : - - template: ../jobs/bicep_whatif_env_job.yml - parameters: - environmentName: ${{ environmentObject.environmentName }} - templateFileName: ${{ parameters.templateFileName }} - templateDirectory: ${{ parameters.templateDirectory }} - serviceName: ${{ parameters.serviceName }} - regionAbrv: ${{ regionAbrv }} - paramExt: ${{ variables.bicepParamString }} - - ${{ elseif eq(parameters.deploymentScope, 'resourceGroup')}} : - - template: ../jobs/bicep_whatif_rg_env_job.yml - parameters: - environmentName: ${{ environmentObject.environmentName }} - templateFileName: ${{ parameters.templateFileName }} - templateDirectory: ${{ parameters.templateDirectory }} - serviceName: ${{ parameters.serviceName }} - regionAbrv: ${{ regionAbrv }} - paramExt: ${{ variables.bicepParamString }} + - ${{ each projectNamesConfiguration in parameters.projectNamesConfigurations }} : - template: ../jobs/dotnetcore_sql_build_publish_job.yml parameters: @@ -62,3 +48,21 @@ stages: startUpProjectName: ${{ projectNamesConfiguration.startUpProjectName }} projectExtension: ${{ projectNamesConfiguration.projectExtension }} buildArguments: ${{ projectNamesConfiguration.buildArguments }} + - ${{ if eq(parameters.deploymentScope, 'subscription')}} : + - template: ../jobs/bicep_whatif_env_job.yml + parameters: + environmentName: ${{ projectNamesConfiguration.environmentName }} + templateFileName: ${{ parameters.templateFileName }} + templateDirectory: ${{ parameters.templateDirectory }} + serviceName: ${{ parameters.serviceName }} + regionAbrv: ${{ regionAbrv }} + paramExt: ${{ variables.bicepParamString }} + - ${{ elseif eq(parameters.deploymentScope, 'resourceGroup')}} : + - template: ../jobs/bicep_whatif_rg_env_job.yml + parameters: + environmentName: ${{ projectNamesConfiguration.environmentName }} + templateFileName: ${{ parameters.templateFileName }} + templateDirectory: ${{ parameters.templateDirectory }} + serviceName: ${{ parameters.serviceName }} + regionAbrv: ${{ regionAbrv }} + paramExt: ${{ variables.bicepParamString }} From c5b0e5c2b17bfda169a3c760a256bf0bc7531f0e Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 13:43:39 -0400 Subject: [PATCH 08/19] Update dotnet_sql_infra_build_stage.yml --- stages/dotnet_sql_infra_build_stage.yml | 40 ++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/stages/dotnet_sql_infra_build_stage.yml b/stages/dotnet_sql_infra_build_stage.yml index 58fc9cc..6464efa 100644 --- a/stages/dotnet_sql_infra_build_stage.yml +++ b/stages/dotnet_sql_infra_build_stage.yml @@ -32,8 +32,7 @@ stages: parameters: targetPath: ${{ artifactToPublish }} artifactname: ${{ artifactToPublish }} - - ${{ each environmentObject in parameters.environmentObjects }} : - - ${{ each regionAbrv in environmentObject.regionAbrvs }} : + - ${{ each projectNamesConfiguration in parameters.projectNamesConfigurations }} : - template: ../jobs/dotnetcore_sql_build_publish_job.yml @@ -48,21 +47,22 @@ stages: startUpProjectName: ${{ projectNamesConfiguration.startUpProjectName }} projectExtension: ${{ projectNamesConfiguration.projectExtension }} buildArguments: ${{ projectNamesConfiguration.buildArguments }} - - ${{ if eq(parameters.deploymentScope, 'subscription')}} : - - template: ../jobs/bicep_whatif_env_job.yml - parameters: - environmentName: ${{ projectNamesConfiguration.environmentName }} - templateFileName: ${{ parameters.templateFileName }} - templateDirectory: ${{ parameters.templateDirectory }} - serviceName: ${{ parameters.serviceName }} - regionAbrv: ${{ regionAbrv }} - paramExt: ${{ variables.bicepParamString }} - - ${{ elseif eq(parameters.deploymentScope, 'resourceGroup')}} : - - template: ../jobs/bicep_whatif_rg_env_job.yml - parameters: - environmentName: ${{ projectNamesConfiguration.environmentName }} - templateFileName: ${{ parameters.templateFileName }} - templateDirectory: ${{ parameters.templateDirectory }} - serviceName: ${{ parameters.serviceName }} - regionAbrv: ${{ regionAbrv }} - paramExt: ${{ variables.bicepParamString }} + - ${{ each regionAbrv in environmentObject.regionAbrvs }} : + - ${{ if eq(parameters.deploymentScope, 'subscription')}} : + - template: ../jobs/bicep_whatif_env_job.yml + parameters: + environmentName: ${{ projectNamesConfiguration.environmentName }} + templateFileName: ${{ parameters.templateFileName }} + templateDirectory: ${{ parameters.templateDirectory }} + serviceName: ${{ parameters.serviceName }} + regionAbrv: ${{ regionAbrv }} + paramExt: ${{ variables.bicepParamString }} + - ${{ elseif eq(parameters.deploymentScope, 'resourceGroup')}} : + - template: ../jobs/bicep_whatif_rg_env_job.yml + parameters: + environmentName: ${{ projectNamesConfiguration.environmentName }} + templateFileName: ${{ parameters.templateFileName }} + templateDirectory: ${{ parameters.templateDirectory }} + serviceName: ${{ parameters.serviceName }} + regionAbrv: ${{ regionAbrv }} + paramExt: ${{ variables.bicepParamString }} From 95cb6c400b5b1f69a5ffa173ba3b30196ddb612f Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 13:44:42 -0400 Subject: [PATCH 09/19] Update dotnet_sql_infra_build_stage.yml --- stages/dotnet_sql_infra_build_stage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stages/dotnet_sql_infra_build_stage.yml b/stages/dotnet_sql_infra_build_stage.yml index 6464efa..7a66d80 100644 --- a/stages/dotnet_sql_infra_build_stage.yml +++ b/stages/dotnet_sql_infra_build_stage.yml @@ -47,7 +47,7 @@ stages: startUpProjectName: ${{ projectNamesConfiguration.startUpProjectName }} projectExtension: ${{ projectNamesConfiguration.projectExtension }} buildArguments: ${{ projectNamesConfiguration.buildArguments }} - - ${{ each regionAbrv in environmentObject.regionAbrvs }} : + - ${{ each regionAbrv in projectNamesConfiguration.regionAbrvs }} : - ${{ if eq(parameters.deploymentScope, 'subscription')}} : - template: ../jobs/bicep_whatif_env_job.yml parameters: From ca2a90beffc9d04f0d61a462c754176c6e213e8b Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 13:56:42 -0400 Subject: [PATCH 10/19] Update dotnet_sql_infra_build_stage.yml --- stages/dotnet_sql_infra_build_stage.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stages/dotnet_sql_infra_build_stage.yml b/stages/dotnet_sql_infra_build_stage.yml index 7a66d80..73f6cb6 100644 --- a/stages/dotnet_sql_infra_build_stage.yml +++ b/stages/dotnet_sql_infra_build_stage.yml @@ -17,6 +17,8 @@ parameters: artifactsToPublish: ['infrastructure'] bicepParamExt: false deploymentScope: 'subscription' + templateDirectory: 'infrastructure' + templateFileName: 'main' stages: - stage: '${{ parameters.serviceName }}_build' From f82a1ee673dfcb624d60a74e72f3dae2a8e11a84 Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 14:16:35 -0400 Subject: [PATCH 11/19] Update dacpac_infra_deploy_stage.yml --- stages/dacpac_infra_deploy_stage.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stages/dacpac_infra_deploy_stage.yml b/stages/dacpac_infra_deploy_stage.yml index 3a5ad9a..9a8a83f 100644 --- a/stages/dacpac_infra_deploy_stage.yml +++ b/stages/dacpac_infra_deploy_stage.yml @@ -26,6 +26,9 @@ parameters: - name: templateFileName type: string default: 'main' +- name: bicepParamExt + type: boolean + default: false stages: @@ -33,6 +36,12 @@ stages: - ${{ each projectConfiguration in parameters.projectConfigurations }} : - ${{ each regionAbrv in projectConfiguration.regionAbrvs }} : - stage: '${{ parameters.serviceName }}_${{ projectConfiguration.environmentName}}_${{regionAbrv}}_dacpac_deploy' + variables: + - name: bicepParamString + ${{ if eq(parameters.bicepParamExt, true)}} : + value: '.bicepparam' + ${{ else }} : + value: '.json' jobs: - ${{ if eq(parameters.deploymentScope, 'subscription')}} : - template: ../jobs/bicep_deploy_env_job.yml From c040470419b23616081a98a721f82f754ec1e53b Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 14:24:04 -0400 Subject: [PATCH 12/19] Update bicep_dotnet_depoy_stage.yml --- stages/bicep_dotnet_depoy_stage.yml | 32 ++++++++++++++++++----------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/stages/bicep_dotnet_depoy_stage.yml b/stages/bicep_dotnet_depoy_stage.yml index 2e5ffd1..960a5ee 100644 --- a/stages/bicep_dotnet_depoy_stage.yml +++ b/stages/bicep_dotnet_depoy_stage.yml @@ -16,42 +16,50 @@ parameters: infrastructureHasSecrets: false infrastructureSecrets: [] deploymentScope: 'subscription' - paramExt: '.json' + bicepParamExt: false + stages: - ${{ each regionAbrv in parameters.regionAbrvs }} : - stage: deploy_${{ parameters.serviceName }}_${{parameters.environmentName }}_${{ regionAbrv }} variables: + ${{ if eq(parameters.BicepParamExt, true)}} : + bicepParamString: '.bicepparam' + ${{ else }} : + bicepParamString: '.json' ${{ if eq(parameters.dependsOnEnv,'' )}} : dependsOnEnv: '${{ parameters.serviceName }}_build' ${{ else }}: dependsOnEnv: 'deploy_${{ parameters.serviceName }}_${{parameters.dependsOnEnv}}_${{ regionAbrv }}' workSpace: $(Pipeline.Workspace) dependsOn: ${{ variables.dependsOnEnv }} + jobs: - - ${{ elseif eq(parameters.deploymentScope, 'subscription')}} : - - template: ../jobs/bicep_deploy_env_job.yml + - ${{ if eq(parameters.deploymentScope, 'resourceGroup')}} : + - template: ../jobs/arm_rg_deploy_env_job.yml parameters: - environmentName: ${{ parameters.environmentName }} - templateFile: ${{ parameters.templateFile }} + environmentName: ${{ environmentObject.environmentName }} + templateFileName: ${{ parameters.templateFileName }} templateDirectory: ${{ parameters.templateDirectory }} serviceName: ${{ parameters.serviceName}} regionAbrv: ${{ regionAbrv }} infrastructureHasSecrets: ${{ parameters.infrastructureHasSecrets }} infrastructureSecrets: ${{ parameters.infrastructureSecrets}} - appName: ${{ parameters.appName }} - paramExt: ${{ parameters.paramExt }} - - - ${{ if eq(parameters.deploymentScope, 'resourceGroup')}} : - - template: ../jobs/arm_rg_deploy_env_job.yml + paramExt: ${{ varaibles.bicepParamString }} + - ${{ elseif eq(parameters.deploymentScope, 'subscription')}} : + - template: ../jobs/bicep_deploy_env_job.yml parameters: - environmentName: ${{ environmentObject.environmentName }} - templateFileName: ${{ parameters.templateFileName }} + environmentName: ${{ parameters.environmentName }} + templateFile: ${{ parameters.templateFile }} templateDirectory: ${{ parameters.templateDirectory }} serviceName: ${{ parameters.serviceName}} regionAbrv: ${{ regionAbrv }} infrastructureHasSecrets: ${{ parameters.infrastructureHasSecrets }} infrastructureSecrets: ${{ parameters.infrastructureSecrets}} + appName: ${{ parameters.appName }} + paramExt: ${{ varaibles.bicepParamString }} + + - ${{ each projectNamesConfiguration in parameters.projectNamesConfigurations }} : - template: ../jobs/func_app_deploy_env_job.yml parameters: From 09a4ae6871e7d50a4e064fa50fb02c6025f2446a Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 14:29:42 -0400 Subject: [PATCH 13/19] Update dotnet_sql_infra_build_stage.yml --- stages/dotnet_sql_infra_build_stage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stages/dotnet_sql_infra_build_stage.yml b/stages/dotnet_sql_infra_build_stage.yml index 73f6cb6..41385f9 100644 --- a/stages/dotnet_sql_infra_build_stage.yml +++ b/stages/dotnet_sql_infra_build_stage.yml @@ -24,7 +24,7 @@ stages: - stage: '${{ parameters.serviceName }}_build' variables: solutionPath: '$(Build.SourcesDirectory)/${{ parameters.solutionName }}/' - ${{ if eq(parameters.BicepParamExt, true)}} : + ${{ if eq(parameters.bicepParamExt, true)}} : bicepParamString: '.bicepparam' ${{ else }} : bicepParamString: '.json' From 684bbd4a467fab481e3e9617a033a42d68c80614 Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 14:29:56 -0400 Subject: [PATCH 14/19] Update bicep_deploy_stage.yml --- stages/bicep_deploy_stage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stages/bicep_deploy_stage.yml b/stages/bicep_deploy_stage.yml index c7941cd..5cf0832 100644 --- a/stages/bicep_deploy_stage.yml +++ b/stages/bicep_deploy_stage.yml @@ -16,7 +16,7 @@ stages: - stage: '${{ parameters.serviceName }}_${{ environmentObject.environmentName}}_${{regionAbrv}}_bicep_deploy' variables: - name: bicepParamString - ${{ if eq(parameters.BicepParamExt, true)}} : + ${{ if eq(parameters.bicepParamExt, true)}} : value: '.bicepparam' ${{ else }} : value: '.json' From 78108d676960a329e510d98b4a6b804d7e57a8e6 Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 14:30:10 -0400 Subject: [PATCH 15/19] Update bicep_build_stage.yml --- stages/bicep_build_stage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stages/bicep_build_stage.yml b/stages/bicep_build_stage.yml index ceaac07..cf947cc 100644 --- a/stages/bicep_build_stage.yml +++ b/stages/bicep_build_stage.yml @@ -22,7 +22,7 @@ stages: - stage: '${{ parameters.serviceName }}_build' variables: - name: bicepParamString - ${{ if eq(parameters.BicepParamExt, true)}} : + ${{ if eq(parameters.bicepParamExt, true)}} : value: '.bicepparam' ${{ else }} : value: '.json' From 6b42eff0657fe8d2e3e7974e69857d334be622fa Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 14:47:12 -0400 Subject: [PATCH 16/19] Update dacpac_infra_deploy_stage.yml --- stages/dacpac_infra_deploy_stage.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stages/dacpac_infra_deploy_stage.yml b/stages/dacpac_infra_deploy_stage.yml index 9a8a83f..23b52d5 100644 --- a/stages/dacpac_infra_deploy_stage.yml +++ b/stages/dacpac_infra_deploy_stage.yml @@ -38,10 +38,10 @@ stages: - stage: '${{ parameters.serviceName }}_${{ projectConfiguration.environmentName}}_${{regionAbrv}}_dacpac_deploy' variables: - name: bicepParamString - ${{ if eq(parameters.bicepParamExt, true)}} : - value: '.bicepparam' - ${{ else }} : - value: '.json' + ${{ if eq(parameters.bicepParamExt, true)}} : + value: '.bicepparam' + ${{ else }} : + value: '.json' jobs: - ${{ if eq(parameters.deploymentScope, 'subscription')}} : - template: ../jobs/bicep_deploy_env_job.yml From 85e12730dd70d2fe998cdb04b2610bae375dbf2e Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 14:47:47 -0400 Subject: [PATCH 17/19] Update dacpac_infra_deploy_stage.yml --- stages/dacpac_infra_deploy_stage.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/stages/dacpac_infra_deploy_stage.yml b/stages/dacpac_infra_deploy_stage.yml index 23b52d5..e5e424e 100644 --- a/stages/dacpac_infra_deploy_stage.yml +++ b/stages/dacpac_infra_deploy_stage.yml @@ -26,9 +26,7 @@ parameters: - name: templateFileName type: string default: 'main' -- name: bicepParamExt - type: boolean - default: false + stages: From 516fdbc387cb66a35d62a49e399b2eca6733138b Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 14:48:20 -0400 Subject: [PATCH 18/19] Update dacpac_infra_deploy_stage.yml --- stages/dacpac_infra_deploy_stage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stages/dacpac_infra_deploy_stage.yml b/stages/dacpac_infra_deploy_stage.yml index e5e424e..0dc8344 100644 --- a/stages/dacpac_infra_deploy_stage.yml +++ b/stages/dacpac_infra_deploy_stage.yml @@ -53,7 +53,7 @@ stages: - ${{ elseif eq(parameters.deploymentScope, 'resourceGroup')}} : - template: ../jobs/arm_rg_deploy_env_job.yml parameters: - environmentName: ${{ environmentObject.environmentName }} + environmentName: ${{ projectConfiguration.environmentName }} templateFileName: ${{ parameters.templateFileName }} templateDirectory: ${{ parameters.templateDirectory }} serviceName: ${{ parameters.serviceName}} From 08cbeada5165a9ad00b3da0661f01a4736791b4e Mon Sep 17 00:00:00 2001 From: JFolberth Date: Fri, 9 Aug 2024 14:49:04 -0400 Subject: [PATCH 19/19] Update arm_rg_deploy_env_job.yml --- jobs/arm_rg_deploy_env_job.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jobs/arm_rg_deploy_env_job.yml b/jobs/arm_rg_deploy_env_job.yml index a5a7d98..7e97486 100644 --- a/jobs/arm_rg_deploy_env_job.yml +++ b/jobs/arm_rg_deploy_env_job.yml @@ -11,8 +11,10 @@ parameters: type: string - name: infrastructureHasSecrets type: boolean + default: false - name: infrastructureSecrets type: object + default: [] - name: dependsOn type: object default: []