Files
kubernetes/hack/jenkins/test-history/gen_history
Ryan Hitchman 5683c0b087 Make test-history generator create pages for individual suites
This makes it easier to determine which tests cause particular suites to
fail.

All static HTML pages are now generated by one invocation of gen_html.py.

- make index include good/flake/fail numbers for each link
- consistently use % for string interpolation
2016-04-12 18:07:59 -07:00

37 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# Copyright 2016 The Kubernetes Authors All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Compiles a static HTML site containing the last day's worth of test results.
# Pass the URL of Jenkins into $1
set -o errexit
set -o nounset
readonly jenkins="$1"
readonly datestr=$(date +"%Y-%m-%d")
# Create JSON report
time python gen_json.py "${jenkins}" kubernetes
# Create static HTML reports out of the JSON
python gen_html.py --suites --prefixes ,e2e,soak,e2e-gce,e2e-gke,upgrade --output-dir static --input tests.json
# Upload to GCS
readonly bucket="kubernetes-test-history"
readonly gcs_acl="public-read"
gsutil -q cp -a "${gcs_acl}" -z json "tests.json" "gs://${bucket}/logs/${datestr}.json"
gsutil -q cp -ra "${gcs_acl}" "static" "gs://${bucket}/"