Files
openproject/packaging/setup
Christophe Bliard 46e230b586 Retry downloads of bim dependencies in docker
Download failed in some CI builds for some reason [1], while it worked
for previous builds [2]. I would assume it's transient download errors.

Adding `--tries 3` to the wget commands to retry the downloads should
fix the issue.

Also replaced `--quiet` with `--no-verbose` to be terser than default
but still get error information when it fails.

[1] https://github.com/opf/openproject-flavours/actions/runs/17911001201 and https://github.com/opf/openproject-flavours/actions/runs/17910946720/job/50922134721
[2] https://github.com/opf/openproject-flavours/actions/runs/17910953231/job/50922155467
2025-09-22 12:04:30 +02:00

26 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Set RELEASE_DATE for the application
date -u +"%Y-%m-%dT%H:%M:%SZ" > RELEASE_DATE
# Copy default database.yml
cp -f config/database.production.yml config/database.yml
cp -f packaging/conf/configuration.yml config/configuration.yml
sed -i "s|config.public_file_server.enabled = false|config.public_file_server.enabled = true|" config/environments/production.rb
# Specific npmrc used for packaging
cp -f packaging/.npmrc .npmrc
# replace every occurrence of _APP_NAME_ with the corresponding application name we're packaging
find packaging/ -type f -print0 | xargs -0 sed -i "s|_APP_NAME_|${APP_NAME}|"
# Embed BIM dependencies for air-gapped use
mkdir -p vendor/bim
pushd vendor/bim
# These are referenced in /packaging/addons/openproject-edition/bin/preinstall
wget --quiet --tries 3 https://github.com/KhronosGroup/COLLADA2GLTF/releases/download/v2.1.5/COLLADA2GLTF-v2.1.5-linux.zip
wget --quiet --tries 3 https://s3.amazonaws.com/ifcopenshell-builds/IfcConvert-v0.7.11-fea8e3a-linux64.zip
wget --quiet --tries 3 https://github.com/bimspot/xeokit-metadata/releases/download/1.0.1/xeokit-metadata-linux-x64.tar.gz
popd