hooks: Temporarily disable demo generation in pre-push

The out-of-tree Podman patch needs to be rebased every second week or
so, and I'm currently trying to get that upstream:
  https://github.com/containers/podman/pull/16141

Disable demo generation for the moment, so that I avoid wasting time
with those rebases. We'll re-enable it later.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2022-10-26 06:56:25 +02:00
parent d472476caa
commit fb820ebb2e

View file

@ -21,13 +21,13 @@ BASE="/var/www/passt"
BUILDS="${BASE}/builds" BUILDS="${BASE}/builds"
LATEST="${BUILDS}/latest" LATEST="${BUILDS}/latest"
TEMP="${BUILDS}/temp" TEMP="${BUILDS}/temp"
AWAY="${BUILDS}/away"
WEB="${TEMP}/web" WEB="${TEMP}/web"
TEST="${TEMP}/test" TEST="${TEMP}/test"
ARCH="$(uname -m)" ARCH="$(uname -m)"
BIN="${TEMP}/${ARCH}" BIN="${TEMP}/${ARCH}"
OLD_BIN="${LATEST}/${ARCH}"
ssh "${USER_HOST}" "mkdir -p ${WEB} ${TEST} ${BIN}" ssh "${USER_HOST}" "mkdir -p ${WEB} ${TEST} ${BIN}"
@ -41,12 +41,15 @@ for f in test_logs/web/*.cast test_logs/web/*.js; do
scp "${f}.gz" "${USER_HOST}:${WEB}/" scp "${f}.gz" "${USER_HOST}:${WEB}/"
done done
# TODO: Re-enable demos once we have pasta support in upstream Podman
skip() {
./run_demo ./run_demo
for f in test_logs/web/*.cast test_logs/web/*.js; do for f in test_logs/web/*.cast test_logs/web/*.js; do
gzip -fk9 "${f}" gzip -fk9 "${f}"
scp "${f}" "${USER_HOST}:${WEB}/" scp "${f}" "${USER_HOST}:${WEB}/"
scp "${f}.gz" "${USER_HOST}:${WEB}/" scp "${f}.gz" "${USER_HOST}:${WEB}/"
done done
}
cd .. cd ..
@ -68,6 +71,10 @@ for pic in passt_overview pasta_overview; do
done done
scp doc/*.html "${USER_HOST}:${WEB}/" scp doc/*.html "${USER_HOST}:${WEB}/"
ssh "${USER_HOST}" "mv ${LATEST} ${AWAY}" ssh "${USER_HOST}" "cp ${WEB}/* ${LATEST}/web/"
ssh "${USER_HOST}" "mv ${TEMP} ${LATEST}" ssh "${USER_HOST}" "cp ${TEST}/* ${LATEST}/test/"
ssh "${USER_HOST}" "rm -rf ${AWAY}"
ssh "${USER_HOST}" "rm -f ${OLD_BIN}/*"
ssh "${USER_HOST}" "cp ${BIN}/* ${LATEST}/${ARCH}/"
ssh "${USER_HOST}" "rm -rf ${TEMP}"