forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec-pr.yaml
42 lines (35 loc) · 1.61 KB
/
buildspec-pr.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
version: 0.2
# This buildspec is intended to be used by GitHub PR builds.
env:
variables:
# Update package.json with "exclude" statements for all failing rules.
# Whenever a new attribute to any resource in the CFN spec, by default
# awslint will block the build because the attribute does not exist in
# the corresponding L2 ('resource-attribute' rule). By ignoring it
# automatically, we save on-call time, and users who have lived without
# this attribute so far can wait for a bit longer.
AWSLINT_SAVE: "true"
phases:
install:
commands:
# baked in our image.
# this also takes care of launching the docker daemon.
- /root/ecr-proxy/start.sh
# CodeBuild always runs as root, allow npm to operate as such
- npm config set unsafe-perm true
# Install yarn if it wasn't already present in the image
- yarn --version || npm -g install yarn
# Packing the mono-libraries (monocdk & aws-cdk-lib) can cause
# memory errors. Increasing this value allows our build to more consistently succeed
- (command -v sysctl || yum install -y procps-ng) && /sbin/sysctl -w vm.max_map_count=2251954
pre_build:
commands:
- /bin/bash ./scripts/cache-load.sh
build:
commands:
- /bin/bash ./build.sh
- /bin/bash ./scripts/transform.sh
# After compilation, run Rosetta (using the cache if available).
# This will print errors, and fail the build if there are compilation errors in any packages marked as 'strict'.
- /bin/bash ./scripts/run-rosetta.sh
- git diff-index --exit-code --ignore-space-at-eol --stat HEAD