I am using azure devops multi staging pipelines and have the following YAML file. I can create a build and then publish the build artifact to drop. When I try to deploy, I get an error seen below.
I have tried many things but I want my deployment to be in the same pipeline as I know you can add it to the release pipeline. Am I missing something?
stages:
- stage: Build
jobs:
- job: Build
pool:
name: Hosted Windows 2019 with VS2019
demands: azureps
steps:
# Restore
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
projects: '**/*.csproj'
feedsToUse: select
vstsFeed : myfeed
includeNuGetOrg : true
# Build
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
projects: '**/*.csproj'
arguments: '--configuration Release'
# Publish
- task: DotNetCoreCLI@2
displayName: Publish
inputs:
command: publish
publishWebProjects: True
arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
zipAfterPublish: True
# Publish Artifact
- task: PublishBuildArtifacts@1
- stage: Dev
jobs:
# track deployments on the environment
- deployment: DeployWeb
pool:
vmImage: 'ubuntu-latest'
# creates an environment if it doesn’t exist
environment: 'my-dev'
strategy:
# default deployment strategy
runOnce:
deploy:
steps:
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'drop'
downloadPath: '$(build.ArtifactStagingDirectory)'
- task: AzureWebApp@1
displayName: Azure Web App Deploy
inputs:
appType: 'webapp'
azureSubscription: '213456123'
appName: mytestapp
package:$(System.DefaultWorkingDirectory)/**/*.zip
Downloading drop/ReleaseFiles.zip to C:\agents\release\1\_work\r9\a\Build\drop\\ReleaseFiles.zip
which would confirm the location is correct in the deploy stage? – MikeSDrop/DepartmentAPI.zip
path in your yaml. – starian chen-MSFT