2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2016 Linux Foundation and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
11 #export PATH=${PATH}:/root/gsutil
13 #Step Generate index.html
14 if [ -f index.html ] ; then
20 for index in $(gsutil ls -l gs://artifacts.opnfv.org | grep -v logs | grep -v review | awk 'NF==1'| sed s,gs://artifacts.opnfv.org/,,)
23 echo "<LI><a href=\"${index%/*}.html\">"$index"</a></LI>" >> $OUTPUT
26 #functest logs##########################
28 for project in functest vswitchperf
31 for index in $(gsutil ls -l gs://artifacts.opnfv.org/logs/"$project"/ |awk 'NF==1'| sed s,gs://artifacts.opnfv.org/,, )
33 index="$(echo ${index%/*} | sed s,/,_,g)"
34 echo "<LI><a href=\"http://artifacts.opnfv.org/${index%/*}.html\">"$index"</a></LI>" >> $OUTPUT
39 #####################################
42 #genrate html files for all project except vswitchperf
43 for index in $(gsutil ls -l gs://artifacts.opnfv.org | grep -v logs |awk 'NF==1'| sed s,gs://artifacts.opnfv.org/,,)
45 OUTPUT=${index%/*}.html
49 for filepath in $(gsutil ls -R gs://artifacts.opnfv.org/"$index" | sed s,gs://artifacts.opnfv.org/,, | grep -v "favicon.ico" | grep -v "gsutil" ); do
52 if [[ $filepath =~ "/:" ]]; then
53 path=$(echo $filepath| sed s,/:,,g)
54 echo "<UL>" >> $OUTPUT
55 echo "<LI>$path</LI>" >> $OUTPUT
56 echo "</UL>" >> $OUTPUT
58 echo "<LI><a href=\"http://artifacts.opnfv.org/$filepath\">"$filepath"</a></LI>" >> $OUTPUT
62 gsutil cp $OUTPUT gs://artifacts.opnfv.org/
65 -h "Content-Type:text/html" \
66 -h "Cache-Control:private, max-age=0, no-transform" \
67 gs://artifacts.opnfv.org/$OUTPUT \
73 #generate file for vswitch perf (I dont know what happend here but there is a wierd character in this bucket)
76 OUTPUT=${index%/*}.html
79 for filepath in $(gsutil ls -R gs://artifacts.opnfv.org/"$index" | sed s,gs://artifacts.opnfv.org/,, | grep -v "favicon.ico" | grep -v "gsutil" ); do
82 if [[ $filepath =~ "/:" ]]; then
83 path=$(echo $filepath| sed s,/:,,g)
84 echo "<UL>" >> $OUTPUT
85 echo "<LI>$path</LI>" >> $OUTPUT
86 echo "</UL>" >> $OUTPUT
88 echo "<LI><a href=\"http://artifacts.opnfv.org/$filepath\">"$filepath"</a></LI>" >> $OUTPUT
94 gsutil cp $OUTPUT gs://artifacts.opnfv.org/
97 -h "Content-Type:text/html" \
98 -h "Cache-Control:private, max-age=0, no-transform" \
99 gs://artifacts.opnfv.org/$OUTPUT \
101 # Gerate html for logs
103 for project in functest vswitchperf
105 for index in $(gsutil ls -l gs://artifacts.opnfv.org/logs/"$project"/ |awk 'NF==1'| sed s,gs://artifacts.opnfv.org/,, )
108 OUTPUT="$(echo ${index%/*}.html | sed s,/,_,g)"
113 for filepath in $(gsutil ls -R gs://artifacts.opnfv.org/"$index" | sed s,gs://artifacts.opnfv.org/,, | grep -v "favicon.ico" | grep -v "gsutil" ); do
116 if [[ $filepath =~ "/:" ]]; then
117 path=$(echo $filepath| sed s,/:,,g)
118 echo "<UL>" >> $OUTPUT
119 echo "<LI>$path</LI>" >> $OUTPUT
120 echo "</UL>" >> $OUTPUT
122 echo "<LI><a href=\"http://artifacts.opnfv.org/$filepath\">"$filepath"</a></LI>" >> $OUTPUT
129 gsutil cp $OUTPUT gs://artifacts.opnfv.org/
132 -h "Content-Type:text/html" \
133 -h "Cache-Control:private, max-age=0, no-transform" \
134 gs://artifacts.opnfv.org/$OUTPUT \
143 echo "<p> Generated on $(date) </p>" >> $OUTPUT
147 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
148 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
149 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
150 })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
151 ga('create', 'UA-831873-26', 'auto');
152 ga('send', 'pageview');
156 #copy and uplad index file genrated in first step, last
157 gsutil cp $OUTPUT gs://artifacts.opnfv.org/
160 -h "Content-Type:text/html" \
161 -h "Cache-Control:private, max-age=0, no-transform" \
162 gs://artifacts.opnfv.org/$OUTPUT \