Skip to content

Commit

Permalink
CMDCT-4243 - serverless v4 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
peoplespete committed Jan 17, 2025
1 parent ccaedd5 commit f8ca648
Show file tree
Hide file tree
Showing 12 changed files with 110 additions and 1,120 deletions.
3 changes: 2 additions & 1 deletion .env.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ LOGGING_BUCKET=log-bucket
S3_LOCAL_ENDPOINT=http://localhost:4569
SKIP_PREFLIGHT_CHECK=true
QMS_REPORT_TABLE_NAME=local-qms-reports
SERVERLESS_LICENSE_KEY=op://mdct_devs/hcbs_secrets/SERVERLESS_LICENSE_KEY

# Values used for short-circuiting ssm: lookups, most likely won't need locally
VPC_ID=local-nonsense
Expand All @@ -33,4 +34,4 @@ SEED_ADMIN_USER_PASSWORD=op://mdct_devs/hcbs_secrets/SEED_ADMIN_USER_PASSWORD #
SEED_STATE_USER_EMAIL=op://mdct_devs/hcbs_secrets/SEED_STATE_USER_EMAIL
SEED_STATE_USER_PASSWORD=op://mdct_devs/hcbs_secrets/SEED_STATE_USER_PASSWORD # pragma: allowlist secret
SEED_STATE=op://mdct_devs/hcbs_secrets/SEED_STATE
SEED_STATE_NAME=op://mdct_devs/hcbs_secrets/SEED_STATE_NAME
SEED_STATE_NAME=op://mdct_devs/hcbs_secrets/SEED_STATE_NAME
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ permissions:
actions: read
pages: write

env:
SERVERLESS_LICENSE_KEY: ${{ secrets.SERVERLESS_LICENSE_KEY }}

jobs:
unit-tests:
name: Unit Tests
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,13 @@
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^2.4.1",
"serverless": "^3.39.0",
"serverless": "^4.4.18",
"serverless-bundle": "^6.0.0",
"serverless-dotenv-plugin": "^3.0.0",
"serverless-dynamodb": "^0.2.54",
"serverless-iam-helper": "github:Enterprise-CMCS/serverless-iam-helper",
"serverless-offline": "^13.5.0",
"serverless-plugin-scripts": "^1.0.2",
"serverless-s3-bucket-helper": "github:Enterprise-CMCS/serverless-s3-bucket-helper#master",
"serverless-stack-termination-protection": "^2.0.2",
"typescript": "^4.6.3",
"util": "^0.12.4",
Expand Down
2 changes: 1 addition & 1 deletion run
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fi
# check serverless is installed globally.
if ! which serverless > /dev/null ; then
echo "installing serverless globally"
yarn global add serverless@3.38.0
yarn global add serverless@4.4.18
fi

# have to ensure that yarn install is up to date.
Expand Down
1 change: 0 additions & 1 deletion services/app-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"jest": "^29.7.0",
"serverless-api-client-certificate": "^1.0.2",
"serverless-associate-waf": "^1.2.1",
"serverless-plugin-typescript": "^2.1.5",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2"
},
Expand Down
7 changes: 3 additions & 4 deletions services/app-api/serverless.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
service: app-api

frameworkVersion: "3"
frameworkVersion: "4"

package:
individually: true

plugins:
- serverless-plugin-typescript
- serverless-dotenv-plugin
- serverless-associate-waf
- serverless-stack-termination-protection
Expand Down Expand Up @@ -57,8 +56,8 @@ provider:
restApi: true
iam:
role:
path: ${env:IAM_PATH, ssm:/configuration/${self:custom.stage}/iam/path, ssm:/configuration/default/iam/path, "/"}
permissionsBoundary: ${env:IAM_PERMISSIONS_BOUNDARY, ssm:/configuration/${self:custom.stage}/iam/permissionsBoundaryPolicy, ssm:/configuration/default/iam/permissionsBoundaryPolicy, ""}
path: /delegatedadmin/developer/
permissionsBoundary: !Sub arn:aws:iam::${AWS::AccountId}:policy/cms-cloud-admin/developer-boundary-policy
statements:
- Effect: "Allow"
Action:
Expand Down
Loading

0 comments on commit f8ca648

Please sign in to comment.