generated from amazon-archives/__template_MIT-0
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildspec.yml
More file actions
35 lines (31 loc) · 1019 Bytes
/
buildspec.yml
File metadata and controls
35 lines (31 loc) · 1019 Bytes
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
version: 0.2
env:
shell: bash
variables:
CEDAR_VERSION_EXPECTED: "2.4.2"
phases:
build:
commands:
- export PATH="/root/.cargo/bin:$PATH"
- >
if [ -f /root/.cargo/bin/cedar ]; then export CEDAR_VERSION=$(cedar --version | cut -d ' ' -f 2); fi
- >
echo "expected cedar version $CEDAR_VERSION_EXPECTED found $CEDAR_VERSION"
- >
[[ "$CEDAR_VERSION" == "$CEDAR_VERSION_EXPECTED" ]] || rm -f /root/.cargo/bin/cedar
- >
[ -f /root/.cargo/bin/cedar ] || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- >
[ -f /root/.cargo/bin/cedar ] || cargo install cedar-policy-cli@"$CEDAR_VERSION_EXPECTED"
- cd policystore/tests
- ./cedar_testrunner.sh
# https://docs.aws.amazon.com/codebuild/latest/userguide/report-create.html
reports:
test-report:
files:
- junitreport.xml
file-format: "JUNITXML"
base-directory: policystore/tests
cache:
paths:
- '/root/.cargo/bin/cedar'