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

Improve pipeline config help text to reflect that a pipeline is not generated #2131

Closed
1 task done
kurt-mueller-osumc opened this issue May 8, 2023 · 8 comments · Fixed by #2246
Closed
1 task done
Assignees
Labels

Comments

@kurt-mueller-osumc
Copy link

Output from azd version

% azd version
azd version 0.8.0-beta.2 (commit 429b6ccf9a9d1616efa8988f2f8561deeb464c71)

Describe the bug

Running the azd pipeline config results in successfully setting secrets in the git repository, and will even push changes to the github repository.

However, no github action is generated in .github/workflows so there is not action to run or monitor when "successfully" configuring the pipeline.

It should be noted I've had previous github actions created in .github/workflows before introducing azure developer cli to this project.

To Reproduce

I'm not quite sure how to be honest.

Expected behavior

Generate a github action that provisions infrastructure and deploys the application via AZD cli.

Environment

MacOS Ventura

Additional context
Add any other context about the problem here.

@ghost ghost added needs-triage For new issues customer-reported identify a customer issue question labels May 8, 2023
@kurt-mueller-osumc
Copy link
Author

kurt-mueller-osumc commented May 8, 2023

Here's the output from the azd pipeline config command:

% azd pipeline config --principal-name my-service-principal --provider github

Configure your azd pipeline

  (✓) Done: Checking current directory for Git repository
  (✓) Done: Creating or updating service principal my-service-principal
(✓) Done: Setting AZURE_LOCATION repo secret
(✓) Done: Setting AZURE_TENANT_ID repo secret
(✓) Done: Setting AZURE_SUBSCRIPTION_ID repo secret
(✓) Done: Setting AZURE_CLIENT_ID repo secret
(✓) Done: Setting AZURE_ENV_NAME repo secret

GitHub Action secrets are now configured. You can view GitHub action secrets that were created at this link:
https://github.com/organization/project/settings/secrets/actions

? Would you like to commit and push your local changes to start the configured CI pipeline? Yes

  (✓) Done: Pushing changes
  (✓) Done: Queuing pipeline

SUCCESS: Your azd pipeline has been configured!
Link to view your new repo: git@github.com:organization/project.git
Link to view your pipeline status: git@github.com:organization/project.git/actions

This command says it was successful yet no pipeline was created or pushed to the github repository.

@rajeshkamal5050
Copy link

@ellismg @savannahostrowski seems like a new feature request? today we don't generate any pipeline configs as part of azd pipeline config

@ghost ghost removed the needs-triage For new issues label May 9, 2023
@savannahostrowski
Copy link
Contributor

Yeah definitely - I thought I'd filed an issue for this already but yes, I'd be nice if we had some gesture to generate a skeleton pipeline for folks. I have it planned to do some additional research around this.

@savannahostrowski savannahostrowski added this to the Germanium milestone May 9, 2023
@kurt-mueller-osumc
Copy link
Author

When I run the azd pipeline command, it describes the config command as:

Create and configure your deployment pipeline by using GitHub or Azure Pipelines

This leads me to believe that running azd pipeline config will create a github action for me in .github/workflows.

% azd pipeline

Manage integrating your application with build pipelines.

  • The Azure Developer CLI template includes a GitHub Actions pipeline configuration file (in the .github/workflows folder) that deploys your application whenever code is pushed to the main branch.
  • For more information, go to: https://aka.ms/azure-dev/pipeline.

Usage
  azd pipeline [command]

Available Commands
  config        : Create and configure your deployment pipeline by using GitHub or Azure Pipelines.

Flags
    -h, --help  : Gets help for pipeline.

Global Flags
    -C, --cwd string    : Sets the current working directory.
        --debug         : Enables debugging and diagnostics logging.
        --no-prompt     : Accepts the default value instead of prompting, or it fails if there is no default.

Use azd pipeline [command] --help to view examples and more information about a specific command.

Examples
  Walk through the steps required to set up your deployment pipeline.
    azd pipeline config

@savannahostrowski
Copy link
Contributor

savannahostrowski commented May 10, 2023

Yeah - that makes sense and is definitely valid feedback. I think that we can at least amend the text and examples to be more clear for now:

Something like:

Manage integrating your application with build pipelines.

  • azd commands (e.g. provision, deploy) can be used within your GitHub Actions and Azure DevOps pipelines to test your code against real Azure resources and facilitate deployments.
  • Using pipeline config on a configured codebase, azd will configures a service principal on the Azure subscription and create a secure connection between Azure and your repository.
  • For more information on how to use azd in your build pipeline, go to: https://aka.ms/azure-dev/pipeline.

Usage
  azd pipeline [command]

Available Commands
  config        : Create and configure your deployment pipeline by using GitHub or Azure Pipelines.

Flags
    -h, --help  : Gets help for pipeline.

Global Flags
    -C, --cwd string    : Sets the current working directory.
        --debug         : Enables debugging and diagnostics logging.
        --no-prompt     : Accepts the default value instead of prompting, or it fails if there is no default.

Use azd pipeline [command] --help to view examples and more information about a specific command.

Examples
  Walk through the steps required to set up your deployment pipeline.
    azd pipeline config

@weikanglim any thoughts here? Would love to get a second opinion for clarity etc.

@rajeshkamal5050 Let's see if we can make this clear in help text before end of next week.

@weikanglim
Copy link
Contributor

@savannahostrowski Those edits make sense.

From dev perspective, the succinct version of pipeline config could be:

  • Configure your deployment pipeline to connect securely to Azure by setting pipeline variables and secrets

And do we want a direct link to the working workflow definition file? I think that'd be useful for devs that want to setup their own.

@savannahostrowski
Copy link
Contributor

I like your update for config and yeah, I'd like to link to both a GHA an d AzDO pipeline.

Let's use this item to make text updates.

@rajeshkamal5050
Copy link

@weikanglim can you take care of the text updates for GA?

@savannahostrowski savannahostrowski changed the title azd pipeline config doesn't generate a github action Improve pipeline config help text to reflect that a pipeline is not generated May 15, 2023
weikanglim added a commit that referenced this issue May 17, 2023
Make it clear that user needs to create their pipeline definition or use one provided by an azd template.

While looking at other usage text, other small changes made:
- Remove env name prompt from `azd provision` as that is no longer true
- Fix `azd init` link to all templates
- Remove `.git` suffix from links

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

Successfully merging a pull request may close this issue.

4 participants