Hi Team,
I have written a buid and deployment pipeline to deploy a .net application to a web app in azure.
Hi Team,
I have written build and deployment pipelines to deploy a .net application on web app. Build pieline is producing artefact but deployment pipeline is erroring. Below are details in pipelines and error/s.
Below is yml code for build pipeline -
trigger:
stages:
- stage: Build jobs:
- job: Build pool: vmImage: 'windows-latest' variables: solution: '**/*.sln' buildPlatform: 'Any CPU' buildConfiguration: 'Release' steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2 inputs: restoreSolution: '$(solution)'
- task: VSBuild@1 inputs: solution: '$(solution)' msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"' platform: '$(buildPlatform)' configuration: '$(buildConfiguration)'
- task: PublishBuildArtifacts@1 inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)' ArtifactName: 'drop' publishLocation: 'Container'
Below is yml code for deployment pipeline -
trigger: none
resources:
pipelines:
- pipeline: AppPackage source: salilrbl24.UpdatedPipelineTest branch: main trigger: branches:
pool:
vmImage: windows-latest
jobs:
2024-05-14T14:30:54.0404030Z ##[section]Starting: download
2024-05-14T14:30:54.0412245Z ==============================================================================
2024-05-14T14:30:54.0412723Z Task : Download build artifacts
2024-05-14T14:30:54.0412940Z Description : Download files that were saved as artifacts of a completed build
2024-05-14T14:30:54.0413245Z Version : 0.239.1
2024-05-14T14:30:54.0413565Z Author : Microsoft Corporation
2024-05-14T14:30:54.0413774Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/download-build-artifacts
2024-05-14T14:30:54.0414009Z ==============================================================================
2024-05-14T14:30:55.2262149Z ##[error]Unhandled: Input required: definition
2024-05-14T14:30:55.2282003Z ##[error]Error: Input required: definition
at Object.getInput (D:\a_tasks\DownloadBuildArtifacts_a433f589-fce1-4460-9ee6-44a624aeb1fb\0.239.1\node_modules\azure-pipelines-task-lib\task.js:226:15)
at D:\a_tasks\DownloadBuildArtifacts_a433f589-fce1-4460-9ee6-44a624aeb1fb\0.239.1\main.js:126:44
at Generator.next (<anonymous>)
at fulfilled (D:\a_tasks\DownloadBuildArtifacts_a433f589-fce1-4460-9ee6-44a624aeb1fb\0.239.1\main.js:5:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-05-14T14:30:55.2692337Z throw err;
2024-05-14T14:30:55.2692833Z ^
2024-05-14T14:30:55.2693122Z
2024-05-14T14:30:55.2693556Z Error: Input required: definition
2024-05-14T14:30:55.2694856Z at Object.getInput (D:\a\_tasks\DownloadBuildArtifacts_a433f589-fce1-4460-9ee6-44a624aeb1fb\0.239.1\node_modules\azure-pipelines-task-lib\task.js:226:15)
2024-05-14T14:30:55.2695847Z at D:\a\_tasks\DownloadBuildArtifacts_a433f589-fce1-4460-9ee6-44a624aeb1fb\0.239.1\main.js:126:44
2024-05-14T14:30:55.2697437Z at Generator.next (<anonymous>)
2024-05-14T14:30:55.2698221Z at fulfilled (D:\a\_tasks\DownloadBuildArtifacts_a433f589-fce1-4460-9ee6-44a624aeb1fb\0.239.1\main.js:5:58)
2024-05-14T14:30:55.2698871Z at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-05-14T14:30:55.2699279Z
2024-05-14T14:30:55.2699695Z Node.js v20.11.1
2024-05-14T14:30:55.2702250Z ##[error]artifact-engine: unhandled exception Error: Input required: definition
at Object.getInput (D:\a_tasks\DownloadBuildArtifacts_a433f589-fce1-4460-9ee6-44a624aeb1fb\0.239.1\node_modules\azure-pipelines-task-lib\task.js:226:15)
at D:\a_tasks\DownloadBuildArtifacts_a433f589-fce1-4460-9ee6-44a624aeb1fb\0.239.1\main.js:126:44
at Generator.next (<anonymous>)
at fulfilled (D:\a_tasks\DownloadBuildArtifacts_a433f589-fce1-4460-9ee6-44a624aeb1fb\0.239.1\main.js:5:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-05-14T14:30:55.3239989Z ##[section]Finishing: download
Apologies if I am putting too much data here, but I need to resolve the error. Requesting to please let me know what is going wrong here.
```Thanks,
Salil