-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(validations): Attempt to add validations
- Loading branch information
Showing
10 changed files
with
167 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# TODO: This should be added to the main pipeline launch to validate the final deployment and upload the report | ||
|
||
# name: Run Risu analysis | ||
|
||
# on: | ||
# push: | ||
# # branches: | ||
# # - main | ||
# # schedule: | ||
# # - cron: '0 0 * * *' | ||
|
||
# jobs: | ||
# risu: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/[email protected] | ||
|
||
# # Use GitHub Actions' cache to shorten build times and decrease load on servers | ||
# - uses: actions/[email protected] | ||
# with: | ||
# path: ~/.cache/pip | ||
# key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements/*') }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-pip- | ||
|
||
# - uses: risuorg/[email protected] | ||
# env: | ||
# GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
# SOSREPORT: ./validations/test | ||
# CONFIGPATH: "./" | ||
# RUNFILE: "./validations/build.sh" | ||
# GH_PAGES_BRANCH: validation-results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"output": "website/validations/risu.json", "web": true, "exclude": ["risuclient"], "extraplugintree": "validations/", "title": "Deployment Validations"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
pre-commit | ||
risu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#!/bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
# Copyright (C) 2022 Pablo Iranzo Gómez <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
|
||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
|
||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
# long_name: Checks if agents (ACI) have finished | ||
# description: Checks agents cluster | ||
# priority: 900 | ||
# bugzilla: | ||
|
||
# Load common functions | ||
[[ -f "${RISU_BASE}/common-functions.sh" ]] && . "${RISU_BASE}/common-functions.sh" | ||
|
||
FILE="${KUBECONFIG}" | ||
is_mandatory_file ${FILE} | ||
|
||
is_required_command oc | ||
|
||
COUNT=$(oc get agents -A --no-headers | grep -v Done | wc -l) | ||
DETAIL=$(oc get agents -A --no-headers | grep -v Done) | ||
WHAT="Agents pending" | ||
|
||
if [ "${COUNT}" == 0 ]; then | ||
# Nothing found | ||
exit ${RC_OKAY} | ||
else | ||
echo -e "${WHAT} found:\n ${DETAIL}" >&2 | ||
exit ${RC_FAILED} | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
# Copyright (C) 2022 Pablo Iranzo Gómez <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
|
||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
|
||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
# long_name: Checks if managed cluster has been detached | ||
# description: Checks managed cluster | ||
# priority: 900 | ||
# bugzilla: | ||
|
||
# Load common functions | ||
[[ -f "${RISU_BASE}/common-functions.sh" ]] && . "${RISU_BASE}/common-functions.sh" | ||
|
||
FILE="${KUBECONFIG}" | ||
is_mandatory_file ${FILE} | ||
|
||
is_required_command oc | ||
|
||
COUNT=$(oc get managedcluster --no-headers | grep -v local-cluster | wc -l) | ||
DETAIL=$(oc get managedcluster --no-headers | grep -v local-cluster) | ||
WHAT="Undetached managedclusters" | ||
|
||
if [ "${COUNT}" == 0 ]; then | ||
# Nothing found | ||
exit ${RC_OKAY} | ||
else | ||
echo -e "${WHAT} found:\n ${DETAIL}" >&2 | ||
exit ${RC_FAILED} | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
# Copyright (C) 2022 Pablo Iranzo Gómez <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
|
||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
|
||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
# long_name: Checks if there are pending CSRs | ||
# description: Checks pending CSRs | ||
# priority: 900 | ||
# bugzilla: | ||
|
||
# Load common functions | ||
[[ -f "${RISU_BASE}/common-functions.sh" ]] && . "${RISU_BASE}/common-functions.sh" | ||
|
||
FILE="${KUBECONFIG}" | ||
is_mandatory_file ${FILE} | ||
|
||
is_required_command oc | ||
|
||
COUNT=$(oc get csr -A --no-headers | grep -v Approved | wc -l) | ||
DETAIL=$(oc get csr -A --no-headers | grep -v Approved) | ||
WHAT="Pending CSR" | ||
|
||
if [ "${COUNT}" == 0 ]; then | ||
# Nothing found | ||
exit ${RC_OKAY} | ||
else | ||
echo -e "${WHAT} found:\n ${DETAIL}" >&2 | ||
exit ${RC_FAILED} | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Author: Pablo Iranzo Gómez ([email protected]) | ||
|
||
# Copyright (C) 2020 Pablo Iranzo Gómez <[email protected]> | ||
# description: Checks ZTPFW Validations results | ||
# long_name: ZTPFW Validations | ||
# | ||
# Defines which plugins to include, exclude, etc | ||
# Syntax | ||
# +keyword : includes keyword in plugin search | ||
# -keyword : excludes keyword in plugin search | ||
|
||
+validations |
Empty file.
Empty file.