Skip to content

Commit 461bc1a

Browse files
committed
Abzu-204071-fixed pipeline job for FM health check (#252)
- Modified `check_health_endpoint_fm_live.ps1` to log a VSO task completion message when the service is not up, indicating the task completed with issues. - Updated `azure-pipelines.yml` to include a new parameter `RunTests` set to `true`, enabling test execution in the pipeline stages.
1 parent 7daf3d7 commit 461bc1a

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

Deployment/check_health_endpoint_fm_live.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@ if ($isServiceActive -eq 'true' ) {
5050
}
5151
Else {
5252
Write-Error "Service was not up in $waitTimeInMinute, error while deployment ..."
53-
throw "Error"
53+
Write-Host "##vso[task.complete result=SucceededWithIssues;]"
5454
}

Deployment/templates/app-deploy.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,11 @@ jobs:
9797
filePath: '$(Build.SourcesDirectory)/Deployment/check_health_endpoint.ps1'
9898
arguments: "-healthEndPointUrl $(ESSHealthEndpoint)/health -waitTimeInMinute $(waitTimeInMinute)"
9999

100-
- job: CheckFM
101-
displayName: "Check Fleet Manager Health"
100+
101+
- job: CheckFMNonLive
102+
displayName: "Check Fleet Manager Health - ${{parameters.Environment}}"
102103
dependsOn: DeployApp
104+
condition: ne('${{ parameters.Environment }}', 'Live')
103105
steps:
104106
- task: PowerShell@2
105107
displayName: "Check FM Health endpoint is healthy"
@@ -108,6 +110,18 @@ jobs:
108110
filePath: '$(Build.SourcesDirectory)/Deployment/check_health_endpoint.ps1'
109111
arguments: "-healthEndPointUrl $(FMHealthEndpoint)/health-check -waitTimeInMinute $(waitTimeInMinute)"
110112

113+
- job: CheckFMLive
114+
displayName: "Check Fleet Manager Health - Live"
115+
dependsOn: DeployApp
116+
condition: eq('${{ parameters.Environment }}', 'Live')
117+
steps:
118+
- task: PowerShell@2
119+
displayName: "Check FM Health endpoint is healthy"
120+
inputs:
121+
targetType: filePath
122+
filePath: '$(Build.SourcesDirectory)/Deployment/check_health_endpoint_fm_live.ps1'
123+
arguments: "-healthEndPointUrl $(FMHealthEndpoint)/live/echo/health-check -waitTimeInMinute $(waitTimeInMinute) -ocpapimsubscriptionkey $(FM_Ocp_Apim_Subscription_Key)"
124+
111125

112126

113127
- job: Setup
@@ -137,7 +151,6 @@ jobs:
137151
- CheckInfra
138152
- CheckFSS
139153
- CheckESS
140-
- CheckFM
141154
pool: NautilusBuild
142155
displayName: "POS Functional Automated Tests"
143156
variables:
@@ -199,7 +212,6 @@ jobs:
199212
- CheckInfra
200213
- CheckFSS
201214
- CheckESS
202-
- CheckFM
203215
- POSFunctionalTests
204216
pool: NautilusBuild
205217
displayName: "BESS Functional Automated Tests"

azure-pipelines.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ stages:
160160
- Setup
161161
- CheckInfra
162162
- CheckFSS
163-
- CheckESS
164-
- CheckFM
163+
- CheckESS
165164
pool: $(WindowPool)
166165
displayName: Post Deployment Actions
167166
steps:
@@ -241,4 +240,4 @@ stages:
241240
Environment: ${{variables.Environment}}
242241
ContinueEvenIfResourcesAreGettingDestroyed: ${{ parameters.ContinueEvenIfResourcesAreGettingDestroyed }}
243242
AzureSubscription: "Exchange-Set-Service-Pre-A.011.08"
244-
Container: ${{variables.Container}}
243+
Container: ${{variables.Container}}

0 commit comments

Comments
 (0)