Patrick Peters
Patrick Peters

Reputation: 9568

Yaml step has invalid name

I am migrating/integrating an existing Azure DevOps Release to Azure DevOps multistage pipeline.

When exporting each task as YAML and pasting it in the pipeline, I encounter an issue with the step name:

Step qetza.replacetokens.replacetokens-task.replacetokens has an invalid name. Valid names may only contain alphanumeric characters and '_' and may not start with a number."

This is the YAML:

- task: qetza.replacetokens.replacetokens-task.replacetokens@3
            displayName: 'Replace tokens in appsettings.json'
            inputs:
              rootDirectory: '$(Build.ArtifactStagingDirectory)/tokenize'
              targetFiles: appsettings.json
              actionOnMissing: fail

What can be done to fix this ?

Upvotes: 2

Views: 4864

Answers (1)

jessehouwing
jessehouwing

Reputation: 114641

The full name is optional. The YAML wizard does generate it by default. You can probably replace the task name to:

replacetokens@3

Or

qetza.replacetokens.replacetokens@3

To fix the pipeline. The replacetokens-task bits are the contribution-id and I filed a bug with the team some time ago that it shouldn't be part of the generated YAML as it can cause issues. A fix should be rolling out at some point.

Upvotes: 1

Related Questions