Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while executing task from yaml build pipeline #126

Closed
jsteenbeek opened this issue Jul 23, 2019 · 6 comments
Closed

Error while executing task from yaml build pipeline #126

jsteenbeek opened this issue Jul 23, 2019 · 6 comments

Comments

@jsteenbeek
Copy link

jsteenbeek commented Jul 23, 2019

First of, thanks for all you do Colin. ReplaceTokens is one of our most used tasks!

When using the ReplaceTokens task from a yaml build pipeline I get the message that the task name is ambiguous, and Azure DevOps is unable to distinguish between tasks "a8515ec8-7254-4ffd-912c-86772e2b5962" and "9240b5c1-a1b2-4799-9325-e071c63236fb".

image

Not sure where the other task is coming from, 9240b5c1-a1b2-4799-9325-e071c63236fb is yours.

As a workaround I can refer to the task by the name '9240b5c1-a1b2-4799-9325-e071c63236fb@1'. The editor doesn't like it, but it gets picked up by the build correctly.

@jsteenbeek
Copy link
Author

Googling the GUID led me to this one, which somebody else installed in our tenant.
https://github.com/qetza/vsts-replacetokens-task

Leaving this issue open for now, since I also see others running into this;
https://marketplace.visualstudio.com/items?itemName=colinsalmcorner.colinsalmcorner-buildtasks&ssr=false#review-details

@colindembovsky
Copy link
Owner

Hi @jsteenbeek - thanks for the info. According to this doc correct way to disambiguate is to qualify the task like so:

- task: colinsalmcorner.colinsalmcorner-buildtasks.ReplaceTokens@1

but this doesn't seem to work. I'm getting some help from the Product Group and will respond here (and in my readme) about how to disambiguate correctly.

@colindembovsky
Copy link
Owner

@jsteenbeek Finally got this figured out - there is an (undocumented) required field for the fully qualified name. To disambiguate, either use the GUID of the task (which would look nasty) or use:

- task: colinsalmcorner.colinsalmcorner-buildtasks.replace-tokens-task.replaceTokens@1

I'm going to update my docs to include this too!

@jsteenbeek
Copy link
Author

Works like a charm, thanks!

@aruray-ms
Copy link

Also, if someone is using the other one and end up here this should help ReplaceTokens@3

- task: qetza.replacetokens.replacetokens-task.replacetokens@3
  displayName: 'Replace tokens'
  inputs:
    targetFiles: |
      **/*.config
      **/*.json => outputs/*.json

@dungphanpm
Copy link

Same here. I faced issue with message:
Job smartcare_cicd_pipeline: Step task reference is invalid. The task name FlutterInstall is ambiguous. Specify one of the following identifiers to resolve the ambiguity: aloisdeniel.flutter.flutter-install.FlutterInstall, Hey24sheep.flutter.flutter-install.FlutterInstall
And fixed by:

      - task: aloisdeniel.flutter.flutter-install.FlutterInstall@0
        displayName: "Setup flutter"
        inputs:
          channel: 'stable'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants