Browse Source

invoke processincoming with explicit changes file to avoid race conditions

Another job might place its files into the incoming directory at
the same time. If the *.changes file is present but not all its
referenced files are there yet this causes an error in the
reprepro call and therefore forcing the Jenkins job to fail.
merge-requests/109/head sipwise-2.4
Michael Prokop 11 years ago
parent
commit
16f98e527c
  1. 9
      scripts/build-and-provide-package

9
scripts/build-and-provide-package

@ -357,12 +357,11 @@ Cleanup: unused_files on_deny on_error
EOF
fi
${SUDO_CMD:-} reprepro -v -b "${REPOSITORY}" processincoming "${release}"
local old_dir=$(pwd)
cd "${REPOSITORY}/incoming/${release}"
${SUDO_CMD:-} reprepro -v -b "${REPOSITORY}" processincoming "${release}" "$(basename ${WORKSPACE}/binaries/*.changes)"
local RC=$?
echo "*** Gettind rid of *.tar.* and *.dsc files in incoming directory to avoid data leakage. ***"
rm -f ${REPOSITORY}/incoming/$release/*.tar.*
rm -f ${REPOSITORY}/incoming/$release/*.dsc
cd "$old_dir"
if [ $RC -ne 0 ] ; then
bailout 1 "Error: Failed to execute processincoming for release ${release}."

Loading…
Cancel
Save