Skip to content

Commit 95dc44c

Browse files
authored
Merge pull request #99 from vasu2856/main
Replacing hardcoded accountIDs and updating the documentation example…
2 parents 26084db + 65a3c3e commit 95dc44c

File tree

9 files changed

+151
-269
lines changed

9 files changed

+151
-269
lines changed

experimental/SMUS-CICD-pipeline-cli/docs/cli-commands.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -983,19 +983,19 @@ All commands support:
983983
smus-cli create -o my-manifest.yaml
984984

985985
# 2. Validate configuration
986-
smus-cli describe -p my-manifest.yaml
986+
smus-cli describe --manifest my-manifest.yaml
987987

988988
# 3. Create bundle from dev
989-
smus-cli bundle -p my-manifest.yaml -t dev
989+
smus-cli bundle --manifest my-manifest.yaml --target dev
990990

991991
# 4. Deploy to test
992-
smus-cli deploy -p my-manifest.yaml -t test
992+
smus-cli deploy --manifest my-manifest.yaml --targets test
993993

994994
# 5. Monitor deployment
995-
smus-cli monitor -p my-manifest.yaml -t test
995+
smus-cli monitor --manifest my-manifest.yaml --targets test
996996

997997
# 6. Run workflow commands
998-
smus-cli run -w my_dag -c "dags list" -t test
998+
smus-cli run --workflow my_dag --command "dags list" --targets test
999999
```
10001000

10011001
### Cleanup Workflow

experimental/SMUS-CICD-pipeline-cli/docs/getting-started/admin-quickstart.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,10 @@ my-organization/
490490
```bash
491491
# Both applications deploy to the same shared projects
492492
cd monthly-metrics
493-
smus-cli deploy --stages test --manifest manifest.yaml # → shared-data-platform-test
493+
smus-cli deploy --targets test --manifest manifest.yaml # → shared-data-platform-test
494494
495495
cd ../churn-model
496-
smus-cli deploy --stages test --manifest manifest.yaml # → shared-data-platform-test
496+
smus-cli deploy --targets test --manifest manifest.yaml # → shared-data-platform-test
497497
```
498498

499499
All workflows from both applications appear in the same MWAA environment.

experimental/SMUS-CICD-pipeline-cli/docs/q-cli-conversation-examples.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,18 @@ jobs:
121121
122122
- name: Deploy to Dev
123123
if: github.ref == 'refs/heads/main'
124-
run: smus-cli deploy -p manifest.yaml -t dev
124+
run: smus-cli deploy --manifest manifest.yaml --targets dev
125125
env:
126126
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
127127
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
128128
129129
- name: Deploy to Test
130130
if: github.ref == 'refs/heads/main'
131-
run: smus-cli deploy -p manifest.yaml -t test
131+
run: smus-cli deploy --manifest manifest.yaml --targets test
132132
133133
- name: Deploy to Prod (Manual Approval)
134134
if: github.event_name == 'workflow_dispatch'
135-
run: smus-cli deploy -p manifest.yaml -t prod
135+
run: smus-cli deploy --manifest manifest.yaml --targets prod
136136
```
137137

138138
This workflow will:

experimental/SMUS-CICD-pipeline-cli/src/smus_cicd/cli.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,19 @@ def configure_logging(output_format: str = "TEXT", log_level: str = None):
4444
def show_help_suggestion():
4545
"""Show helpful suggestions for common mistakes."""
4646
console.print("\n[yellow]💡 Common usage patterns:[/yellow]")
47-
console.print(" [cyan]smus-cli describe -p my-pipeline.yaml -t dev[/cyan]")
48-
console.print(" [cyan]smus-cli monitor -p my-pipeline.yaml --output JSON[/cyan]")
49-
console.print(" [cyan]smus-cli deploy -p my-pipeline.yaml -t prod[/cyan]")
47+
console.print(
48+
" [cyan]smus-cli describe --manifest my-pipeline.yaml --targets dev[/cyan]"
49+
)
50+
console.print(
51+
" [cyan]smus-cli monitor --manifest my-pipeline.yaml --output JSON[/cyan]"
52+
)
53+
console.print(
54+
" [cyan]smus-cli deploy --manifest my-pipeline.yaml --targets prod[/cyan]"
55+
)
5056

