mirror of https://github.com/apache/cassandra
Remove sid source from debian, was only needed for jdk8
- Added debug in testing - Propagate the $DEBUG env from docker to test scripts - Be verbose when a pipeline errors that not all tests would have been run - add timeout to each cell stage (scripts on a node can hang and the only alternative was to abort the whole pipeline) patch by Mick Semb Wever; reviewed by Ekaterina Dimitrova, Brandon Williams for CASSANDRA-19708
This commit is contained in:
parent
f14f70bc72
commit
461b8c42d2
|
|
@ -41,8 +41,6 @@ RUN until apt-get update \
|
||||||
python3-pip rsync procps dh-python quilt bash-completion ; \
|
python3-pip rsync procps dh-python quilt bash-completion ; \
|
||||||
do echo "apt failed… trying again in 10s… " ; sleep 10 ; done
|
do echo "apt failed… trying again in 10s… " ; sleep 10 ; done
|
||||||
|
|
||||||
RUN echo 'deb http://deb.debian.org/debian sid main' >> /etc/apt/sources.list
|
|
||||||
|
|
||||||
RUN until apt-get update \
|
RUN until apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends openjdk-11-jdk openjdk-17-jdk ; \
|
&& apt-get install -y --no-install-recommends openjdk-11-jdk openjdk-17-jdk ; \
|
||||||
do echo "apt failed… trying again in 10s… " ; sleep 10 ; done
|
do echo "apt failed… trying again in 10s… " ; sleep 10 ; done
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,7 @@ fi
|
||||||
|
|
||||||
# the docker container's env
|
# the docker container's env
|
||||||
docker_envs="--env TEST_SCRIPT=${test_script} --env JAVA_VERSION=${java_version} --env PYTHON_VERSION=${python_version} --env cython=${cython} --env ANT_OPTS=\"${ANT_OPTS}\""
|
docker_envs="--env TEST_SCRIPT=${test_script} --env JAVA_VERSION=${java_version} --env PYTHON_VERSION=${python_version} --env cython=${cython} --env ANT_OPTS=\"${ANT_OPTS}\""
|
||||||
|
[ $DEBUG ] && docker_envs="${docker_envs} --env DEBUG=1"
|
||||||
|
|
||||||
split_str="0_0"
|
split_str="0_0"
|
||||||
if [[ "${split_chunk}" =~ ^[0-9]+/[0-9]+$ ]]; then
|
if [[ "${split_chunk}" =~ ^[0-9]+/[0-9]+$ ]]; then
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
#
|
#
|
||||||
################################
|
################################
|
||||||
|
|
||||||
|
[ $DEBUG ] && set -x
|
||||||
|
|
||||||
# help
|
# help
|
||||||
if [ "$#" -lt 1 ] || [ "$#" -gt 2 ] || [ "$1" == "-h" ]; then
|
if [ "$#" -lt 1 ] || [ "$#" -gt 2 ] || [ "$1" == "-h" ]; then
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@
|
||||||
# Wrapper script for running a split or regexp of tests (excluding python dtests)
|
# Wrapper script for running a split or regexp of tests (excluding python dtests)
|
||||||
#
|
#
|
||||||
|
|
||||||
|
[ $DEBUG ] && set -x
|
||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,9 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
|
failure {
|
||||||
|
echo "ERROR pipeline failed – not all tests were run"
|
||||||
|
}
|
||||||
always {
|
always {
|
||||||
sendNotifications()
|
sendNotifications()
|
||||||
}
|
}
|
||||||
|
|
@ -334,14 +337,16 @@ def build(command, cell) {
|
||||||
def logfile = "stage-logs/${JOB_NAME}_${BUILD_NUMBER}_${cell.step}${cell_suffix}_attempt${attempt}.log.xz"
|
def logfile = "stage-logs/${JOB_NAME}_${BUILD_NUMBER}_${cell.step}${cell_suffix}_attempt${attempt}.log.xz"
|
||||||
def script_vars = "#!/bin/bash \n set -o pipefail ; " // pipe to tee needs pipefail
|
def script_vars = "#!/bin/bash \n set -o pipefail ; " // pipe to tee needs pipefail
|
||||||
script_vars = "${script_vars} m2_dir=\'${WORKSPACE}/build/m2\'"
|
script_vars = "${script_vars} m2_dir=\'${WORKSPACE}/build/m2\'"
|
||||||
def status = sh label: "RUNNING ${cell.step}...", script: "${script_vars} ${build_script} ${cell.jdk} 2>&1 | tee >( xz -c > build/${logfile} )", returnStatus: true
|
timeout(time: 1, unit: 'HOURS') {
|
||||||
dir("build") {
|
def status = sh label: "RUNNING ${cell.step}...", script: "${script_vars} ${build_script} ${cell.jdk} 2>&1 | tee >( xz -c > build/${logfile} )", returnStatus: true
|
||||||
archiveArtifacts artifacts: "${logfile}", fingerprint: true
|
dir("build") {
|
||||||
copyToNightlies("${logfile}", "${cell.step}/jdk${cell.jdk}/${cell.arch}/")
|
archiveArtifacts artifacts: "${logfile}", fingerprint: true
|
||||||
}
|
copyToNightlies("${logfile}", "${cell.step}/jdk${cell.jdk}/${cell.arch}/")
|
||||||
if (0 != status) { error("Stage ${cell.step}${cell_suffix} failed with exit status ${status}") }
|
}
|
||||||
if ("jar" == cell.step) { // TODO only stash the project built files. all dependency libraries are restored from the local maven repo using `ant resolver-dist-lib`
|
if (0 != status) { error("Stage ${cell.step}${cell_suffix} failed with exit status ${status}") }
|
||||||
stash name: "${cell.arch}_${cell.jdk}"
|
if ("jar" == cell.step) {
|
||||||
|
stash name: "${cell.arch}_${cell.jdk}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dir("build") {
|
dir("build") {
|
||||||
copyToNightlies("${command.toCopy}", "${cell.step}/jdk${cell.jdk}/${cell.arch}/")
|
copyToNightlies("${command.toCopy}", "${cell.step}/jdk${cell.jdk}/${cell.arch}/")
|
||||||
|
|
@ -376,13 +381,15 @@ def test(command, cell) {
|
||||||
script_vars = "${script_vars} cython=\'${cell.cython}\'"
|
script_vars = "${script_vars} cython=\'${cell.cython}\'"
|
||||||
}
|
}
|
||||||
script_vars = fetchDTestsSource(command, script_vars)
|
script_vars = fetchDTestsSource(command, script_vars)
|
||||||
buildJVMDTestJars(cell, script_vars, logfile)
|
timeout(time: 1, unit: 'HOURS') { // best throughput with each cell at ~10 minutes
|
||||||
def status = sh label: "RUNNING TESTS ${cell.step}...", script: "${script_vars} .build/docker/run-tests.sh ${cell.step} '${cell.split}/${splits}' ${cell.jdk} 2>&1 | tee >( xz -c > build/${logfile} )", returnStatus: true
|
buildJVMDTestJars(cell, script_vars, logfile)
|
||||||
dir("build") {
|
def status = sh label: "RUNNING TESTS ${cell.step}...", script: "${script_vars} .build/docker/run-tests.sh ${cell.step} '${cell.split}/${splits}' ${cell.jdk} 2>&1 | tee >( xz -c > build/${logfile} )", returnStatus: true
|
||||||
archiveArtifacts artifacts: "${logfile}", fingerprint: true
|
dir("build") {
|
||||||
copyToNightlies("${logfile}", "${cell.step}/${cell.arch}/jdk${cell.jdk}/python${cell.python}/cython_${cell.cython}/" + "split_${cell.split}_${splits}".replace("/", "_"))
|
archiveArtifacts artifacts: "${logfile}", fingerprint: true
|
||||||
|
copyToNightlies("${logfile}", "${cell.step}/${cell.arch}/jdk${cell.jdk}/python${cell.python}/cython_${cell.cython}/" + "split_${cell.split}_${splits}".replace("/", "_"))
|
||||||
|
}
|
||||||
|
if (0 != status) { error("Stage ${cell.step}${cell_suffix} failed with exit status ${status}") }
|
||||||
}
|
}
|
||||||
if (0 != status) { error("Stage ${cell.step}${cell_suffix} failed with exit status ${status}") }
|
|
||||||
dir("build") {
|
dir("build") {
|
||||||
sh """
|
sh """
|
||||||
mkdir -p test/output/${cell.step}
|
mkdir -p test/output/${cell.step}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue