Adding dead-link-linter gate
https://github.com/DannyMassa/dead-link-linter Change-Id: I9ba999e7587fbc0e1d8a9f9383b5150fecd4ac45
This commit is contained in:
parent
4f7a9dbf6d
commit
3acead37a9
25
.deadlink
Normal file
25
.deadlink
Normal file
@ -0,0 +1,25 @@
|
||||
directories:
|
||||
- "./"
|
||||
fileExtensions:
|
||||
- ".md"
|
||||
- ".rst"
|
||||
goldenURL: "https://google.com"
|
||||
ignored:
|
||||
- "https://google.com"
|
||||
- "http://username:password@host:port"
|
||||
- "https://10.23.25.101:6443"
|
||||
- "https://10.23.25.102:6443"
|
||||
- "http://10.0.4.4/identity"
|
||||
- "http://192.168.122.10:8000/redfish/v1/Systems"
|
||||
- "http://192.168.122.10:8000/redfish/v1/Systems/8e5b2dc4-0c1d-4509-af2f-7a4a8f2121a8"
|
||||
- "http://localhost/mini.iso"
|
||||
- "http://localhost/mini.iso"
|
||||
- "http://localhost:8000/"
|
||||
- "http://localhost:8000/redfish/v1/Managers/58893887-894-2487-2389-841168418919/VirtualMedia/Cd"
|
||||
- "http://localhost:8000/redfish/v1/Managers/58893887-894-2487-2389-841168418919/VirtualMedia/Cd/Actions/VirtualMedia.InsertMedia-"
|
||||
- "http://localhost:8000/redfish/v1/Systems/"
|
||||
- "http://localhost:8000/redfish/v1/Systems/47a3b9a3-3967-4d23-98d8-18de1c28e94f"
|
||||
- "http://localhost:8000/redfish/v1/Systems/47a3b9a3-3967-4d23-98d8-18de1c28e94f"
|
||||
- "http://localhost:8000/redfish/v1/Systems/47a3b9a3-3967-4d23-98d8-18de1c28e94f/Actions/ComputerSystem.Reset"
|
||||
maxFailures: 0
|
||||
logVerbosity: 0
|
5
Makefile
5
Makefile
@ -373,6 +373,11 @@ check-copyright:
|
||||
validate-docs:
|
||||
@./tools/validate_docs
|
||||
|
||||
# Validate all URL references in documentation work
|
||||
.PHONY: dead-link-linter
|
||||
dead-link-linter:
|
||||
@./tools/dead-link-linter
|
||||
|
||||
# Generate code
|
||||
generate: controller-gen
|
||||
$(CONTROLLER_GEN) object:headerFile="tools/license_go.txt" paths="./..."
|
||||
|
20
playbooks/airship-airshipctl-dead-link-linter.yaml
Normal file
20
playbooks/airship-airshipctl-dead-link-linter.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
# 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.
|
||||
|
||||
- hosts: primary
|
||||
tasks:
|
||||
- name: Run Auxiliary Linter
|
||||
block:
|
||||
- name: "make dead-link-linter"
|
||||
make:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
target: dead-link-linter
|
26
tools/dead-link-linter
Executable file
26
tools/dead-link-linter
Executable file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -xe
|
||||
|
||||
: "${LINTER_VERSION:="1.0.3"}"
|
||||
: "${OS_TYPE:="linux"}"
|
||||
: "${ARCHITECTURE:="amd64"}"
|
||||
|
||||
URL="https://github.com/DannyMassa/dead-link-linter/releases/download/${LINTER_VERSION}/dead-link-linter-${LINTER_VERSION}-${OS_TYPE}-${ARCHITECTURE}.tar.gz"
|
||||
TAR_BALL="dead-link-linter-${LINTER_VERSION}-${OS_TYPE}-${ARCHITECTURE}.tar.gz"
|
||||
|
||||
wget ${URL}
|
||||
tar -xvf ${TAR_BALL}
|
||||
./dead-link-linter
|
||||
|
||||
status=$?
|
||||
[ $status -eq 0 ] && \
|
||||
echo "Dead Link Linter Passed" && \
|
||||
rm ${TAR_BALL} && \
|
||||
rm dead-link-linter && \
|
||||
exit 0 \
|
||||
|| \
|
||||
echo "Dead Link Linter Failed" && \
|
||||
rm ${TAR_BALL} && \
|
||||
rm dead-link-linter && \
|
||||
exit 1
|
@ -49,6 +49,13 @@
|
||||
nodeset: airship-airshipctl-single-node
|
||||
voting: false
|
||||
|
||||
- job:
|
||||
name: airship-airshipctl-dead-link-linter
|
||||
description: Ensures all URLs referenced in documentation are still working
|
||||
run: playbooks/airship-airshipctl-dead-link-linter.yaml
|
||||
nodeset: airship-airshipctl-single-node
|
||||
voting: false
|
||||
|
||||
- job:
|
||||
name: airship-airshipctl-build-image
|
||||
nodeset: airship-airshipctl-single-node
|
||||
|
@ -42,6 +42,7 @@
|
||||
- airship-airshipctl-gate-script-runner-docker
|
||||
- airship-aiap-build-image
|
||||
- airship-airship-in-a-pod-script-runner
|
||||
- airship-airshipctl-dead-link-linter
|
||||
experimental:
|
||||
jobs:
|
||||
- airship-airshipctl-docker-kubebench-conformance
|
||||
|
Loading…
Reference in New Issue
Block a user