Skip to content

Commit

Permalink
Update buildspec: support 'make' commands
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalushin committed Aug 18, 2021
1 parent fbedb5b commit 01836ae
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions buildspec.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
version: 0.2

env:
secrets-manager:
GITHUB_PRIVATE_KEY: "GITHUB_CREDENTIALS:PRIVATE_KEY"
GITHUB_PUBLIC_KEY: "GITHUB_CREDENTIALS:PUBLIC_KEY"

phases:
install:
runtime-versions:
nodejs: 14
commands:
# Copy keys for accessing GitHub (to download a fork of dynamodb-toolbox)
- echo $GITHUB_PRIVATE_KEY | base64 --decode > ~/.ssh/id_ed25519
- echo $GITHUB_PUBLIC_KEY | base64 --decode > ~/.ssh/id_ed25519.pub
- chmod 600 ~/.ssh/id_ed25519
- eval "$(ssh-agent -s)"

# Upgrade npp to the latest version. Default version has a bug ('dist' folder is not downloaded in some cases).
- npm install -g npm

# Upgrade AWS CLI to the latest version
- pip install --upgrade awscli

# Install DynamoDbLocal image for running unit tests
- docker run -p 8000:8000 -d public.ecr.aws/p7c5q3n4/amazon/dynamodb-local:latest
- make install


# Install all packages
- make install

pre_build:
commands:
- cd $CODEBUILD_SRC_DIR
- make test


build:
commands:
- cd $CODEBUILD_SRC_DIR
- make deploy BUCKET_FOR_LAMBDAS=$BUCKET_FOR_LAMBDAS STAGE=$STAGE INTEGRATION_API_KEY=$INTEGRATION_API_KEY

post_build:
commands:

artifacts:
files:
- template-export.yaml
- product-catalog/template-export.yaml

0 comments on commit 01836ae

Please sign in to comment.