aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-01-26 07:38:30 +0100
committerStefano Brivio <sbrivio@redhat.com>2022-01-26 16:30:59 +0100
commit1802871e9ef8516f7817046a27a7f2121ae2b0b1 (patch)
treecf8044fd37a3a573fe22835a68d68ecf0ca88d33
parentfb6fa99ca34716342b9135b4c7d53ac1c3cfcc8d (diff)
downloadpasst-1802871e9ef8516f7817046a27a7f2121ae2b0b1.tar
passt-1802871e9ef8516f7817046a27a7f2121ae2b0b1.tar.gz
passt-1802871e9ef8516f7817046a27a7f2121ae2b0b1.tar.bz2
passt-1802871e9ef8516f7817046a27a7f2121ae2b0b1.tar.lz
passt-1802871e9ef8516f7817046a27a7f2121ae2b0b1.tar.xz
passt-1802871e9ef8516f7817046a27a7f2121ae2b0b1.tar.zst
passt-1802871e9ef8516f7817046a27a7f2121ae2b0b1.zip
hooks/pre-push: Delete old versions, add -DGLIBC_NO_STATIC_NSS, disable legacy builds
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rwxr-xr-xhooks/pre-push18
1 files changed, 11 insertions, 7 deletions
diff --git a/hooks/pre-push b/hooks/pre-push
index fb86c0b..a5e4790 100755
--- a/hooks/pre-push
+++ b/hooks/pre-push
@@ -21,15 +21,15 @@ BASE="/var/www/passt"
BUILDS="${BASE}/builds"
LATEST="${BUILDS}/latest"
TEMP="${BUILDS}/temp"
+AWAY="${BUILDS}/away"
-WEB="${LATEST}/web"
-TEST="${LATEST}/test"
+WEB="${TEMP}/web"
+TEST="${TEMP}/test"
ARCH="$(uname -m)"
-BIN="${LATEST}/${ARCH}"
+BIN="${TEMP}/${ARCH}"
ssh "${USER_HOST}" "mkdir -p ${WEB} ${TEST} ${BIN}"
-ssh "${USER_HOST}" "cp -a ${LATEST} ${TEMP}"
cd test
@@ -50,7 +50,7 @@ ssh "${USER_HOST}" "rm -f ${BIN}/*.deb"
ssh "${USER_HOST}" "rm -f ${BIN}/*.rpm"
scp *.deb *.rpm "${USER_HOST}:${BIN}/"
-CFLAGS="-static" make avx2
+CFLAGS="-static -DGLIBC_NO_STATIC_NSS" make avx2
ssh "${USER_HOST}" "mkdir -p ${BIN}/avx2"
scp passt pasta qrap passt.1 pasta.1 qrap.1 "${USER_HOST}:${BIN}/avx2/"
@@ -59,6 +59,10 @@ ssh "${USER_HOST}" "rm -f ${BIN}/avx2/*.deb"
ssh "${USER_HOST}" "rm -f ${BIN}/avx2/*.rpm"
scp *.deb *.rpm "${USER_HOST}:${BIN}/avx2/"
+ssh "${USER_HOST}" "mv ${LATEST} ${AWAY}"
+ssh "${USER_HOST}" "mv ${TEMP} ${LATEST}"
+ssh "${USER_HOST}" "rm -rf ${AWAY}"
+
# Legacy, for KubeVirt tests
-CFLAGS="-DPASST_LEGACY_NO_OPTIONS -static" make avx2
-scp passt qrap "${USER_HOST}:${BUILDS}/static/"
+# CFLAGS="-DPASST_LEGACY_NO_OPTIONS -static" make avx2
+# scp passt qrap "${USER_HOST}:${BUILDS}/static/"