Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Github workflow deployment script not working as intended #655

Merged
merged 1 commit into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/terragrunt-apply-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ jobs:

terragrunt-apply-all-modules:
needs: build-tag-push-lambda-images
if: always() && (needs.build-tag-push-lambda-images.result == 'success' || needs.build-tag-push-lambda-images.result == 'skipped')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -189,7 +190,7 @@ jobs:
run: terragrunt apply --terragrunt-non-interactive -auto-approve

update-lambda-function-image:
needs: [detect-lambda-changes, build-tag-push-lambda-images, terragrunt-apply-all-modules]
needs: [detect-lambda-changes, terragrunt-apply-all-modules]
Copy link
Contributor Author

@craigzour craigzour May 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the build-tag-push-lambda-images dependency as the terragrunt-apply-all-modules job already waits for the build-tag-push-lambda-images to be completed.

if: needs.detect-lambda-changes.outputs.lambda-to-rebuild != '[]'
runs-on: ubuntu-latest
strategy:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/terragrunt-apply-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:

terragrunt-apply-all-modules:
needs: build-tag-push-lambda-images
if: github.ref == 'refs/heads/develop'
if: github.ref == 'refs/heads/develop' && always() && (needs.build-tag-push-lambda-images.result == 'success' || needs.build-tag-push-lambda-images.result == 'skipped')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -203,7 +203,7 @@ jobs:
run: terragrunt apply --terragrunt-non-interactive -auto-approve

update-lambda-function-image:
needs: [detect-lambda-changes, build-tag-push-lambda-images, terragrunt-apply-all-modules]
needs: [detect-lambda-changes, terragrunt-apply-all-modules]
if: needs.detect-lambda-changes.outputs.lambda-to-rebuild != '[]'
runs-on: ubuntu-latest
strategy:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ $ cd lambda-code/
$ ./deploy-lambda-images.sh
```

**There is a `skip` argument you can pass to that script if you only want to deploy the Lambda images for which you have made changes. It uses the `git diff --cached -- .` command in every single Lambda folder to know whether the image should be deployed or skipped**
**There is a `skip` argument you can pass to that script if you only want to deploy the Lambda images for which you have made changes. It uses the `git diff HEAD .` command in every single Lambda folder to know whether the image should be deployed or skipped**

## Dynamo Database Table Schemas

Expand Down
Loading