mirror of https://github.com/apache/lucene.git
SOLR-10912: updating copy of Jenkins precommit job script: proc max limit code seems not to work on jenkins slaves, so put it at a fixed 10k; added customization of artifact url so console output links in the JIRA comment report work properly; no longer attempting to cache the yetus download, since it always downloads every time anyway.
This commit is contained in:
parent
cc1ad49e72
commit
63fde153d3
|
@ -31,45 +31,26 @@
|
||||||
|
|
||||||
YETUSDIR=${WORKSPACE}/yetus
|
YETUSDIR=${WORKSPACE}/yetus
|
||||||
TESTPATCHBIN=${YETUSDIR}/precommit/test-patch.sh
|
TESTPATCHBIN=${YETUSDIR}/precommit/test-patch.sh
|
||||||
ARTIFACTS=${WORKSPACE}/out
|
ARTIFACTS_SUBDIR=out
|
||||||
|
ARTIFACTS=${WORKSPACE}/${ARTIFACTS_SUBDIR}
|
||||||
BASEDIR=${WORKSPACE}/sourcedir
|
BASEDIR=${WORKSPACE}/sourcedir
|
||||||
rm -rf "${ARTIFACTS}"
|
rm -rf "${ARTIFACTS}"
|
||||||
mkdir -p "${ARTIFACTS}"
|
mkdir -p "${ARTIFACTS}"
|
||||||
|
|
||||||
if [[ -d /sys/fs/cgroup/pids/user.slice ]]; then
|
PIDMAX=10000 # Arbitrary limit; may need to revisit
|
||||||
pids=$(cat /sys/fs/cgroup/pids/user.slice/user-910.slice/pids.max)
|
|
||||||
|
|
||||||
if [[ ${pids} -gt 13000 ]]; then
|
|
||||||
echo "passed: ${pids}"
|
|
||||||
PIDMAX=10000
|
|
||||||
else
|
|
||||||
echo "failed: ${pids}"
|
|
||||||
PIDMAX=5500
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
systemctl status $$ 2>/dev/null
|
|
||||||
echo "passed? no limit on trusty?"
|
|
||||||
PIDMAX=10000
|
|
||||||
fi
|
|
||||||
|
|
||||||
# One-time operation: download and expand Yetus source release
|
|
||||||
# TODO: when upgrading the Yetus release, remove the old tarball
|
|
||||||
YETUS_RELEASE=0.7.0
|
YETUS_RELEASE=0.7.0
|
||||||
YETUS_TARBALL="yetus-${YETUS_RELEASE}.tar.gz"
|
YETUS_TARBALL="yetus-${YETUS_RELEASE}.tar.gz"
|
||||||
if [[ ! -f "${YETUS_TARBALL}" || ! -d "$YETUSDIR}}" ]]; then
|
echo "Downloading Yetus ${YETUS_RELEASE}"
|
||||||
echo "Downloading Yetus ${YETUS_RELEASE}"
|
curl -L "https://api.github.com/repos/apache/yetus/tarball/rel/${YETUS_RELEASE}" -o "${YETUS_TARBALL}"
|
||||||
curl -L "https://api.github.com/repos/apache/yetus/tarball/rel/${YETUS_RELEASE}" -o "${YETUS_TARBALL}"
|
rm -rf "${YETUSDIR}"
|
||||||
if [[ -d "${YETUSDIR}" ]]; then
|
mkdir -p "${YETUSDIR}"
|
||||||
rm -rf "${YETUSDIR}"
|
gunzip -c "${YETUS_TARBALL}" | tar xpf - -C "${YETUSDIR}" --strip-components 1
|
||||||
mkdir -p "${YETUSDIR}"
|
|
||||||
fi
|
|
||||||
gunzip -c "${YETUS_TARBALL}" | tar xpf - -C "${YETUSDIR}" --strip-components 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
YETUS_ARGS+=("--project=LUCENE")
|
YETUS_ARGS+=("--project=LUCENE")
|
||||||
YETUS_ARGS+=("--basedir=${BASEDIR}")
|
YETUS_ARGS+=("--basedir=${BASEDIR}")
|
||||||
YETUS_ARGS+=("--patch-dir=${ARTIFACTS}")
|
YETUS_ARGS+=("--patch-dir=${ARTIFACTS}")
|
||||||
|
YETUS_ARGS+=("--build-url-artifacts=artifact/${ARTIFACTS_SUBDIR}")
|
||||||
YETUS_ARGS+=("--personality=${BASEDIR}/dev-tools/test-patch/lucene-solr-yetus-personality.sh")
|
YETUS_ARGS+=("--personality=${BASEDIR}/dev-tools/test-patch/lucene-solr-yetus-personality.sh")
|
||||||
YETUS_ARGS+=("--jira-user=lucenesolrqa")
|
YETUS_ARGS+=("--jira-user=lucenesolrqa")
|
||||||
YETUS_ARGS+=("--jira-password=$JIRA_PASSWORD")
|
YETUS_ARGS+=("--jira-password=$JIRA_PASSWORD")
|
||||||
|
@ -87,4 +68,4 @@ YETUS_ARGS+=("--contrib-guide=https://wiki.apache.org/lucene-java/HowToContribut
|
||||||
YETUS_ARGS+=("--jenkins")
|
YETUS_ARGS+=("--jenkins")
|
||||||
YETUS_ARGS+=("LUCENE-${ISSUE_NUM}")
|
YETUS_ARGS+=("LUCENE-${ISSUE_NUM}")
|
||||||
|
|
||||||
/bin/bash ${TESTPATCHBIN} "${YETUS_ARGS[@]}"
|
/bin/bash ${TESTPATCHBIN} "${YETUS_ARGS[@]}"
|
||||||
|
|
Loading…
Reference in New Issue