-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f16265
commit 2f3333d
Showing
15 changed files
with
115 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: 0.2 | ||
|
||
env: | ||
variables: | ||
NODE_OPTIONS: "--max_old_space_size=8192" | ||
|
||
phases: | ||
install: | ||
runtime-versions: | ||
nodejs: 18 | ||
build: | ||
commands: | ||
- echo $CODEBUILD_RESOLVED_SOURCE_VERSION > commit_hash.txt | ||
- cd frontend && npm ci | ||
- npm run build:preprod | ||
|
||
artifacts: | ||
files: | ||
- '**/*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: 0.2 | ||
|
||
env: | ||
variables: | ||
NODE_OPTIONS: "--max_old_space_size=8192" | ||
|
||
phases: | ||
install: | ||
runtime-versions: | ||
nodejs: 18 | ||
build: | ||
commands: | ||
- echo $CODEBUILD_RESOLVED_SOURCE_VERSION > commit_hash.txt | ||
- cd frontend && npm ci | ||
- npm run build:prod | ||
|
||
artifacts: | ||
files: | ||
- '**/*' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: 0.2 | ||
|
||
phases: | ||
build: | ||
commands: | ||
- COMMIT_HASH=$(cat commit_hash.txt | cut -c 1-7) | ||
- echo $COMMIT_HASH | ||
- cd frontend/dist | ||
- aws s3 cp --recursive . s3://sfc-frontend-build-artifacts/$COMMIT_HASH/preprod | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: 0.2 | ||
|
||
phases: | ||
build: | ||
commands: | ||
- COMMIT_HASH=$(cat commit_hash.txt | cut -c 1-7) | ||
- echo $COMMIT_HASH | ||
- cd frontend/dist | ||
- aws s3 cp --recursive . s3://sfc-frontend-build-artifacts/$COMMIT_HASH/staging | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: 0.2 | ||
|
||
phases: | ||
install: | ||
runtime-versions: | ||
nodejs: 18 | ||
commands: | ||
- curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - | ||
- echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list | ||
- apt-get -y update | ||
- apt-get -y install google-chrome-stable | ||
build: | ||
commands: | ||
- cd frontend | ||
- npm install -g @lhci/[email protected] | ||
- npm run build | ||
- lhci autorun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: 0.2 | ||
|
||
phases: | ||
pre_build: | ||
commands: | ||
- echo Logging in to Amazon ECR... | ||
- aws --version | ||
- aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin 636146736465.dkr.ecr.eu-west-1.amazonaws.com | ||
- export manifest=$(aws ecr batch-get-image --repository-name sfc-backend-build-images --image-ids imageTag=preprod --output text --query 'images[].imageManifest') | ||
|
||
build: | ||
commands: | ||
- COMMIT_HASH=$(aws ecr describe-images --repository-name sfc-backend-build-images --image-ids imageTag=preprod --output text | awk '{print $2}' | grep -Ev 'latest|staging|preprod|prod|benchmark'| tail -n1) | ||
- echo Retagging the latest ecr image... | ||
- aws ecr batch-delete-image --repository-name sfc-backend-build-images --image-ids imageTag=benchmark | ||
- aws ecr put-image --repository-name sfc-backend-build-images --image-tag benchmark --image-manifest "$manifest" | ||
- echo Copy s3 bucket from bnd to benchmark... | ||
# This will be uncommented when we generate frontend assets for benchmark | ||
# - aws s3 cp --recursive s3://sfc-frontend-build-artifacts/$COMMIT_HASH/benchmark s3://sfc-frontend-benchmark/ | ||
- export $(printf "AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s AWS_SESSION_TOKEN=%s" $(aws sts assume-role --role-arn arn:aws:iam::702856547275:role/CodebuildApprunnerCrossAccountAccessRole --role-session-name MySessionName --query "Credentials.[AccessKeyId,SecretAccessKey,SessionToken]" --output text)) | ||
- aws apprunner start-deployment --service-arn arn:aws:apprunner:eu-west-1:702856547275:service/sfc-app-runner-benchmark/147f2ec134464e94baca5c7864f92e2e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.