airshipit / airshipctl

A CLI for managing declarative infrastructure.
Apache License 2.0
43 stars 49 forks source link

validate_docs script should not substitute $SITE env variable #649

Closed raliev12 closed 2 years ago

raliev12 commented 2 years ago

Describe the bug ./tools/validate_docs script is used to validate multiple sites against kubeval KRM validator. We also use black list of sites that we don't want to validate as well as substituted $SITE variable to point which particular site we want to validate. These two approaches can't live simultaneously since we have to choose either from list of sites that don't want to validate or site that we want to validate to avoid collisions and maintain consistency. Since we use $SITE variable across multiple deployment scripts to configure CI jobs to perform deployment of particular site, the validate_docs script should not use this variable since it gets available site names automatically and then filters sites that we don't want to validate. If we want to validate one specific site despite black list - the name of site should be passed as argument.

Steps To Reproduce ./tools/validate_docs script currently performs validation only for test-site if $SITE variable set (that's default behavior) but it should perform it against all sites listed in manifests/sites unless they are filtered.

Expected behavior All sites if they are not skipped should be validated. Proposed solution - https://review.opendev.org/c/airship/airshipctl/+/812003