2021-10-06 14:06:37 +02:00
|
|
|
#!/bin/sh -e
|
|
|
|
#
|
passt: Relicense to GPL 2.0, or any later version
In practical terms, passt doesn't benefit from the additional
protection offered by the AGPL over the GPL, because it's not
suitable to be executed over a computer network.
Further, restricting the distribution under the version 3 of the GPL
wouldn't provide any practical advantage either, as long as the passt
codebase is concerned, and might cause unnecessary compatibility
dilemmas.
Change licensing terms to the GNU General Public License Version 2,
or any later version, with written permission from all current and
past contributors, namely: myself, David Gibson, Laine Stump, Andrea
Bolognani, Paul Holzinger, Richard W.M. Jones, Chris Kuhn, Florian
Weimer, Giuseppe Scrivano, Stefan Hajnoczi, and Vasiliy Ulyanov.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2023-04-05 20:11:44 +02:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2021-10-06 14:06:37 +02:00
|
|
|
#
|
|
|
|
# PASST - Plug A Simple Socket Transport
|
|
|
|
# for qemu/UNIX domain socket mode
|
|
|
|
#
|
|
|
|
# PASTA - Pack A Subtle Tap Abstraction
|
|
|
|
# for network namespace/tap device mode
|
|
|
|
#
|
|
|
|
# hooks/pre-push - Run CI. On success, run demos, build, and copy all contents
|
|
|
|
#
|
|
|
|
# Copyright (c) 2021 Red Hat GmbH
|
|
|
|
# Author: Stefano Brivio <sbrivio@redhat.com>
|
|
|
|
#
|
|
|
|
# cp hooks/pre-push .git/hooks/pre-push
|
|
|
|
|
|
|
|
USER_HOST="passt.top"
|
|
|
|
BASE="/var/www/passt"
|
|
|
|
|
|
|
|
BUILDS="${BASE}/builds"
|
|
|
|
LATEST="${BUILDS}/latest"
|
|
|
|
TEMP="${BUILDS}/temp"
|
|
|
|
|
2022-01-26 07:38:30 +01:00
|
|
|
WEB="${TEMP}/web"
|
|
|
|
TEST="${TEMP}/test"
|
2021-10-06 14:06:37 +02:00
|
|
|
|
|
|
|
ARCH="$(uname -m)"
|
2022-01-26 07:38:30 +01:00
|
|
|
BIN="${TEMP}/${ARCH}"
|
2022-10-26 06:56:25 +02:00
|
|
|
OLD_BIN="${LATEST}/${ARCH}"
|
2021-10-06 14:06:37 +02:00
|
|
|
|
|
|
|
ssh "${USER_HOST}" "mkdir -p ${WEB} ${TEST} ${BIN}"
|
|
|
|
|
|
|
|
cd test
|
|
|
|
|
|
|
|
./ci
|
2022-09-24 00:01:39 +02:00
|
|
|
scp test_logs/*.log "${USER_HOST}:${TEST}/"
|
|
|
|
for f in test_logs/web/*.cast test_logs/web/*.js; do
|
|
|
|
gzip -fk9 "${f}"
|
|
|
|
scp "${f}" "${USER_HOST}:${WEB}/"
|
|
|
|
scp "${f}.gz" "${USER_HOST}:${WEB}/"
|
|
|
|
done
|
2022-02-23 13:28:26 +01:00
|
|
|
|
2022-10-26 06:56:25 +02:00
|
|
|
# TODO: Re-enable demos once we have pasta support in upstream Podman
|
|
|
|
skip() {
|
2022-09-24 00:01:39 +02:00
|
|
|
./run_demo
|
2022-09-13 06:35:28 +02:00
|
|
|
for f in test_logs/web/*.cast test_logs/web/*.js; do
|
|
|
|
gzip -fk9 "${f}"
|
|
|
|
scp "${f}" "${USER_HOST}:${WEB}/"
|
|
|
|
scp "${f}.gz" "${USER_HOST}:${WEB}/"
|
2022-02-23 13:28:26 +01:00
|
|
|
done
|
2022-10-26 06:56:25 +02:00
|
|
|
}
|
2021-10-06 14:06:37 +02:00
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
make pkgs
|
2022-03-01 21:41:22 +01:00
|
|
|
scp passt passt.avx2 passt.1 qrap qrap.1 "${USER_HOST}:${BIN}"
|
|
|
|
scp pasta pasta.avx2 pasta.1 "${USER_HOST}:${BIN}"
|
|
|
|
|
2021-10-06 14:06:37 +02:00
|
|
|
ssh "${USER_HOST}" "rm -f ${BIN}/*.deb"
|
|
|
|
ssh "${USER_HOST}" "rm -f ${BIN}/*.rpm"
|
|
|
|
scp *.deb *.rpm "${USER_HOST}:${BIN}/"
|
|
|
|
|
2022-03-01 21:41:22 +01:00
|
|
|
man2html -M "/" passt.1 > passt.1.html
|
|
|
|
scp passt.1.html "${USER_HOST}:${WEB}/"
|
|
|
|
|
2022-03-02 13:17:14 +01:00
|
|
|
for pic in passt_overview pasta_overview; do
|
|
|
|
cwebp -preset drawing -q 10 "doc/${pic}.png" -o "doc/${pic}.webp"
|
|
|
|
scp "doc/${pic}.png" "doc/${pic}.png" "${USER_HOST}:${WEB}/"
|
2022-03-30 14:34:16 +02:00
|
|
|
scp "doc/${pic}.webp" "doc/${pic}.webp" "${USER_HOST}:${WEB}/"
|
2022-03-02 13:17:14 +01:00
|
|
|
done
|
2022-03-04 16:34:52 +01:00
|
|
|
scp doc/*.html "${USER_HOST}:${WEB}/"
|
2022-03-02 13:17:14 +01:00
|
|
|
|
2022-10-26 06:56:25 +02:00
|
|
|
ssh "${USER_HOST}" "cp ${WEB}/* ${LATEST}/web/"
|
|
|
|
ssh "${USER_HOST}" "cp ${TEST}/* ${LATEST}/test/"
|
|
|
|
|
|
|
|
ssh "${USER_HOST}" "rm -f ${OLD_BIN}/*"
|
|
|
|
ssh "${USER_HOST}" "cp ${BIN}/* ${LATEST}/${ARCH}/"
|
|
|
|
|
|
|
|
ssh "${USER_HOST}" "rm -rf ${TEMP}"
|