-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodebuild-buildspec-test-and-build.yml
68 lines (67 loc) · 1.81 KB
/
codebuild-buildspec-test-and-build.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
version: 0.2
env:
#variables:
# key: "value"
# key: "value"
parameter-store:
PT_PROJECT: "/CodeBuild/reusable-webcomponents/PT_PROJECT"
PT_TOKEN: "/CodeBuild/reusable-webcomponents/PT_TOKEN"
CYPRESS_RECORD_KEY: "/CodeBuild/reusable-webcomponents/CYPRESS_RECORD_KEY"
SENTRY_AUTH_TOKEN: "/CodeBuild/reusable-webcomponents/SENTRY_AUTH_TOKEN"
SENTRY_ORG: "/CodeBuild/reusable-webcomponents/SENTRY_ORG"
SENTRY_PROJECT: "/CodeBuild/reusable-webcomponents/SENTRY_PROJECT"
#secrets-manager:
# key: secret-id:json-key:version-stage:version-id
# key: secret-id:json-key:version-stage:version-id
#exported-variables:
# - variable
# - variable
#git-credential-helper: yes
#batch:
#fast-fail: true
#build-list:
#build-matrix:
#build-graph:
phases:
install:
runtime-versions:
java: corretto11
nodejs: 14
commands:
- n 18
- set
- sysctl fs.inotify.max_user_watches
- sysctl fs.inotify.max_user_watches=524288
- sysctl fs.inotify.max_user_watches
- chmod a+x -R bin/*
- bin/codebuild-setup.sh
pre_build:
commands:
- set
- bin/codebuild-test.sh
build:
commands:
- set
- export BUILD_TARGET='development'
- "if [ \"$CI_BRANCH\" = \"production\" -o \"$CI_BRANCH\" = \"staging\" ]; then export BUILD_TARGET=$CI_BRANCH ; fi"
- npm run build:$BUILD_TARGET
- ls dist
post_build:
commands:
if [ -f ./scripts/releaseNotes.sh ]; then ./scripts/releaseNotes.sh; fi
#reports:
#report-name-or-arn:
#files:
# - location
# - location
#base-directory: location
#discard-paths: yes
#file-format: JunitXml | CucumberJson
artifacts:
files:
- '**/*'
name: reusable-webcomponents-build.zip
base-directory: dist
#cache:
#paths:
# - paths