-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from JFolberth/feature/dacpac_infra
Feature/dacpac infra
- Loading branch information
Showing
7 changed files
with
171 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
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' | ||
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 | ||
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: ${{ projectConfiguration.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_${{ projectConfiguration.environmentName}}_${{ regionAbrv }}'] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
parameters: | ||
projectNamesConfigurations: | ||
- projectName: '' | ||
publishWebProject: true | ||
dotnetTest: true | ||
efMigrationScript: false | ||
startUpProjectName: '' | ||
projectExtension: '.sqlproj' | ||
buildArguments: '' | ||
environmentName: 'dev' | ||
regionAbrvs: ['eus'] | ||
solutionName: '' | ||
serviceName: '' | ||
sdkVersion: '' | ||
zipAppAfterPublish: true | ||
publishArguments: '' | ||
artifactsToPublish: ['infrastructure'] | ||
bicepParamExt: false | ||
deploymentScope: 'subscription' | ||
templateDirectory: 'infrastructure' | ||
templateFileName: 'main' | ||
|
||
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 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 }} | ||
- ${{ each regionAbrv in projectNamesConfiguration.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 }} |