diff --git a/docs/content/en/docs-dev/feature-status/_index.md b/docs/content/en/docs-dev/feature-status/_index.md index 6b749fb4d8..133fdf640e 100644 --- a/docs/content/en/docs-dev/feature-status/_index.md +++ b/docs/content/en/docs-dev/feature-status/_index.md @@ -130,3 +130,13 @@ Please note that the phases (Incubating, Alpha, Beta, and Stable) are applied to | [Insights](../user-guide/insights/) - Show the delivery performance of a team or an application | Incubating | | [Deployment Chain](../user-guide/managing-application/deployment-chain/) - Allow rolling out to multiple clusters gradually or promoting across environments | Alpha | | [Metrics](../user-guide/managing-controlplane/metrics/) - Dashboards for PipeCD and Piped metrics | Beta | + +## [pipectl](../user-guide/command-line-tool/) + +### [pipectl init](../user-guide/command-line-tool.md#generating-an-application-config-apppipecdyaml) + +| Feature | Phase | +|-|-| +| Kubernetes - QuickSync | Incubating | +| ECS - QuickSync | Alpha | +| ECS - Pipeline Sync | Incubating | diff --git a/docs/content/en/docs-dev/user-guide/command-line-tool.md b/docs/content/en/docs-dev/user-guide/command-line-tool.md index 01e7df1571..432685deb9 100644 --- a/docs/content/en/docs-dev/user-guide/command-line-tool.md +++ b/docs/content/en/docs-dev/user-guide/command-line-tool.md @@ -104,6 +104,7 @@ Available Commands: encrypt Encrypt the plaintext entered in either stdin or the --input-file flag. event Manage event resources. help Help about any command + init Generate an application config (app.pipecd.yaml) easily and interactively. piped Manage piped resources. plan-preview Show plan preview against the specified commit. quickstart Quick prepare PipeCD control plane in quickstart mode. @@ -311,6 +312,38 @@ You can encrypt it the same way you do [from the web](../managing-application/se Note: The docs for pipectl available command is maybe outdated, we suggest users use the `help` command for the updated usage while using pipectl. +### Generating an application config (app.pipecd.yaml) + + +Generate an app.pipecd.yaml interactively: + +``` console +$ pipectl init +Which platform? Enter the number [0]Kubernetes [1]ECS: 1 +Name of the application: myApp +... +``` + +After the above interaction, you can get the config YAML: + +```yaml +apiVersion: pipecd.dev/v1beta1 +kind: ECSApp +spec: + name: myApp + input: + serviceDefinitionFile: serviceDef.yaml + taskDefinitionFile: taskDef.yaml + targetGroups: + primary: + targetGroupArn: arn:aws:elasticloadbalancing:ap-northeast-1:123456789012:targetgroup/xxx/xxx + containerName: web + containerPort: 80 + description: Generated by `pipectl init`. See https://pipecd.dev/docs/user-guide/configuration-reference/ for more. +``` + +See [Feature Status](../feature-status/_index.md#pipectl-init). + ### You want more? We always want to add more needed commands into pipectl. Please let us know what command you want to add by creating issues in the [pipe-cd/pipecd](https://github.com/pipe-cd/pipecd/issues) repository. We also welcome your pull request to add the command. diff --git a/pkg/app/pipectl/cmd/initialize/initialize.go b/pkg/app/pipectl/cmd/initialize/initialize.go index 34b3a37e07..f7703c64bb 100644 --- a/pkg/app/pipectl/cmd/initialize/initialize.go +++ b/pkg/app/pipectl/cmd/initialize/initialize.go @@ -51,9 +51,9 @@ func NewCommand() *cobra.Command { c := &command{} cmd := &cobra.Command{ Use: "init", - Short: "Generate a app.pipecd.yaml easily and interactively", + Short: "Generate an application config (app.pipecd.yaml) easily and interactively.", Example: ` pipectl init`, - Long: "Generate a app.pipecd.yaml easily, interactively selecting options.", + Long: "Generate an application config (app.pipecd.yaml) easily, interactively selecting options.", RunE: cli.WithContext(c.run), }