Skip to content

Commit

Permalink
Force error from remote invoke
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbreves committed Aug 30, 2023
1 parent 3e38381 commit cd7cbf8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,10 @@ jobs:
--parameter-overrides "LambdaSecurityGroupId=${{ vars.LAMBDA_SG_ID }} LambdaSubnet1Id=${{ vars.LAMBDA_SUBNET_1_ID }} LambdaSubnet2Id=${{ vars.LAMBDA_SUBNET_2_ID }} SecretKeyArn=${{ vars.SECRET_ARN }} DBSecretArn=${{ vars.DB_SECRET_ARN }} DBEndpoint=${{ vars.DB_ENDPOINT }}"
- name: Run migrations
run: sam remote invoke FastApiMigrationsFunction --stack-name fastapi-backend-lambda
run: |
output=$(sam remote invoke FastApiMigrationsFunction --stack-name fastapi-backend-lambda 2>&1)
echo "$output"
if [[ $output == *"Error"* ]]; then
exit 1
fi
2 changes: 1 addition & 1 deletion backend/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Parameters:
Description: DB host:port
DBName:
Type: String
Default: fastapidb
Default: fastapidb_
Description: DB name
Resources:
FastApiFunction:
Expand Down

0 comments on commit cd7cbf8

Please sign in to comment.