Skip to content

Commit 8aa2d1e

Browse files
committed
Remove debugging things
1 parent 1209966 commit 8aa2d1e

File tree

1 file changed

+76
-82
lines changed

1 file changed

+76
-82
lines changed

azure-pipelines.yml

+76-82
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,6 @@ jobs:
8686
msbuildArgs: /t:BuildIndex /v:n /bl:$(Build.ArtifactStagingDirectory)/logs/build.binlog
8787
msbuildArchitecture: x64
8888

89-
- powershell: |
90-
az --version
91-
az extension list
92-
azcopy --version
93-
displayName: 'Print az tool versions'
94-
9589
- task: CopyFiles@2
9690
inputs:
9791
sourceFolder: bin/index/
@@ -116,82 +110,82 @@ jobs:
116110
-IndexSource bin/index/index/
117111
-OutFile bin/index.url
118112
119-
# - task: AzureRmWebAppDeployment@4
120-
# displayName: 'Azure App Service Deploy: netsourceindex'
121-
# inputs:
122-
# ConnectionType: AzureRM
123-
# azureSubscription: SourceDotNet-Deployment-ARM
124-
# appType: webApp
125-
# WebAppName: netsourceindex
126-
# ResourceGroupName: source.dot.net
127-
# deployToSlotOrASE: true
128-
# SlotName: staging
129-
# packageForLinux: bin/index-stage/
130-
# enableCustomDeployment: true
131-
# DeploymentType: zipDeploy
132-
# RemoveAdditionalFilesFlag: true
133-
134-
# - task: AzureCLI@2
135-
# displayName: Deploy Storage Proxy Url to WebApp
136-
# inputs:
137-
# azureSubscription: SourceDotNet-Deployment-ARM
138-
# scriptLocation: inlineScript
139-
# scriptType: ps
140-
# inlineScript: >
141-
# deployment/deploy-storage-proxy.ps1
142-
# -ProxyUrlFile bin/index.url
143-
# -ResourceGroup source.dot.net
144-
# -WebappName netsourceindex
145-
# -Slot staging
146-
147-
# - task: AzureCLI@2
148-
# displayName: Restart WebApp
149-
# inputs:
150-
# azureSubscription: SourceDotNet-Deployment-ARM
151-
# scriptLocation: inlineScript
152-
# scriptType: ps
153-
# inlineScript: >
154-
# az webapp restart --name netsourceindex --slot staging --resource-group source.dot.net
155-
156-
# - pwsh: |
157-
# Start-Sleep 60
158-
# $urls = @(
159-
# "https://netsourceindex-staging.azurewebsites.net",
160-
# "https://netsourceindex-staging.azurewebsites.net/System.Private.CoreLib/src/libraries/System.Private.CoreLib/src/System/String.cs.html"
161-
# )
162-
# foreach ($url in $urls) {
163-
# $statusCode = Invoke-WebRequest $url -UseBasicParsing -SkipHttpErrorCheck | select -ExpandProperty StatusCode
164-
# if ($statusCode -ne 200) {
165-
# Write-Host "##vso[task.logissue type=error;]Deployed website returned undexpected status code $statusCode from url $url"
166-
# Write-Host "##vso[task.complete result=Failed;]Deployed website returned undexpected status code $statusCode from url $url"
167-
# }
168-
# }
169-
# displayName: Test Deployed WebApp
170-
171-
# - task: AzureCLI@2
172-
# displayName: Swap Staging Slot into Production
173-
# inputs:
174-
# azureSubscription: SourceDotNet-Deployment-ARM
175-
# scriptLocation: inlineScript
176-
# scriptType: ps
177-
# inlineScript: >
178-
# az webapp deployment slot swap
179-
# --resource-group source.dot.net
180-
# --name netsourceindex
181-
# --slot staging
182-
# --target-slot production
183-
184-
# - task: AzureCLI@2
185-
# displayName: Cleanup Old Storage Containers
186-
# inputs:
187-
# azureSubscription: SourceDotNet-Deployment-ARM
188-
# scriptLocation: inlineScript
189-
# scriptType: ps
190-
# inlineScript: >
191-
# deployment/cleanup-old-containers.ps1
192-
# -ResourceGroup source.dot.net
193-
# -WebappName netsourceindex
194-
# -StorageAccountName netsourceindex
113+
- task: AzureRmWebAppDeployment@4
114+
displayName: 'Azure App Service Deploy: netsourceindex'
115+
inputs:
116+
ConnectionType: AzureRM
117+
azureSubscription: SourceDotNet-Deployment-ARM
118+
appType: webApp
119+
WebAppName: netsourceindex
120+
ResourceGroupName: source.dot.net
121+
deployToSlotOrASE: true
122+
SlotName: staging
123+
packageForLinux: bin/index-stage/
124+
enableCustomDeployment: true
125+
DeploymentType: zipDeploy
126+
RemoveAdditionalFilesFlag: true
127+
128+
- task: AzureCLI@2
129+
displayName: Deploy Storage Proxy Url to WebApp
130+
inputs:
131+
azureSubscription: SourceDotNet-Deployment-ARM
132+
scriptLocation: inlineScript
133+
scriptType: ps
134+
inlineScript: >
135+
deployment/deploy-storage-proxy.ps1
136+
-ProxyUrlFile bin/index.url
137+
-ResourceGroup source.dot.net
138+
-WebappName netsourceindex
139+
-Slot staging
140+
141+
- task: AzureCLI@2
142+
displayName: Restart WebApp
143+
inputs:
144+
azureSubscription: SourceDotNet-Deployment-ARM
145+
scriptLocation: inlineScript
146+
scriptType: ps
147+
inlineScript: >
148+
az webapp restart --name netsourceindex --slot staging --resource-group source.dot.net
149+
150+
- pwsh: |
151+
Start-Sleep 60
152+
$urls = @(
153+
"https://netsourceindex-staging.azurewebsites.net",
154+
"https://netsourceindex-staging.azurewebsites.net/System.Private.CoreLib/src/libraries/System.Private.CoreLib/src/System/String.cs.html"
155+
)
156+
foreach ($url in $urls) {
157+
$statusCode = Invoke-WebRequest $url -UseBasicParsing -SkipHttpErrorCheck | select -ExpandProperty StatusCode
158+
if ($statusCode -ne 200) {
159+
Write-Host "##vso[task.logissue type=error;]Deployed website returned undexpected status code $statusCode from url $url"
160+
Write-Host "##vso[task.complete result=Failed;]Deployed website returned undexpected status code $statusCode from url $url"
161+
}
162+
}
163+
displayName: Test Deployed WebApp
164+
165+
- task: AzureCLI@2
166+
displayName: Swap Staging Slot into Production
167+
inputs:
168+
azureSubscription: SourceDotNet-Deployment-ARM
169+
scriptLocation: inlineScript
170+
scriptType: ps
171+
inlineScript: >
172+
az webapp deployment slot swap
173+
--resource-group source.dot.net
174+
--name netsourceindex
175+
--slot staging
176+
--target-slot production
177+
178+
- task: AzureCLI@2
179+
displayName: Cleanup Old Storage Containers
180+
inputs:
181+
azureSubscription: SourceDotNet-Deployment-ARM
182+
scriptLocation: inlineScript
183+
scriptType: ps
184+
inlineScript: >
185+
deployment/cleanup-old-containers.ps1
186+
-ResourceGroup source.dot.net
187+
-WebappName netsourceindex
188+
-StorageAccountName netsourceindex
195189
196190
- publish: $(Build.ArtifactStagingDirectory)/logs
197191
artifact: logs

0 commit comments

Comments
 (0)