5157
console.print("\n[yellow]🔧 Universal switches (work on all commands):[/yellow]")
5258
console.print(" [green]--manifest/-m[/green] - Path to bundle manifest")
53-
console.print(" [green]--target/-t[/green] - Target environment")
59+
console.print(" [green]--targets/-t[/green] - Target environment(s)")
5460
console.print(" [green]--output[/green] - Output format (TEXT/JSON)")
5561
console.print(
5662
" [green]--log-level[/green] - Logging level (DEBUG/INFO/WARNING/ERROR)"
@@ -91,7 +97,7 @@ def main(
9197
# Register commands with proper ordering
9298
@app.command(
9399
"describe",
94-
help="1. Describe and validate pipeline manifest file. Example: smus-cli describe -p pipeline.yaml -t dev",
100+
help="1. Describe and validate pipeline manifest file. Example: smus-cli describe --manifest pipeline.yaml --targets dev",
95101
rich_help_panel="Pipeline Commands",
96102
)
97103
def describe(
@@ -177,7 +183,7 @@ def bundle(
177183

178184
@app.command(
179185
"deploy",
180-
help="3. Deploy bundle files to target (auto-initializes if needed). Example: smus-cli deploy -p pipeline.yaml -t prod",
186+
help="3. Deploy bundle files to target (auto-initializes if needed). Example: smus-cli deploy --manifest pipeline.yaml --targets prod",
181187
rich_help_panel="Pipeline Commands",
182188
)
183189
def deploy(
@@ -219,7 +225,7 @@ def deploy(
219225

220226
@app.command(
221227
"monitor",
222-
help="4. Monitor workflow status. Example: smus-cli monitor -p pipeline.yaml -t dev",
228+
help="4. Monitor workflow status. Example: smus-cli monitor --manifest pipeline.yaml --targets dev",
223229
rich_help_panel="Pipeline Commands",
224230
)
225231
def monitor(
@@ -320,7 +326,7 @@ def logs(
320326

321327
@app.command(
322328
"run",
323-
help="6. Run Airflow CLI commands in target environment. Example: smus-cli run --workflow my_dag -p pipeline.yaml",
329+
help="6. Run Airflow CLI commands in target environment. Example: smus-cli run --workflow my_dag --manifest pipeline.yaml",
324330
rich_help_panel="Pipeline Commands",
325331
)
326332
def run(

experimental/SMUS-CICD-pipeline-cli/src/smus_cicd/mcp/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,13 +461,13 @@ def _get_github_actions_template(self, project_name: str, targets: list) -> str:
461461
if target == "dev":
462462
deploy_steps += f""" - name: Deploy to {target}
463463
if: github.ref == 'refs/heads/main'
464-
run: smus-cli deploy -p bundle.yaml -t {target}
464+
run: smus-cli deploy --manifest bundle.yaml --targets {target}
465465
466466
"""
467467
else:
468468
deploy_steps += f""" - name: Deploy to {target}
469469
if: github.event_name == 'workflow_dispatch'
470-
run: smus-cli deploy -p bundle.yaml -t {target}
470+
run: smus-cli deploy --manifest bundle.yaml --targets {target}
471471
472472
"""
473473

experimental/SMUS-CICD-pipeline-cli/tests/scripts/setup/iam-based-domains/1-account-setup/stage-roles.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ Parameters:
1010
BedrockTestingPolicyArn:
1111
Type: String
1212
Description: ARN of the existing BedrockTestingPolicy managed policy
13-
Default: 'arn:aws:iam::019900059033:policy/BedrockTestingPolicy'
13+
Default: 'arn:aws:iam::${AWS::AccountId}:policy/BedrockTestingPolicy'
1414

1515
BedrockAgentPassRolePolicyArn:
1616
Type: String
1717
Description: ARN of the existing BedrockAgentPassRolePolicy managed policy
18-
Default: 'arn:aws:iam::019900059033:policy/BedrockAgentPassRolePolicy'
18+
Default: 'arn:aws:iam::${AWS::AccountId}:policy/BedrockAgentPassRolePolicy'
1919

2020
Resources:
2121
ProjectRole:

experimental/SMUS-CICD-pipeline-cli/tests/scripts/setup/iam-based-domains/4-project-setup/create_project.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: 2010-09-09
2-
Description: Create DataZone Project without membership handling
2+
Description: Create DataZone Project (basic version - role config added separately)
33

44
Parameters:
55
DomainId:
@@ -11,6 +11,12 @@ Parameters:
1111
Name:
1212
Description: Name of the project
1313
Type: String
14+
ProjectRoleArn:
15+
Description: Execution Role for the project
16+
Type: String
17+
OwnerRoleArn:
18+
Description: Owner Role for the project
19+
Type: String
1420

1521
Resources:
1622
Project:
@@ -20,7 +26,13 @@ Resources:
2026
DomainIdentifier: !Ref DomainId
2127
Name: !Ref Name
2228
ProjectProfileId: !Ref ProjectProfileId
23-
29+
customerProvidedRoleConfigs:
30+
- roleArn: !Ref ProjectRoleArn
31+
roleDesignation: PROJECT_OWNER
32+
membershipAssignments:
33+
- designation: PROJECT_OWNER
34+
member:
35+
groupIdentifier: !Ref OwnerRoleArn
2436
Outputs:
2537
ProjectId:
2638
Description: "DataZone Project ID"

0 commit comments

Comments
 (0)