Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
392 stars 185 forks source link

[Issue] azd pipeline config fails if no workflows folder, but tells user it failed because no github folder. #3308

Closed jongio closed 1 week ago

jongio commented 6 months ago

I have .github folder in root.

I run azd pipeline config

It fails with: Error: no CI/CD provider configuration found. Expecting either github and/or azdo folder in the project root directory.

But I do have that folder.

It would be nice if it told me that it is looking for workflows in the .github/workflows (and equiv for azdo) folder.

ardeshir commented 6 months ago

I have .azdo folder in root. I run azd pipeline config

It fails with: Error: no CI/CD provider configuration found. Expecting either github and/or azdo folder in the project root directory.

But I do have that folder.

azd version azd version 1.6.1 (commit eba2c978b5443fdb002c95add4011d9e63c2e76f)

az bicep version Bicep CLI version 0.25.53 (c0ad57dff6)

I would like to have azd provision --no-prompt work in azure-deploy.yml as well.
But right now only the azd deploy --no-prompt works.
azd up --no-prompt and azd provision --no-prompt fails to update the existing KeyVault and container registries when running in ADO, but works fine locally.

pool:
  vmImage: ubuntu-latest

container: mcr.microsoft.com/azure-dev-cli-apps:latest

variables:
  - group: CDSPythonOptimizer-SB

steps:
  - pwsh: |
      azd config set auth.useAzCliAuth "true"
    displayName: Configure AZD to Use AZ CLI Authentication.
  - task: AzureCLI@2
    displayName: Azure Sandbox Provision
    inputs:
      azureSubscription: FSDI-Techops-Sandbox-ServiceConnection
      scriptType: bash
      scriptLocation: inlineScript
      inlineScript: |
        azd provision --no-prompt 
    env:
      ENV: $(ENV)
      NAME: $(NAME)
      AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
      AZURE_ENV_NAME: $(AZURE_ENV_NAME)
      AZURE_LOCATION: $(AZURE_LOCATION)
      AZURE_CONTAINER_REGISTRY_ENDPOINT: $(AZURE_CONTAINER_REGISTRY_ENDPOINT)
      AZURE_APPINSIGHTS: $(AZURE_APPINSIGHTS)
  - task: AzureCLI@2
    displayName: Azure Sandbox Deploy
    inputs:
      azureSubscription: FSDI-Techops-Sandbox-ServiceConnection
      scriptType: bash
      scriptLocation: inlineScript
      inlineScript: |
        azd deploy --no-prompt
    env:
      ENV: $(ENV)
      NAME: $(NAME)
      AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
      AZURE_ENV_NAME: $(AZURE_ENV_NAME)
      AZURE_LOCATION: $(AZURE_LOCATION)
      AZURE_CONTAINER_REGISTRY_ENDPOINT: $(AZURE_CONTAINER_REGISTRY_ENDPOINT)
      AZURE_APPINSIGHTS: $(AZURE_APPINSIGHTS)
christiannagel commented 5 months ago

I have the same error running azd pipeline config -e codebreaker-08-dev

Error: no CI/CD provider configuration found. Expecting either github and/or azdo folder in the project root directory.

There's a .github/workflows folder in the root directory of the repo.

azd version: azd version 1.7.0 (commit 49d6adc2efb178083f61822e6b4715258560803d)

jongio commented 1 week ago

I would like to have azd provision --no-prompt work in azure-deploy.yml as well. But right now only the azd deploy --no-prompt works. azd up --no-prompt and azd provision --no-prompt fails to update the existing KeyVault and container registries when running in ADO, but works fine locally.

@ardeshir - Can you please create a new issue for this?

jongio commented 1 week ago

This is resolved with https://github.com/Azure/azure-dev/pull/4030