Skip to content

Commit

Permalink
this repo is now only concerned with building the image and the lambd…
Browse files Browse the repository at this point in the history
…a function. No longer creating other infrastructure
  • Loading branch information
arnol377 committed Apr 23, 2025
1 parent b738c3f commit 8f1c9a3
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 376 deletions.
33 changes: 30 additions & 3 deletions .github/workflows/build-lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,39 @@ jobs:
uses: actions/checkout@v4

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
uses: CSVD/aws-auth@main
id: aws_auth
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ vars.AWS_REGION }}
ecs: true

- name: Terraform Init and Apply
env:
AWS_ACCESS_KEY_ID: ${{ steps.aws_auth.outputs.aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ steps.aws_auth.outputs.aws_secret_access_key }}
AWS_SESSION_TOKEN: ${{ steps.aws_auth.outputs.aws_session_token }}
working-directory: ./infrastructure
run: |
terraform init
terraform apply -auto-approve
- name: Package Source Code
run: |
zip -r source.zip . -x ".git/*" ".github/*" "infrastructure/*"
- name: Upload to S3
env:
AWS_ACCESS_KEY_ID: ${{ steps.aws_auth.outputs.aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ steps.aws_auth.outputs.aws_secret_access_key }}
AWS_SESSION_TOKEN: ${{ steps.aws_auth.outputs.aws_session_token }}
run: |
BUCKET_NAME=$(cd infrastructure && terraform output -raw codebuild_source_bucket)
aws s3 cp source.zip s3://${BUCKET_NAME}/source.zip
- name: Start CodeBuild Project
env:
AWS_ACCESS_KEY_ID: ${{ steps.aws_auth.outputs.aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ steps.aws_auth.outputs.aws_secret_access_key }}
AWS_SESSION_TOKEN: ${{ steps.aws_auth.outputs.aws_session_token }}
run: |
BUILD_ID=$(aws codebuild start-build --project-name eks-automation-lambda-builder --output text --query 'build.id')
echo "Started build with ID: $BUILD_ID"
Expand Down
7 changes: 0 additions & 7 deletions backend.tf

This file was deleted.

25 changes: 0 additions & 25 deletions buildspec.yml

This file was deleted.

103 changes: 0 additions & 103 deletions errors.txt

This file was deleted.

20 changes: 0 additions & 20 deletions infrastructure/github-actions-trust-policy.json

This file was deleted.

99 changes: 0 additions & 99 deletions infrastructure/main.tf

This file was deleted.

14 changes: 0 additions & 14 deletions infrastructure/outputs.tf

This file was deleted.

12 changes: 0 additions & 12 deletions infrastructure/providers.tf

This file was deleted.

15 changes: 0 additions & 15 deletions infrastructure/variables.tf

This file was deleted.

49 changes: 0 additions & 49 deletions main.tf

This file was deleted.

Loading

0 comments on commit 8f1c9a3

Please sign in to comment.