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

pipelines variable-group Not working with AzureCLI@2 Task #2935

Open
JFolberth opened this issue Jan 26, 2021 · 5 comments
Open

pipelines variable-group Not working with AzureCLI@2 Task #2935

JFolberth opened this issue Jan 26, 2021 · 5 comments
Labels
DevOps Pipelines Service Attention This issue is responsible by Azure service team.

Comments

@JFolberth
Copy link

Trying to have a MS hosted DevOps agent query a Team project to select predefined variable groups. This works locally however; when coupled with the Azure CLI Task Get an error
Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials. Please see https://aka.ms/azure-devops-cli-auth for more information.

Try logging in via a PAT and script before this step and still not able to successfully run the az pipelines command


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 26, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Jan 26, 2021
@yonzhan yonzhan added DevOps Service Attention This issue is responsible by Azure service team. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 26, 2021
@ghost
Copy link

ghost commented Jan 26, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @narula0781, @ashishonce, @romil07.

Issue Details

Trying to have a MS hosted DevOps agent query a Team project to select predefined variable groups. This works locally however; when coupled with the Azure CLI Task Get an error
Before you can run Azure DevOps commands, you need to run the login command(az login if using AAD/MSA identity else az devops login if using PAT token) to setup credentials. Please see https://aka.ms/azure-devops-cli-auth for more information.

Try logging in via a PAT and script before this step and still not able to successfully run the az pipelines command


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Author: JFolberth
Assignees: -
Labels:

DevOps, Pipelines, Service Attention

Milestone: -

@yonzhan
Copy link
Collaborator

yonzhan commented Jan 26, 2021

pipelines

@JFolberth
Copy link
Author

Any update on this?

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 1, 2021

devops service team should look into this issue.

@neoswallow
Copy link

neoswallow commented Apr 26, 2022

Following should work without needing to do azure login:

      - task: Bash@3
        displayName: "Build .env"
        inputs:
          targetType: 'inline'
          script: |
            #!/bin/bash
            az extension add -n azure-devops
            az devops configure --defaults organization=$(System.TeamFoundationCollectionUri) project="$(System.TeamProject)" --use-git-aliases true

            az pipelines variable-group list --output table
        env:
          AZURE_DEVOPS_EXT_PAT: $(System.AccessToken)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevOps Pipelines Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

3 participants