Giter VIP home page Giter VIP logo

Comments (3)

max-zaytsev avatar max-zaytsev commented on July 22, 2024

Hi @RussKie, Please post your question on the Developer Community to get the right eyes on it, since this repo is mostly for questions about templates located in this repo.

It seems like SourceVersionAuthor is available only in runtime. You can use conditions like this:

- script: |
    echo $(Build.SourceVersionAuthor)
  condition: eq(variables['Build.SourceVersionAuthor'], 'dotnet-maestro[bot]')

from azure-pipelines-yaml.

RussKie avatar RussKie commented on July 22, 2024

Thank you @max-zaytsev. That's a bummer really, I hoped I could craft my pipeline a bit more declaratively.

It'd be great to have this documented in https://learn.microsoft.com/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services too.

Thanks again.

from azure-pipelines-yaml.

max-zaytsev avatar max-zaytsev commented on July 22, 2024

Thank you @RussKie

Yes, I agree. It’s quite difficult to find this information in the documentation.
I actually found this statement on the Template types & usage page page.

Only predefined variables can be used in template expressions.

Since Build.SourceVersionAuthor is not in the list of predefined variables it is an indication that it can’t be used in such expressions.

I couldn't find the information about predefined variables on the Expressions page too. I wish there was some mention of this as well.

I will close this ticket as this issue does not match the current repository and will create an issue in the appropriate repo in order to update the documentation accordingly.

Please let me know if I can help with anything else here.

Thank you!

from azure-pipelines-yaml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.