I feel like this needs more explanation. I'm trying to create an artifact in my release pipeline and I'm getting this error:
Job <MyJob>: Step references task 'ArchiveBackendArtifacts' at version '0' which does not exist.
Here's my pipeline definition:
jobs:
The build.yml file looks like this:
steps:
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Hi @westandy-dcp , the best place to post product issues is the Developer Community, which is actively monitored by the product team. Please link the ticket there on this thread though, as if there is a docs update that comes out of it, I'd like to help with that for future users!
Also, out of curiosity, where are you finding that task?
@westandy-dcp it looks like you're trying to use the Archive Files task, but have changed the task name in your YAML from ArchiveFiles@2 to ArchiveBackendArtifacts@1, which doesn't exist (unless you've created and published a custom task by that name?). If you change the task name to ArchiveFiles@2, does your build run correctly?
So, I had no idea that the task names such as ArchiveFiles were predefined. From the YAML docs, I got the impression that you can just make up the task name as you wish. Is there a list somewhere of the MS Azure predefined tasks?
I finally got this to work with this:
- task: ArchiveFiles@2
displayName: Archive Backend
inputs:
archiveFile: $(Build.ArtifactStagingDirectory)/backend.zip
includeRootFolder: false
rootFolderOrFile: $(System.DefaultWorkingDirectory)/packages/backend/functions/.funcpack
- task: PublishBuildArtifacts@1
displayName: Publish Backend Artifacts
inputs:
artifactName: GasSchedulingFunctionApp
PathtoPublish: $(Build.ArtifactStagingDirectory)/backend.zip
@westandy-dcp Glad you got it worked out! You can find the list of tasks and their references on our doc site here:
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/?view=vsts
Gonna close this for now, if you're happy :)
For task names, the source repo can also help