auto detect current deploytype when running commands

Open
#332 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
cli

Research direction

Start in pkg/workflows/workflows.go around the linked workflow logic and trace the generate-workflow command's deployType selection. Compare the presence of charts, base/overlays, and manifests to determine the existing detection path. Done means a sole matching template type is selected without prompting, with image updates exposed through a deployType-independent interface.

Written by the indexing model from the issue text.

Description

instead of requiring user input to select deployType every time, deployType correlates 1:1 with the presence of templated folders

./charts -> helm
./base && ./overlays -> kustomize
./manifests -> manifests

at minimum, when calling generate-workflow, draft could detect if only one of these is present, and default to it instead of prompting for selection every time

additionally, abstracting the ability to update images in a deployType-agnositc interface would greatly simplify the code
https://github.com/Azure/draft/blob/040260598e8ef05018c992dc09244cd572901628/pkg/workflows/workflows.go#L37

Dominant language
Go
Stars
644
Forks
74
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/draft

All issues in Azure/draft

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.