File tree Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ SNAPSHOT=./large.yaml
5
+ PUBLIC_KEY=./key-rhel-osci.pub
6
+ POLICY_CONFIGURATION=github.com/enterprise-contract/config//redhat
7
+
8
+ # VERSIONS_TO_TEST=(
9
+ # v0.6.94
10
+ # v0.6.129
11
+ # v0.6.138
12
+ # v0.6.142
13
+ # )
14
+
15
+ # VERSIONS_TO_TEST=(v0.6.94)
16
+ VERSIONS_TO_TEST=(main)
17
+
18
+ # WORKERS=5
19
+ WORKERS=20
20
+
21
+ GOOS=$( go env GOOS)
22
+ GOARCH=$( go env GOARCH)
23
+ EC=./dist/ec_${GOOS} _${GOARCH}
24
+
25
+ TIME=/usr/bin/time
26
+ TIME_FORMAT=' User CPU time: %U\nSystem CPU time: %S\nElapsed time: %e\nPeak memory usage: %M kb'
27
+
28
+ for ref in ${VERSIONS_TO_TEST[@]} ; do
29
+ EC_REF=${EC} _${ref}
30
+
31
+ if [[ ! -x " $EC_REF " ]]; then
32
+ git reset --hard " ${ref} "
33
+ make ${EC}
34
+ cp ${EC} ${EC_REF}
35
+ cp ${EC} .sha256 ${EC_REF} .sha256
36
+ fi
37
+
38
+ title=" Ref ${ref} "
39
+ echo " $title "
40
+ echo " $title " | tr ' [:print:]' ' ='
41
+
42
+ git log --format=" Commit: %h %s%nDate: %cd" -n 1 ${ref}
43
+ echo " Started: $( date) "
44
+
45
+ ${TIME} --format " ${TIME_FORMAT} " \
46
+ ${EC_REF} validate image \
47
+ --images large.yaml \
48
+ --public-key key-rhel-osci.pub \
49
+ --policy ${POLICY_CONFIGURATION} \
50
+ --ignore-rekor \
51
+ --output json=/dev/null \
52
+ --output yaml=/dev/null \
53
+ --show-successes \
54
+ --timeout 60m \
55
+ --workers ${WORKERS} \
56
+ --info \
57
+ 2>&1 | tee " out-$ref .log"
58
+
59
+ echo " "
60
+
61
+ done
You can’t perform that action at this time.
0 commit comments