-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathentry.sh
executable file
·31 lines (25 loc) · 1020 Bytes
/
entry.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
#!/bin/bash
set -euxo pipefail
export PATH=/opt/conda/envs/nimbusperf/bin:$PATH
# Clear any pre-existing reports
rm -rf reports
echo -e "\n*************************************************"
echo -e "Copying index.html\n"
gsutil cp $BUCKET_URL/index.html index.html
cp index.html index-backup.html
echo -e "\n*************************************************"
echo -e "Generating reports...\n"
python find-latest-experiment index.html
if [ -d "reports" ] && [ "$(ls -A reports)" ]; then
for file in reports/* ; do
echo -e "\n*************************************************"
echo -e "Updating index.html with $file"
python update-index --index index.html --append $file
echo -e "Transferring $file to protosaur\n"
gsutil cp $file $BUCKET_URL/$(basename $file)
done
echo -e "\n*************************************************"
echo -e "Uploading new index.html to protosaur\n"
gsutil cp index-backup.html $BUCKET_URL/index-backup.html
gsutil cp index.html $BUCKET_URL/index.html
fi