Skip to content

Commit

Permalink
ci: refactor e2e buildspec
Browse files Browse the repository at this point in the history
  • Loading branch information
necipallef committed Sep 20, 2024
1 parent 9d0ebc0 commit 72d27c9
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions buildspec-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ phases:
nodejs: 20
commands:
- npm i -g pnpm
- export COMMIT_SHA=$(cat meta.json | jq -r '.sha')
- # export COMMIT_SHA=$(cat meta.json | jq -r '.sha')
- export COMMIT_SHA=$(git rev-parse HEAD)
- echo $COMMIT_SHA
- echo $CODEBUILD_BUILD_ID
- echo $CODEBUILD_PUBLIC_BUILD_URL
Expand All @@ -20,16 +21,17 @@ phases:
- ls -lah
- pulumi version
- pnpm install
- pnpm -C website install && pnpm -C website build
- cd tests && pnpm install && npx playwright install --with-deps && cd ..
- cd infra/lambda && pnpm install && pulumi stack init e2e && pulumi stack select e2e && cd ../../
- cd infra/cloudfront && pnpm install && pulumi stack init e2e && pulumi stack select e2e && cd ../../
- cd infra && pnpm install && pnpm run lambda:up && pnpm run lambda:export && pnpm run cloudfront:up && pnpm run cloudfront:export && cd ../
- pnpm build
- cp -r dist e2e
- pnpm -C e2e/website install && pnpm -C website build
- cd e2e/tests && pnpm install && npx playwright install --with-deps && cd -
- cd e2e/infra/lambda && pnpm install && pulumi stack init e2e && pulumi stack select e2e && cd -
- cd e2e/infra/cloudfront && pnpm install && pulumi stack init e2e && pulumi stack select e2e && cd -
- cd e2e/infra && pnpm install && pnpm run lambda:up && pnpm run lambda:export && pnpm run cloudfront:up && pnpm run cloudfront:export && cd -
build:
commands:
- ls -a
- cd tests && pnpm test
- cd e2e/tests && pnpm test && cd -
finally:
- cd ../
- echo $COMMIT_SHA
- cd infra && pnpm cloudfront:destroy && pnpm lambda:destroy && cd ../
- cd e2e/infra && pnpm cloudfront:destroy && pnpm lambda:destroy && cd -

0 comments on commit 72d27c9

Please sign in to comment.