Commit cd354aac authored by Ivan Mazhukin's avatar Ivan Mazhukin

epm ci: fix commit error

parent 498b9963
......@@ -28,18 +28,34 @@ for app in $apps; do
echo " - export EGET_IPFS_FORCE_LOAD=1"
echo " - export EPM_IPFS_DB_UPDATE_SKIPPING=1"
echo " - export EGET_IPFS_API=/ip4/91.232.225.49/tcp/5001"
# 1) run the updater and DO NOT fail on its return code
echo " - set +e"
echo " - EPM=\$(pwd)/epm bash ../tests/update_versions.sh --ipfs --force --slow \"$app\""
echo " - update_exit_code=\$?"
echo " - set -e"
# 2) determine the package name and the path to the version file
echo " - |"
echo " PKG=\$(./epm play --package-name \"$app\")"
echo " VF=\"\$CI_PROJECT_DIR/epm-play-versions/\$PKG\""
echo " if [ ! -s \"\$VF\" ]; then"
echo " TMP=\$(mktemp)"
echo " if ./epm print version for package \"\$PKG\" >\"\$TMP\" 2>>\"\$CI_PROJECT_DIR/epm-errors/\$PKG\"; then"
echo " if [ -s \"\$TMP\" ]; then mv -f \"\$TMP\" \"\$VF\"; else rm -f \"\$TMP\"; fi"
echo " else"
echo " rm -f \"\$TMP\""
echo " fi"
echo " package_name=\$(./epm play --package-name \"$app\")"
echo " version_file_path=\"\$CI_PROJECT_DIR/epm-play-versions/\$package_name\""
# 3) if the version is missing — try to write it ourselves, ignore any errors
echo " - |"
echo " if [ ! -s \"\$version_file_path\" ]; then"
echo " tmp_file=\$(mktemp)"
echo " ./epm print version for package \"\$package_name\" >\"\$tmp_file\" 2>>\"\$CI_PROJECT_DIR/epm-errors/\$package_name\" || true"
echo " if [ -s \"\$tmp_file\" ]; then mv -f \"\$tmp_file\" \"\$version_file_path\"; else rm -f \"\$tmp_file\"; fi"
echo " fi"
# 4) final code: success is determined by the presence of the version file
echo " - |"
echo " if [ -s \"\$version_file_path\" ]; then"
echo " echo \"V Successful installation: version recorded in \$version_file_path\""
echo " final_exit_code=0"
echo " else"
echo " echo \"X Version not recorded. Installation or test error.\""
echo " final_exit_code=\$update_exit_code"
echo " fi"
# 5) explicitly finish the job with the required exit code
echo " - echo \"test rc: \$final_exit_code\""
echo " - exit \"\$final_exit_code\""
echo " artifacts:"
echo " when: always"
echo " expire_in: 2 days"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment