1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00

Clean output folders before the smoketest build and validate steps

This commit is contained in:
Aidan Reilly
2024-09-20 17:49:24 +01:00
committed by openshift-cherrypick-robot
parent 795b239a52
commit a693181def

View File

@@ -67,16 +67,22 @@ if [ $# -eq 0 ]; then
fi
if [[ "$TEST" == "--preview" || "$TEST" == "-p" ]] && [[ -z "$DISTRO" ]]; then
# Clean output folder
rm -rf ./_preview/
echo ""
echo "🚧 Building with openshift-enterprise distro..."
$CONTAINER_ENGINE run --rm -it -v "$(pwd)":${CONTAINER_WORKDIR}:Z $CONTAINER_IMAGE asciibinder build -d "$DISTRO"
elif [[ "$TEST" == "--preview" || "$TEST" == "-p" ]] && [[ -n "$DISTRO" ]]; then
# Clean output folder
rm -rf ./_preview/
echo ""
echo "🚧 Building $DISTRO distro..."
$CONTAINER_ENGINE run --rm -it -v "$(pwd)":${CONTAINER_WORKDIR}:Z $CONTAINER_IMAGE asciibinder build -d "$DISTRO"
elif [[ "$TEST" == "--validate" || "$TEST" == "-v" ]]; then
# Clean output folder
rm -rf ./drupal_build/
echo ""
echo "🚧 Validating the docs..."
$CONTAINER_ENGINE run --rm -it -v "$(pwd)":${CONTAINER_WORKDIR}:Z $CONTAINER_IMAGE sh -c 'scripts/check-asciidoctor-build.sh && python3 build_for_portal.py --distro '${DISTRO}' --product "'"${PRODUCT_NAME}"'" --version '${VERSION}' --no-upstream-fetch && python3 makeBuild.py'