Skip to content

Commit

Permalink
VIH-10259 remove param and add test ef (#616)
Browse files Browse the repository at this point in the history
* remopve param and add test ef

* update dempends on

* update dempends on
  • Loading branch information
benjamin-v1 authored Oct 26, 2023
1 parent b5221e7 commit ba503ac
Showing 1 changed file with 52 additions and 34 deletions.
86 changes: 52 additions & 34 deletions azure-pipelines.sds.master-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ resources:
ref: master
endpoint: hmcts

parameters:
- name: environment
type: object
default:
- Dev

pool:
vmImage: ubuntu-22.04

Expand Down Expand Up @@ -53,42 +47,66 @@ stages:

#####################################################
# Run Entity Framework. #############################
- ${{ each env in parameters.environment }}:
- stage: Run_Entity_Framework_${{ env }}
displayName: ${{ env }} EF Release
dependsOn: Pre_Run_Tasks

- stage: Run_Entity_Framework
displayName: Dev EF Release
dependsOn: Pre_Run_Tasks
jobs:
- job: Run_Entity_Framework_Dev
variables:
- template: variables/${{ lower(env) }}.yaml
- template: variables/dev.yaml
- template: variables/shared.yaml
parameters:
env: ${{ variables.env }}
jobs:
- job: Run_Entity_Framework_${{ env }}
displayName: Run Entity Framework ${{ env }}
pool:
vmImage: 'windows-latest' # MUST BE RUN ON WINDOWS
steps:
- download: current
displayName: Download Sql Artifact

- template: templates/Database/EntityFramework/run-entity-framework.yaml@azTemplates
parameters:
sqlServerResourceGroup: ${{ variables.vhResourceGroup }}
sqlServerName: ${{ variables.vhSQLServerName }}
databaseName: ${{ variables.videoApiDbName }}
azureSubscription: ${{ variables.subscriptionName }}
sqlScriptLocation: "$(Pipeline.Workspace)/${{ variables.efContextName }}-$(Build.BuildId)/${{ variables.efContextName }}.sql"
kvfirewallRequired: false
kvName: ${{ variables.vhKeyVault }}
kvSqlPasswordSecret: ${{ variables.vhSqlPasswordSecret }}
kvSqlUsernameSecret: ${{ variables.vhSqlUsernameSecret }}
env: dev
displayName: Run Entity Framework Dev
pool:
vmImage: 'windows-latest' # MUST BE RUN ON WINDOWS
steps:
- download: current
displayName: Download Sql Artifact

- template: templates/Database/EntityFramework/run-entity-framework.yaml@azTemplates
parameters:
sqlServerResourceGroup: ${{ variables.vhResourceGroup }}
sqlServerName: ${{ variables.vhSQLServerName }}
databaseName: ${{ variables.videoApiDbName }}
azureSubscription: ${{ variables.subscriptionName }}
sqlScriptLocation: "$(Pipeline.Workspace)/${{ variables.efContextName }}-$(Build.BuildId)/${{ variables.efContextName }}.sql"
kvfirewallRequired: false
kvName: ${{ variables.vhKeyVault }}
kvSqlPasswordSecret: ${{ variables.vhSqlPasswordSecret }}
kvSqlUsernameSecret: ${{ variables.vhSqlUsernameSecret }}
- job: Run_Entity_Framework_Test
variables:
- template: variables/test.yaml
- template: variables/shared.yaml
parameters:
env: test
displayName: Run Entity Framework Test
pool:
vmImage: 'windows-latest' # MUST BE RUN ON WINDOWS
steps:
- download: current
displayName: Download Sql Artifact

- template: templates/Database/EntityFramework/run-entity-framework.yaml@azTemplates
parameters:
sqlServerResourceGroup: ${{ variables.vhResourceGroup }}
sqlServerName: ${{ variables.vhSQLServerName }}
databaseName: ${{ variables.videoApiDbName }}
azureSubscription: ${{ variables.subscriptionName }}
sqlScriptLocation: "$(Pipeline.Workspace)/${{ variables.efContextName }}-$(Build.BuildId)/${{ variables.efContextName }}.sql"
kvfirewallRequired: false
kvName: ${{ variables.vhKeyVault }}
kvSqlPasswordSecret: ${{ variables.vhSqlPasswordSecret }}
kvSqlUsernameSecret: ${{ variables.vhSqlUsernameSecret }}

#####################################################
# Build Docker Image & Push. ########################
- stage: Docker_Build_Push
displayName: Docker Build & Push Image
dependsOn:
- Run_Entity_Framework_Dev
- Run_Entity_Framework
variables:
- template: variables/dev.yaml
- template: variables/shared.yaml
Expand Down Expand Up @@ -123,7 +141,7 @@ stages:
- stage: Push_Nuget
displayName: Deploy Nuget Packages
dependsOn:
- Run_Entity_Framework_Dev
- Run_Entity_Framework
variables:
- template: variables/shared.yaml
parameters:
Expand Down

0 comments on commit ba503ac

Please sign in to comment.