Skip to content

Commit

Permalink
feat(cli): add deploy functionality (replicate original cli)
Browse files Browse the repository at this point in the history
  • Loading branch information
sperka authored and JeremyJonas committed Oct 2, 2023
1 parent 67ffaeb commit 3ae7102
Show file tree
Hide file tree
Showing 17 changed files with 1,116 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
// disable eslint extension until can align with monorepo
// it just adds noise as commit hook will auto eslint --fix anyways
"eslint.enable": false,
"eslint.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll": false,
"source.organizeImports": false
Expand Down
2 changes: 1 addition & 1 deletion demo/api/generated/runtime/python/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions packages/galileo-cli/.projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/galileo-cli/.projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions packages/galileo-cli/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 80 additions & 0 deletions packages/galileo-cli/src/commands/deploy/flags.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*! Copyright [Amazon.com](http://amazon.com/), Inc. or its affiliates. All Rights Reserved.
PDX-License-Identifier: Apache-2.0 */

import { Flags } from "@oclif/core";
import { FlagInput } from "@oclif/core/lib/interfaces/parser";

export interface DeployCommandFlags {
name: string;
projen: boolean;
profile?: string;
appRegion?: string;
llmRegion?: string;
skipConfirmations: boolean;
cdkCommand: string;
cdkRequireApproval: string;
build: boolean;
saveExec: boolean;
dryRun: boolean;
replay: boolean;
}

export const deployCommandFlags: FlagInput<DeployCommandFlags> = {
name: Flags.string({
description: "Application name",
default: "Galileo",
}),
projen: Flags.boolean({
description: "Run projen to synth project",
default: true,
}),
profile: Flags.string({
aliases: ["p"],
description:
"The profile set up for your AWS CLI (associated with your AWS account)",
}),
appRegion: Flags.string({
aliases: ["app-region"],
description: "The region you want to deploy your application",
required: false,
}),
llmRegion: Flags.string({
aliases: ["llm-region"],
description: "The region you want to deploy/activate your LLM",
required: false,
}),
skipConfirmations: Flags.boolean({
aliases: ["yes"],
description: "Skip prompt confirmations (always yes)",
default: false,
}),
cdkCommand: Flags.string({
aliases: ["cdk-cmd"],
description: "CDK command to run",
default: "deploy",
}),
cdkRequireApproval: Flags.string({
aliases: ["require-approval"],
description: "CDK approval level",
default: "never",
}),
build: Flags.boolean({
description: "Perform build",
default: true,
}),
saveExec: Flags.boolean({
aliases: ["save"],
description: "Save successful task(s) execution to enable replay",
default: true,
}),
dryRun: Flags.boolean({
aliases: ["dry-run"],
description: "Only log commands but don't execute them",
default: false,
}),
replay: Flags.boolean({
aliases: ["last"],
description: "Replay last successful task(s) execution",
default: false,
}),
};
Loading

0 comments on commit 3ae7102

Please sign in to comment.