Better log of what is deployed.

This commit is contained in:
Matthieu Gautier 2020-04-09 18:50:58 +02:00
parent 3d08278a85
commit 62f48f2836
2 changed files with 24 additions and 9 deletions

View File

@ -111,6 +111,7 @@ def run_kiwix_build(target, platform,
print_message("Build {} (deps={}, release={}, dist={})",
target, build_deps_only, make_release, make_dist)
subprocess.check_call(command, cwd=str(HOME))
print_message("{}", list(BASE_DIR.glob("{}*/**/*.tar.xz".format(target))))
print_message("Build ended")
@ -134,7 +135,7 @@ def create_desktop_image():
if PLATFORM == 'flatpak':
build_path = BASE_DIR/'org.kiwix.desktop.flatpak'
app_name = 'org.kiwix.desktop.{}.flatpak'.format(postfix)
print_message("archive is ", build_path)
print_message("archive is {}", build_path)
else:
build_path = HOME/'Kiwix-{}-x86_64.AppImage'.format(postfix)
app_name = "kiwix-desktop_x86_64_{}.appimage".format(postfix)
@ -272,7 +273,7 @@ def update_flathub_git():
env['GIT_AUTHOR_EMAIL'] = env['GIT_COMMITTER_EMAIL'] = "kiwixbot@kymeria.fr"
def call(command, cwd=None):
cwd = cwd or GIT_REPO_DIR
print_message("call ", command)
print_message("call {}", command)
subprocess.check_call(command, env=env, cwd=str(cwd))
command = ['git', 'clone', FLATPAK_HTTP_GIT_REMOTE]
call(command, cwd=GIT_EXPORT_DIR)
@ -445,7 +446,7 @@ for target in TARGETS:
run_kiwix_build(target,
platform=PLATFORM,
make_release=make_release)
print_message("target is ", target)
print_message("target is {}", target)
if target == 'kiwix-desktop':
create_desktop_image()
if make_release and PLATFORM == 'native_dyn' and release_versions.get(target) == 0:
@ -478,7 +479,12 @@ if make_release and PLATFORM == 'native_dyn':
else:
in_file = BASE_DIR/full_target_name/'{}.tar.gz'.format(full_target_name)
if in_file.exists():
print_message("Copying {} to {}", in_file, out_dir/target)
shutil.copy(str(in_file), str(out_dir/target))
else:
print_message("No {} to copy.", in_file)
print_message("{}\n", list((BASE_DIR/full_target_name).iterdir()))
print_message("{}\n", list((BASE_DIR/full_target_name/'meson-dist').iterdir()))
elif PLATFORM == 'native_mixed':
make_archive('libzim', 'linux-x86_64')
elif PLATFORM == 'native_static':

View File

@ -13,10 +13,13 @@ BINTRAY_ARCHIVES_DIR=${EXPORT_DIR}/BINTRAY_ARCHIVES
if [[ "$TRAVIS_EVENT_TYPE" = "cron" ]]
then
scp -vrp -i ${SSH_KEY} -o StrictHostKeyChecking=no \
echo "Publishing nightlies"
ls ${NIGHTLY_KIWIX_ARCHIVES_DIR}
scp -rp -i ${SSH_KEY} -o StrictHostKeyChecking=no \
${NIGHTLY_KIWIX_ARCHIVES_DIR} \
ci@download.kiwix.org:/data/download/nightly
scp -vrp -i ${SSH_KEY} -o StrictHostKeyChecking=no \
ls ${NIGHTLY_ZIM_ARCHIVES_DIR}
scp -rp -i ${SSH_KEY} -o StrictHostKeyChecking=no \
${NIGHTLY_ZIM_ARCHIVES_DIR} \
ci@download.openzim.org:/data/openzim/nightly
@ -25,10 +28,11 @@ then
RELEASE_ARCHIVES=$(find $RELEASE_KIWIX_ARCHIVES_DIR -type f)
if [[ "x$RELEASE_ARCHIVES" != "x" ]]
then
echo "Publishing kiwix archives $RELEASE_ARCHIVES"
for archive in $RELEASE_ARCHIVES
do
subdir=$(basename $(dirname $archive))
scp -vrp -i ${SSH_KEY} -o StrictHostKeyChecking=no \
scp -rp -i ${SSH_KEY} -o StrictHostKeyChecking=no \
${archive} \
ci@download.kiwix.org:/data/download/release/${subdir}
done
@ -37,10 +41,11 @@ then
RELEASE_ARCHIVES=$(find $RELEASE_ZIM_ARCHIVES_DIR -type f)
if [[ "x$RELEASE_ARCHIVES" != "x" ]]
then
echo "Publishing zim archives $RELEASE_ARCHIVES"
for archive in $RELEASE_ARCHIVES
do
subdir=$(basename $(dirname $archive))
scp -vrp -i ${SSH_KEY} -o StrictHostKeyChecking=no \
scp -rp -i ${SSH_KEY} -o StrictHostKeyChecking=no \
${archive} \
ci@download.openzim.org:/data/openzim/release/${subdir}
done
@ -49,10 +54,11 @@ then
DIST_KIWIX_ARCHIVES=$(find $DIST_KIWIX_ARCHIVES_DIR -type f)
if [[ "x$DIST_KIWIX_ARCHIVES" != "x" ]]
then
echo "Publishing dist kiwix archives $DIST_KIWIX_ARCHIVES"
for archive in $DIST_KIWIX_ARCHIVES
do
subdir=$(basename $(dirname $archive))
scp -vrp -i ${SSH_KEY} -o StrictHostKeyChecking=no \
scp -rp -i ${SSH_KEY} -o StrictHostKeyChecking=no \
${archive} \
ci@download.kiwix.org:/data/download/release/${subdir}
done
@ -61,10 +67,11 @@ then
DIST_ZIM_ARCHIVES=$(find $DIST_ZIM_ARCHIVES_DIR -type f)
if [[ "x$DIST_ZIM_ARCHIVES" != "x" ]]
then
echo "Publishing dist zim archives $DIST_ZIM_ARCHIVES"
for archive in $DIST_ZIM_ARCHIVES
do
subdir=$(basename $(dirname $archive))
scp -vrp -i ${SSH_KEY} -o StrictHostKeyChecking=no \
scp -rp -i ${SSH_KEY} -o StrictHostKeyChecking=no \
${archive} \
ci@download.openzim.org:/data/openzim/release/${subdir}
done
@ -74,6 +81,7 @@ then
GIT_REPOS=$(ls -l | awk '/^d/ { print $9 }')
if [[ "x$GIT_REPOS" != "x" ]]
then
echo "Pushing repositories $GIT_REPOS"
for repo in $GIT_REPOS
do
(cd $repo;
@ -87,6 +95,7 @@ then
BINTRAY_ARCHIVES=$(find $BINTRAY_ARCHIVES_DIR -name "*_bintray_info.json" -type f)
if [[ "x$BINTRAY_ARCHIVES" != "x" ]]
then
echo "Publish bintray $BINTRAY_ARCHIVES"
for archive_info in $BINTRAY_ARCHIVES
do
${TRAVIS_BUILD_DIR}/scripts/upload_kiwix_lib_android_to_bintray.py $archive_info