@@ -243,75 +243,74 @@ In this task, you will add continuous delivery to the YAML-based definition of t
243243 - repository: self
244244 trigger: none
245245
246- stages:
247- - stage: Build
248- displayName: Build .Net Core Solution
249- jobs:
250- - job: Build
251- pool:
252- vmImage: ubuntu-latest
253- steps:
254- - task: DotNetCoreCLI@2
255- displayName: Restore
256- inputs:
257- command: 'restore'
258- projects: '**/*.sln'
259- feedsToUse: 'select'
260-
261- - task: DotNetCoreCLI@2
262- displayName: Build
263- inputs:
264- command: 'build'
265- projects: '**/*.sln'
266-
267- - task: DotNetCoreCLI@2
268- displayName: Test
269- inputs:
270- command: 'test'
271- projects: 'tests/UnitTests/*.csproj'
272-
273- - task: DotNetCoreCLI@2
274- displayName: Publish
275- inputs:
276- command: 'publish'
277- publishWebProjects: true
278- arguments: '-o $(Build.ArtifactStagingDirectory)'
279-
280- - task: PublishBuildArtifacts@1
281- displayName: Publish Artifacts ADO - Website
282- inputs:
283- pathToPublish: '$(Build.ArtifactStagingDirectory)'
284- artifactName: Website
285-
286- - task: PublishBuildArtifacts@1
287- displayName: Publish Artifacts ADO - Bicep
288- inputs:
289- PathtoPublish: '$(Build.SourcesDirectory)/infra/webapp.bicep'
290- ArtifactName: 'Bicep'
291- publishLocation: 'Container'
292-
293- - stage: Deploy
294- displayName: Deploy to an Azure Web App
295- jobs:
296- - job: Deploy
297- pool:
298- vmImage: 'windows-latest'
299- steps:
300- - task: DownloadBuildArtifacts@0
301- inputs:
302- buildType: 'current'
303- downloadType: 'single'
304- artifactName: 'Website'
305- downloadPath: '$(Build.ArtifactStagingDirectory)'
306- - task: AzureRmWebAppDeployment@4
307- inputs:
308- ConnectionType: 'AzureRM'
309- azureSubscription: 'AZURE SUBSCRIPTION HERE (b999999abc-1234-987a-a1e0-27fb2ea7f9f4)'
310- appType: 'webApp'
311- WebAppName: 'eshoponWebYAML369825031'
312- packageForLinux: '$(Build.ArtifactStagingDirectory)/**/Web.zip'
313- AppSettings: '-UseOnlyInMemoryDatabase true -ASPNETCORE_ENVIRONMENT Development'
314-
246+ stages:
247+ - stage: Build
248+ displayName: Build .Net Core Solution
249+ jobs:
250+ - job: Build
251+ pool:
252+ vmImage: ubuntu-latest
253+ steps:
254+ - task: DotNetCoreCLI@2
255+ displayName: Restore
256+ inputs:
257+ command: 'restore'
258+ projects: '**/*.sln'
259+ feedsToUse: 'select'
260+
261+ - task: DotNetCoreCLI@2
262+ displayName: Build
263+ inputs:
264+ command: 'build'
265+ projects: '**/*.sln'
266+
267+ - task: DotNetCoreCLI@2
268+ displayName: Test
269+ inputs:
270+ command: 'test'
271+ projects: 'tests/UnitTests/*.csproj'
272+
273+ - task: DotNetCoreCLI@2
274+ displayName: Publish
275+ inputs:
276+ command: 'publish'
277+ publishWebProjects: true
278+ arguments: '-o $(Build.ArtifactStagingDirectory)'
279+
280+ - task: PublishBuildArtifacts@1
281+ displayName: Publish Artifacts ADO - Website
282+ inputs:
283+ pathToPublish: '$(Build.ArtifactStagingDirectory)'
284+ artifactName: Website
285+
286+ - task: PublishBuildArtifacts@1
287+ displayName: Publish Artifacts ADO - Bicep
288+ inputs:
289+ PathtoPublish: '$(Build.SourcesDirectory)/infra/webapp.bicep'
290+ ArtifactName: 'Bicep'
291+ publishLocation: 'Container'
292+
293+ - stage: Deploy
294+ displayName: Deploy to an Azure Web App
295+ jobs:
296+ - job: Deploy
297+ pool:
298+ vmImage: 'windows-latest'
299+ steps:
300+ - task: DownloadBuildArtifacts@0
301+ inputs:
302+ buildType: 'current'
303+ downloadType: 'single'
304+ artifactName: 'Website'
305+ downloadPath: '$(Build.ArtifactStagingDirectory)'
306+ - task: AzureRmWebAppDeployment@4
307+ inputs:
308+ ConnectionType: 'AzureRM'
309+ azureSubscription: 'AZURE SUBSCRIPTION HERE (b999999abc-1234-987a-a1e0-27fb2ea7f9f4)'
310+ appType: 'webApp'
311+ WebAppName: 'eshoponWebYAML369825031'
312+ packageForLinux: '$(Build.ArtifactStagingDirectory)/**/Web.zip'
313+ AppSettings: '-UseOnlyInMemoryDatabase true -ASPNETCORE_ENVIRONMENT Development'
315314 ` ` `
316315
317316# ### Task 3: Review the deployed site
0 commit comments