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

Enable 'repository.name' for accepting variables #612

Closed
brunoviveiros-dev opened this issue Jul 16, 2024 · 2 comments
Closed

Enable 'repository.name' for accepting variables #612

brunoviveiros-dev opened this issue Jul 16, 2024 · 2 comments
Labels
external Everything that does not related to YAML 'getting started' templates

Comments

@brunoviveiros-dev
Copy link

brunoviveiros-dev commented Jul 16, 2024

I have plenty of Azure functions that have similar pipelines (build and release). This scenario leads me to have a bunch of "duplicated" pipelines. They only differ because it's linked to different repos. To achieve cleaner pipelines, I decided to create just one generic pipeline that will be able to build all existing Azure functions.

This was going well, but now I discovered that YAML resources:repositories:repository:name do not accept expressions, which blocked me from moving forward.

I want to ask to make the name possible for expressions as the ref is: https://learn.microsoft.com/en-us/azure/devops/release-notes/2022/sprint-212-update

This feature will bring great flexibility in Azure Pipelines, so instead of having 40 build pipelines, I can have only a generic one, which would be amazing.

Below is my current template:

parameters:
  - name: repositoryName
    type: string
    default: ""
  - name: branch
    type: string
    default: test
    values:
      - test
      - production
trigger:
  branches:
    include:
      - test
variables:
  repositoryPath: DataIntegration/_git/${{ parameters.repositoryName }}
  branchRef: refs/heads/${{ parameters.branch }}
resources:
  repositories:
    - repository: collectorRepository
      type: git
      name: DataIntegration/_git/Media.Collector.Retarget
      ref: ${{ variables.branchRef }}
jobs:
  - template: azure-pipelines-build-template.yml
    parameters:
      repositoryName: ""
      branch: ""

I want to use ${{ variables.repositoryPath }} instead of DataIntegration/_git/Media.Collector.Ret, that would be a good feature for sure.

@brunoviveiros-dev brunoviveiros-dev changed the title Enable repository.Name for acceppting template expressions Enable 'repository.name' for accepting template expressions Jul 16, 2024
@brunoviveiros-dev brunoviveiros-dev changed the title Enable 'repository.name' for accepting template expressions Enable 'repository.name' for accepting variables Jul 16, 2024
@KonstantinTyukalov
Copy link

Hi @brunoviveiros-dev, this repository is only for 'getting started' YAML templates, therefore we do not accept feature requests here that are related to custom YAML usage.
Please, place your suggestion in the Developer Community to get the right eyes on it.
Please let me know if you have any questions

@KonstantinTyukalov KonstantinTyukalov added external Everything that does not related to YAML 'getting started' templates and removed Area: Yaml triage labels Jul 22, 2024
@KonstantinTyukalov
Copy link

Closing as external issue

@KonstantinTyukalov KonstantinTyukalov closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external Everything that does not related to YAML 'getting started' templates
Projects
None yet
Development

No branches or pull requests

2 participants