summaryrefslogtreecommitdiffstats
path: root/jjb/doctor/docu-build.sh
blob: d549506e1a6edcd16abd87cf42c66b1622d3bcb6 (plain)
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
#!/bin/bash
set -e
set -o pipefail

design_docs_dir="design_docs"
build_dir="build"
project="$(git remote -v | head -n1 | awk '{{print $2}}' | sed -e 's,.*:\(.*/\)\?,,' -e 's/\.git$//')"
export PATH=$PATH:/usr/local/bin/

make

# upload all built files
files=(
    $build_dir/$design_docs_dir
    $build_dir/requirements/html
    $build_dir/requirements/latex/*.pdf
)

for file in "${{files[@]}}"; do
    gsutil cp -L gsoutput.txt $file gs://artifacts.opnfv.org/$project/
    gsutil setmeta -h "Cache-Control:private, max-age=0, no-transform" \
	gs://artifacts.opnfv.org/$project/$file
    cat gsoutput.txt
    rm -f gsoutput.txt
done