-
Notifications
You must be signed in to change notification settings - Fork 8
/
test-via-docker.sh
executable file
·52 lines (42 loc) · 1.35 KB
/
test-via-docker.sh
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
#!/bin/bash -ex
cd $(dirname ${0})
my_ip=$(ipconfig getifaddr en0)
cd go
go test ./...
cd ..
assureDir() {
if [ ! -d ${1} ] ; then
mkdir ${1}
fi
}
assureDir /tmp/crlite
assureDir /tmp/crlite/processing
assureDir /tmp/crlite/persistent
if [ "x${GOOGLE_APPLICATION_CREDENTIALS}x" == "xx" ]; then
echo "You must set GOOGLE_APPLICATION_CREDENTIALS"
exit 1
fi
echo "Ensure Redis is running at ${my_ip}:6379"
docker run --rm -it -p 8080:8080/tcp \
-e "redisHost=${my_ip}:6379" \
-e "credentials_data=$(base64 ${GOOGLE_APPLICATION_CREDENTIALS})" \
-e "DoNotUpload=true" \
-e "outputRefreshMs=1000" \
-e "logList=https://ct.googleapis.com/logs/argon2021/, https://ct.googleapis.com/logs/argon2022/, https://ct.googleapis.com/logs/argon2023/" \
-e "limit=500" \
-e "runForever=false" \
crlite:staging-fetch
docker run --rm -it \
-e "redisHost=${my_ip}:6379" \
-e "credentials_data=$(base64 ${GOOGLE_APPLICATION_CREDENTIALS})" \
-e "DoNotUpload=true" \
-e "outputRefreshMs=1000" \
--mount type=bind,src=/tmp/crlite/persistent,dst=/persistent \
--mount type=bind,src=/tmp/crlite/processing,dst=/processing \
crlite:staging-generate
docker run --rm -it \
-e "redisHost=${my_ip}:6379" \
-e "credentials_data=$(base64 ${GOOGLE_APPLICATION_CREDENTIALS})" \
-e "DoNotUpload=true" \
-e "outputRefreshMs=1000" \
crlite:staging-publish