4 # * Licensed to the Apache Software Foundation (ASF) under one
5 # * or more contributor license agreements. See the NOTICE file
6 # * distributed with this work for additional information
7 # * regarding copyright ownership. The ASF licenses this file
8 # * to you under the Apache License, Version 2.0 (the
9 # * "License"); you may not use this file except in compliance
10 # * with the License. You may obtain a copy of the License at
12 # * http://www.apache.org/licenses/LICENSE-2.0
14 # * Unless required by applicable law or agreed to in writing, software
15 # * distributed under the License is distributed on an "AS IS" BASIS,
16 # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 # * See the License for the specific language governing permissions and
18 # * limitations under the License.
21 # This script is designed to run as a Jenkins job, such as at
22 # https://builds.apache.org/view/All/job/HBase%20Website%20Link%20Checker/
24 # It generates artifacts which the Jenkins job then can mail out and/or archive.
26 # We download a specific version of linklint because the original has bugs and
27 # is not well maintained.
29 # See http://www.linklint.org/doc/inputs.html for linklint options
31 # Clean up the workspace
32 rm -rf *.
zip > /dev
/null
33 rm -rf linklint
> /dev
/null
36 # This version of linklint fixes some bugs in the now-unmaintained 2.3.5 version
37 wget http
://ingo-karkat.de
/downloads
/tools
/linklint
/linklint-2.3
.5_ingo_020.
zip
38 unzip linklint-2.3
.5_ingo_020.
zip
39 chmod +x linklint
/linklint.pl
42 echo "Checking http://hbase.apache.org and saving report to link_report/"
43 echo "Excluding /testapidocs/ because some tests use private classes not published in /apidocs/."
44 # Check internal structure
45 linklint
/linklint.pl
-http \
46 -host hbase.apache.org \
48 -skip /testapidocs
/@ \
49 -skip /testdevapidocs
/@ \
59 # Detect whether we had errors and act accordingly
60 if ! grep -q 'ERROR' link_report
/index.html
; then
61 echo "Errors found. Sending email."
64 echo "No errors found. Warnings might be present."