diff --git a/client/src/pages/ConfigurePage.tsx b/client/src/pages/ConfigurePage.tsx index a5c7a98..fc9204f 100644 --- a/client/src/pages/ConfigurePage.tsx +++ b/client/src/pages/ConfigurePage.tsx @@ -329,6 +329,7 @@ export default function ConfigurePage() { {provider === "aws" && ( + <> + + + )} {provider === "gcp" && ( diff --git a/client/src/store/usePipelineStore.ts b/client/src/store/usePipelineStore.ts index 25a2597..3c3e3f7 100644 --- a/client/src/store/usePipelineStore.ts +++ b/client/src/store/usePipelineStore.ts @@ -14,6 +14,8 @@ type PipelineState = { testCmd: string; buildCmd: string; awsRoleArn?: string; + awsSessionName?: string; + awsRegion?: string; gcpServiceAccountEmail?: string; }; provider: "aws" | "gcp" | "jenkins"; @@ -72,6 +74,8 @@ const initial: PipelineState = { installCmd: "npm ci", testCmd: "npm test", buildCmd: "npm run build", + awsSessionName: "autodeploy", + awsRegion: "us-east-1", gcpServiceAccountEmail: "", }, provider: "aws", diff --git a/server/tools/pipeline_generator.js b/server/tools/pipeline_generator.js index ab7a923..50c28b0 100644 --- a/server/tools/pipeline_generator.js +++ b/server/tools/pipeline_generator.js @@ -19,6 +19,8 @@ export const pipeline_generator = { testCmd: z.string().optional(), buildCmd: z.string().optional(), awsRoleArn: z.string().optional(), + awsSessionName: z.string().optional(), + awsRegion: z.string().optional(), gcpServiceAccountEmail: z.string().optional(), stages: z.array(z.enum(["build", "test", "deploy"])).optional(), }) @@ -33,6 +35,8 @@ export const pipeline_generator = { testCmd: options?.testCmd, buildCmd: options?.buildCmd, awsRoleArn: options?.awsRoleArn, + awsSessionName: options?.awsSessionName, + awsRegion: options?.awsRegion, stages: options?.stages, }; @@ -103,6 +107,8 @@ export const pipeline_generator = { testCmd: options?.testCmd, buildCmd: options?.buildCmd, awsRoleArn: options?.awsRoleArn, + awsSessionName: options?.awsSessionName, + awsRegion: options?.awsRegion, gcpServiceAccountEmail: options?.gcpServiceAccountEmail, stages: options?.stages, }; @@ -177,7 +183,8 @@ jobs: uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${normalized.awsRoleArn ?? "REPLACE_ME"} - aws-region: us-east-1 + role-session-name: ${normalized.awsSessionName ?? "autodeploy"} + aws-region: ${normalized.awsRegion ?? "us-east-1"} - name: Deploy Application run: echo "Deploying ${repo} to AWS..." `;