forked from openshift/api
-
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.
Merge pull request openshift#1843 from deads2k/by-gate-32-require-pas…
…srate NO-JIRA: add command to restrict features from promotion without tests
- Loading branch information
Showing
26 changed files
with
6,715 additions
and
8 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,38 @@ | ||
#!/bin/bash | ||
|
||
source "$(dirname "${BASH_SOURCE}")/lib/init.sh" | ||
|
||
TMP_ROOT="${SCRIPT_ROOT}/_tmp" | ||
|
||
cleanup() { | ||
rm -rf "${TMP_ROOT}" | ||
} | ||
trap "cleanup" EXIT SIGINT | ||
|
||
cleanup | ||
|
||
mkdir -p ${TMP_ROOT}/previous-openshift-api/payload-manifests/featuregates | ||
|
||
# Use PULL_BASE_REF for CI, otherwise use master unless overridden. | ||
COMPARISON_BASE=${COMPARISON_BASE:-${PULL_BASE_SHA:-"master"}} | ||
echo "comparing against ${COMPARISON_BASE}" | ||
|
||
|
||
featureGateFiles=$(git show ${COMPARISON_BASE}:payload-manifests/featuregates | tail -n +3) | ||
|
||
while IFS= read -r featureGateFile; do | ||
echo "writing ${COMPARISON_BASE}:${featureGateFile} to temp" | ||
git show ${COMPARISON_BASE}:payload-manifests/featuregates/${featureGateFile} > ${TMP_ROOT}/previous-openshift-api/payload-manifests/featuregates/${featureGateFile} | ||
done <<< "${featureGateFiles}" | ||
|
||
# this appears to prevent the cleanup from doing anything | ||
# Use a trap so this gets printed at the end of the log even when we exit early due to an error/failure | ||
#trap 'echo This verifier checks changed feature gates have tests.' EXIT | ||
|
||
# Build codegen-crds when it's not present and not overridden for a specific file. | ||
if [ -z "${CODEGEN:-}" ];then | ||
${TOOLS_MAKE} codegen | ||
CODEGEN="${TOOLS_OUTPUT}/codegen" | ||
fi | ||
|
||
"${CODEGEN}" featuregate-test-analyzer |
Oops, something went wrong.