forked from OT-CONTAINER-KIT/redis-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Validate Test Yaml (OT-CONTAINER-KIT#854)
* ci: Validate Test Yaml Signed-off-by: Shubham Gupta <[email protected]> * test: fix yaml intendation Signed-off-by: Shubham Gupta <[email protected]> * test: fix yaml via yamlfix Signed-off-by: Shubham Gupta <[email protected]> * add line for fun Signed-off-by: Shubham Gupta <[email protected]> * feat: run yamlfix in parallel Signed-off-by: Shubham Gupta <[email protected]> * chore: fix script Signed-off-by: Shubham Gupta <[email protected]> * fix: use root Signed-off-by: Shubham Gupta <[email protected]> * fix: add yaml lint configuration Signed-off-by: Shubham Gupta <[email protected]> * fix: changes Signed-off-by: Shubham Gupta <[email protected]> * fix: config Signed-off-by: Shubham Gupta <[email protected]> * ci: chainsaw example Signed-off-by: Shubham Gupta <[email protected]> * fix: long lines Signed-off-by: Shubham Gupta <[email protected]> * test: example validation Signed-off-by: Shubham Gupta <[email protected]> * fix secrets Signed-off-by: Shubham Gupta <[email protected]> * chore: add comment Signed-off-by: Shubham Gupta <[email protected]> --------- Signed-off-by: Shubham Gupta <[email protected]> Signed-off-by: Matt Robinson <[email protected]>
- Loading branch information
1 parent
e10b2cb
commit 00205a4
Showing
164 changed files
with
2,376 additions
and
2,349 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
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,9 @@ | ||
extends: default | ||
|
||
rules: | ||
line-length: | ||
max: 200 | ||
level: warning | ||
allow-non-breakable-words: true | ||
allow-non-breakable-inline-mappings: true | ||
comments-indentation: disable |
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,29 @@ | ||
#!/bin/bash | ||
|
||
export YAMLFIX_LINE_LENGTH="150" | ||
|
||
# This script is used to fix the yaml files in the repository. | ||
# Note: yamlfix utility doesn't seems to be much mature idk but it is fixing the .crt .tls .ca extenstion present in testdata | ||
|
||
DIR="" | ||
|
||
if [ -n "$1" ]; then | ||
DIR="$1" | ||
fi | ||
|
||
if which yamlfix >/dev/null; then | ||
echo "yamlfix version is." "$(yamlfix --version)" | ||
else | ||
echo "yamlfix is not installed. Please install it using 'pip install yamlfix'" | ||
exit 0 | ||
fi | ||
|
||
|
||
# Since yamlfix is not able to search in a directory recursively | ||
# run in parallel so stdout is mixed up | ||
if [ -n "$DIR" ]; then | ||
echo "------------------------------" | ||
echo "Fixing all YAML files in the directory and its subdirectories: $DIR" | ||
find "$DIR" \( -name '*.yml' -o -name '*.yaml' \) -type f -print0 | xargs -0 -P 4 -I {} yamlfix "{}" | ||
echo "yamlfix has been applied to all YAML files in $DIR and its subdirectories." | ||
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
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,11 +1,12 @@ | ||
--- | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
name: kind | ||
nodes: | ||
- role: control-plane | ||
- role: worker | ||
- role: worker | ||
- role: worker | ||
- role: worker | ||
- role: worker | ||
- role: worker | ||
- role: control-plane | ||
- role: worker | ||
- role: worker | ||
- role: worker | ||
- role: worker | ||
- role: worker | ||
- role: worker |
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
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
Oops, something went wrong.