This is an automated email from the ASF dual-hosted git repository. mck pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra-builds.git
The following commit(s) were added to refs/heads/trunk by this push: new 2049e85 Update jenkins groovy dsl, and release scripts, to use in-tree scripts from CASSANDRA-18133 2049e85 is described below commit 2049e854f5aec3dac39c45a29f4368db82b72cfb Author: Mick Semb Wever <m...@apache.org> AuthorDate: Mon Dec 5 15:13:02 2022 +0100 Update jenkins groovy dsl, and release scripts, to use in-tree scripts from CASSANDRA-18133 patch by Mick Semb Wever; reviewed byJosh McKenzie, Maxim Muzafarov for CASSANDRA-18665 --- build-scripts/cassandra-artifacts.sh | 3 + build-scripts/cassandra-dtest-pytest.sh | 10 +- build-scripts/cassandra-test.sh | 14 +- cassandra-release/finish_release.sh | 4 +- cassandra-release/prepare_release.sh | 52 ++- docker/build-debs.sh | 4 +- docker/build-rpms.sh | 3 + jenkins-dsl/cassandra_email_presend.groovy | 2 + jenkins-dsl/cassandra_job_dsl_seed.groovy | 650 +++++++++++++++++++++++++++-- jenkins-dsl/print-shas.sh | 1 + 10 files changed, 678 insertions(+), 65 deletions(-) diff --git a/build-scripts/cassandra-artifacts.sh b/build-scripts/cassandra-artifacts.sh index e1a71f2..4e736d6 100755 --- a/build-scripts/cassandra-artifacts.sh +++ b/build-scripts/cassandra-artifacts.sh @@ -18,7 +18,10 @@ command -v docker >/dev/null 2>&1 || { echo >&2 "docker needs to be installed"; [ -f "build.xml" ] || { echo >&2 "build.xml must exist"; exit 1; } [ -d "${cassandra_builds_dir}" ] || { echo >&2 "cassandra-builds directory must exist"; exit 1; } +# This script is deprecated, having been migrated to be in-tree since 5.0 cassandra_version="$(grep 'property\s*name=\"base.version\"' build.xml |sed -ne 's/.*value=\"\([^"]*\)\".*/\1/p')" +cassandra_regx_supported_versions="^(2.2|3.0|3.11|4.0|4.1)(.[0-9]+)?$" +[[ $cassandra_version =~ $cassandra_regx_supported_versions ]] || { echo "Cassandra ${cassandra_version} not supported. (This script is in-tree since 5.0)"; exit 1; } # print debug information on versions ant -version diff --git a/build-scripts/cassandra-dtest-pytest.sh b/build-scripts/cassandra-dtest-pytest.sh index 6dd60f1..208b14a 100755 --- a/build-scripts/cassandra-dtest-pytest.sh +++ b/build-scripts/cassandra-dtest-pytest.sh @@ -31,6 +31,12 @@ command -v virtualenv >/dev/null 2>&1 || { echo >&2 "virtualenv needs to be inst java_version=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}' | awk -F. '{print $1}') version=$(grep 'property\s*name=\"base.version\"' build.xml |sed -ne 's/.*value=\"\([^"]*\)\".*/\1/p') +regx_version="(2.2|3.0|3.11|4.0|4.1)(.([0-9]+))?$" + +if [[ $version =~ $regx_version ]] ; then + echo "This script is deprecated, having been migrated to be in-tree since 5.0, see .build/run-python-dtests.sh" + exit 1 +fi if [ "$java_version" -ge 17 ]; then if [[ "${target}" == "dtest-upgrade" ]] ; then @@ -39,13 +45,9 @@ if [ "$java_version" -ge 17 ]; then fi elif [ "$java_version" -ge 11 ]; then export CASSANDRA_USE_JDK11=true - regx_version="(2.2|3.0|3.11|4.0|4.1)(.([0-9]+))?$" if ! grep -q "CASSANDRA_USE_JDK11" build.xml ; then echo "Skipping ${target}. JDK11 not supported against ${version}" exit 0 - elif [[ "${target}" == "dtest-upgrade" ]] && [[ $version =~ $regx_version ]] ; then - echo "Skipping JDK11 execution. Only the oldest overlapping supported JDK can be used when upgrading." - exit 0 fi fi diff --git a/build-scripts/cassandra-test.sh b/build-scripts/cassandra-test.sh index b67884d..e623cc3 100755 --- a/build-scripts/cassandra-test.sh +++ b/build-scripts/cassandra-test.sh @@ -88,6 +88,11 @@ _main() { local -r version=$(grep 'property\s*name=\"base.version\"' build.xml |sed -ne 's/.*value=\"\([^"]*\)\".*/\1/p') local -r regx_version="(2.2|3.0|3.11|4.0|4.1)(.([0-9]+))?$" + if [[ $version =~ $regx_version ]] ; then + echo "This script is deprecated, having been migrated to be in-tree since 5.0, see .build/run-tests.sh" + exit 1 + fi + if [ "$java_version" -ge 17 ]; then if [[ "${target}" == "jvm-dtest-upgrade" ]] ; then echo "Invalid JDK17 execution. Only the oldest overlapping supported JDK can be used when upgrading." @@ -98,9 +103,6 @@ _main() { if ! grep -q "CASSANDRA_USE_JDK11" build.xml ; then echo "Skipping ${target}. JDK11 not supported against ${version}" exit 0 - elif [[ "${target}" == "jvm-dtest-upgrade" ]] && [[ $version =~ $regx_version ]] ; then - echo "Skipping JDK11 execution. Only the oldest overlapping supported JDK can be used when upgrading." - exit 0 fi fi @@ -172,12 +174,6 @@ _main() { ant testclasslist -Dtest.classlistprefix=distributed -Dtest.timeout=$(_timeout_for "test.distributed.timeout") -Dtest.classlistfile=<(echo "${testlist}") -Dtmp.dir="${TMP_DIR}" || echo "failed $target" ;; "cqlsh-test") - - if ! [[ $version =~ $regx_version ]] ; then - # CASSANDRA-18133 – 5.0+ no longer does `ant jar` in cassandra-cqlsh-tests.sh - ant jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true - fi - ./pylib/cassandra-cqlsh-tests.sh $(pwd) ;; *) diff --git a/cassandra-release/finish_release.sh b/cassandra-release/finish_release.sh index 94ebf55..407cc91 100755 --- a/cassandra-release/finish_release.sh +++ b/cassandra-release/finish_release.sh @@ -24,7 +24,7 @@ command -v git >/dev/null 2>&1 || { echo >&2 "git needs to be installed"; exit 1 ################### -asf_git_repo="https://gitbox.apache.org/repos/asf" +asf_git_repo="g...@github.com:apache/cassandra.git" # Reset getopts in case it has been used previously in the shell. OPTIND=1 @@ -279,5 +279,5 @@ echo ' 8) tweet from @cassandra' echo ' 9) release version in JIRA' echo ' 10) remove old version (eg: `svn rm https://dist.apache.org/repos/dist/release/cassandra/<previous_version>`)' echo ' 11) increment build.xml base.version for the next release' -echo ' 12) follow instructions in email you will receive from the \"Apache Reporter Service\" to update the project`s list of releases in reporter.apache.org' +echo ' 12) Add release in https://reporter.apache.org/addrelease.html?cassandra (same as instructions in email you will receive from the \"Apache Reporter Service\")' echo ' 13) update current_ version in cassandra-dtest/upgrade_tests/upgrade_manifest.py' diff --git a/cassandra-release/prepare_release.sh b/cassandra-release/prepare_release.sh index 45b3eef..a9e6ceb 100755 --- a/cassandra-release/prepare_release.sh +++ b/cassandra-release/prepare_release.sh @@ -245,7 +245,7 @@ then execute "cd cassandra" execute "git checkout $release-tentative" execute "ant realclean" - execute "ant publish -Drelease=true -Dbase.version=$release" + execute "ant publish -Drelease=true -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true" echo "Artifacts uploaded, find the staging repository on repository.apache.org, \"Close\" it, and indicate its staging number:" 1>&3 2>&4 read -p "staging number? " staging_number 1>&3 2>&4 @@ -279,16 +279,23 @@ then execute "cd $deb_dir" echo "Building debian package ..." 1>&3 2>&4 + execute "mkdir ${tmp_dir}/cassandra-dist-dev/${release}/debian" - execute "${cassandra_builds_dir}/build-scripts/cassandra-deb-packaging.sh ${release}-tentative" + if [ -f ${tmp_dir}/cassandra/.build/docker/build-debian.sh ] ; then + execute "cd ${tmp_dir}/cassandra" + execute "ant realclean" + execute ".build/docker/build-debian.sh" + execute "cp build/cassandra* ${tmp_dir}/cassandra-dist-dev/${release}/debian/" + else + execute "${cassandra_builds_dir}/build-scripts/cassandra-deb-packaging.sh ${release}-tentative" + execute "cp cassandra* ${tmp_dir}/cassandra-dist-dev/${release}/debian/" + fi + execute "cd ${tmp_dir}/cassandra-dist-dev/${release}/debian/" # Debsign might ask the passphrase on stdin so don't hide what he says even if no verbose # (I haven't tested carefully but I've also seen it fail unexpectedly with it's output redirected. execute "debsign -k$gpg_key cassandra_${deb_release}_amd64.changes" 1>&3 2>&4 - execute "mkdir $tmp_dir/cassandra-dist-dev/${release}/debian" - execute "cp cassandra* $tmp_dir/cassandra-dist-dev/${release}/debian/" - echo "Building debian repository ..." 1>&3 2>&4 debian_series="${release_major}${release_minor}x" @@ -300,7 +307,6 @@ then echo "Description: Apache Cassandra APT Repository" >> $tmp_dir/distributions echo "SignWith: $gpg_key" >> $tmp_dir/distributions - execute "cd $tmp_dir/cassandra-dist-dev/${release}/debian/" execute "mkdir conf" execute "mv $tmp_dir/distributions conf/" execute "reprepro --ignore=wrongdistribution include $debian_series cassandra_${deb_release}_*.changes" @@ -326,21 +332,28 @@ then execute "cd $rpm_package_dir" echo "Building redhat packages ..." 1>&3 2>&4 + execute "mkdir $tmp_dir/cassandra-dist-dev/${release}/redhat" [ $fake_mode -eq 1 ] && echo ">> declare -x rpm_dir=$rpm_package_dir/cassandra_${release}_rpm" declare -x rpm_dir=$rpm_package_dir/cassandra_${release}_rpm [ ! -e "$rpm_dir" ] || rm -rf $rpm_dir execute "mkdir $rpm_dir" - execute "${cassandra_builds_dir}/build-scripts/cassandra-rpm-packaging.sh ${release}-tentative 8 rpm" + if [ -f ${tmp_dir}/cassandra/.build/docker/build-redhat.sh ] ; then + execute "cd ${tmp_dir}/cassandra" + execute "ant realclean" + execute ".build/docker/build-redhat.sh rpm" + execute "cp build/*.rpm ${tmp_dir}/cassandra-dist-dev/${release}/redhat/" + else + execute "${cassandra_builds_dir}/build-scripts/cassandra-rpm-packaging.sh ${release}-tentative 8 rpm" + execute "cp ${rpm_dir}/*.rpm ${tmp_dir}/cassandra-dist-dev/${release}/redhat/" + fi - execute "rpmsign --addsign ${rpm_dir}/*.rpm" + execute "cd ${tmp_dir}/cassandra-dist-dev/${release}/redhat/" + execute "rpmsign --addsign *.rpm" # build repositories echo "Building redhat repository ..." 1>&3 2>&4 - execute "mkdir $tmp_dir/cassandra-dist-dev/${release}/redhat" - execute "cp ${rpm_dir}/*.rpm $tmp_dir/cassandra-dist-dev/${release}/redhat/" - execute "cd $tmp_dir/cassandra-dist-dev/${release}/redhat/" execute "createrepo_c ." # FIXME - put into execute "…" [ $fake_mode -eq 1 ] || for f in repodata/repomd.xml repodata/*.bz2 repodata/*.gz ; do gpg --detach-sign --armor $f ; done @@ -354,21 +367,28 @@ then execute "cd $rpmnoboolean_package_dir" echo "Building redhat noboolean packages ..." 1>&3 2>&4 + execute "mkdir ${tmp_dir}/cassandra-dist-dev/${release}/redhat/noboolean" [ $fake_mode -eq 1 ] && echo ">> declare -x rpm_dir=$rpmnoboolean_package_dir/cassandra_${release}_rpmnoboolean" declare -x rpm_dir=$rpmnoboolean_package_dir/cassandra_${release}_rpmnoboolean [ ! -e "$rpm_dir" ] || rm -rf $rpm_dir execute "mkdir $rpm_dir" - execute "${cassandra_builds_dir}/build-scripts/cassandra-rpm-packaging.sh ${release}-tentative 8 noboolean" + if [ -f ${tmp_dir}/cassandra/.build/docker/build-redhat.sh ] ; then + execute "cd ${tmp_dir}/cassandra" + execute "ant realclean" + execute ".build/docker/build-redhat.sh noboolean" + execute "cp build/*.rpm ${tmp_dir}/cassandra-dist-dev/${release}/redhat/noboolean/" + else + execute "${cassandra_builds_dir}/build-scripts/cassandra-rpm-packaging.sh ${release}-tentative 8 noboolean" + execute "cp ${rpm_dir}/*.rpm ${tmp_dir}/cassandra-dist-dev/${release}/redhat/noboolean/" + fi - execute "rpmsign --addsign ${rpm_dir}/*.rpm" + execute "cd ${tmp_dir}/cassandra-dist-dev/${release}/redhat/noboolean" + execute "rpmsign --addsign *.rpm" # build repositories echo "Building redhat noboolean repository ..." 1>&3 2>&4 - execute "mkdir $tmp_dir/cassandra-dist-dev/${release}/redhat/noboolean" - execute "cp ${rpm_dir}/*.rpm $tmp_dir/cassandra-dist-dev/${release}/redhat/noboolean" - execute "cd $tmp_dir/cassandra-dist-dev/${release}/redhat/noboolean" execute "createrepo_c ." # FIXME - put into execute "…" [ $fake_mode -eq 1 ] || for f in repodata/repomd.xml repodata/*.bz2 repodata/*.gz ; do gpg --detach-sign --armor $f ; done diff --git a/docker/build-debs.sh b/docker/build-debs.sh index a438050..c963b4d 100755 --- a/docker/build-debs.sh +++ b/docker/build-debs.sh @@ -13,8 +13,10 @@ fi [ "x${CASSANDRA_DIR}" != "x" ] || { echo >&2 "CASSANDRA_DIR needs to be defined"; exit 1; } [ -d "${CASSANDRA_DIR}" ] || { echo >&2 "Directory ${CASSANDRA_DIR} must exist"; exit 1; } +# This script is deprecated, having been migrated to be in-tree since 5.0, see .build/docker/_build-debian.sh cassandra_version="$(grep 'property\s*name=\"base.version\"' \"${CASSANDRA_DIR}/build.xml\" |sed -ne 's/.*value=\"\([^"]*\)\".*/\1/p')" - +cassandra_regx_supported_versions="^(2.2|3.0|3.11|4.0|4.1)(.[0-9]+)?$" +[[ $cassandra_version =~ $cassandra_regx_supported_versions ]] || { echo "Cassandra ${cassandra_version} not supported. (This script is in-tree since 5.0)"; exit 1; } CASSANDRA_SHA=$1 JAVA_VERSION=$2 diff --git a/docker/build-rpms.sh b/docker/build-rpms.sh index 55b600b..ec6520e 100755 --- a/docker/build-rpms.sh +++ b/docker/build-rpms.sh @@ -15,7 +15,10 @@ fi [ "x${CASSANDRA_DIR}" != "x" ] || { echo >&2 "CASSANDRA_DIR needs to be defined"; exit 1; } [ -d "${CASSANDRA_DIR}" ] || { echo >&2 "Directory ${CASSANDRA_DIR} must exist"; exit 1; } +# This script is deprecated, having been migrated to be in-tree since 5.0, see .build/docker/_build-redhat.sh cassandra_version="$(grep 'property\s*name=\"base.version\"' \"${CASSANDRA_DIR}/build.xml\" |sed -ne 's/.*value=\"\([^"]*\)\".*/\1/p')" +cassandra_regx_supported_versions="^(2.2|3.0|3.11|4.0|4.1)(.[0-9]+)?$" +[[ $cassandra_version =~ $cassandra_regx_supported_versions ]] || { echo "Cassandra ${cassandra_version} not supported. (This script is in-tree since 5.0)"; exit 1; } CASSANDRA_SHA=$1 JAVA_VERSION=$2 diff --git a/jenkins-dsl/cassandra_email_presend.groovy b/jenkins-dsl/cassandra_email_presend.groovy index ffd8f8e..07c0a56 100644 --- a/jenkins-dsl/cassandra_email_presend.groovy +++ b/jenkins-dsl/cassandra_email_presend.groovy @@ -1,4 +1,6 @@ // This will fail first two times in Jenkins, first the script and then the removeHeader method needs to be approved. // Navigate to jenkins > Manage jenkins > In-process Script Approval +// +// Deprecated from 5.0 (post CASSANDRA-18594) msg.removeHeader("In-Reply-To") msg.removeHeader("References") diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy b/jenkins-dsl/cassandra_job_dsl_seed.groovy index 1043020..9f10409 100755 --- a/jenkins-dsl/cassandra_job_dsl_seed.groovy +++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy @@ -30,11 +30,8 @@ slaveArm64Label = 'cassandra-arm64' slaveArm64DtestLabel = 'cassandra-arm64-dtest' slaveArm64DtestLargeLabel = 'cassandra-arm64-dtest-large' def mainRepo = "https://github.com/apache/cassandra.git" -def githubRepo = "https://github.com/apache/cassandra" if(binding.hasVariable("CASSANDRA_GIT_URL")) { mainRepo = "${CASSANDRA_GIT_URL}" - // just presume custom repos are github, not critical if they are not - githubRepo = "${mainRepo}".minus(".git") } def buildsRepo = "https://github.com/apache/cassandra-builds.git" if(binding.hasVariable("CASSANDRA_BUILDS_GIT_URL")) { @@ -48,9 +45,13 @@ def dtestRepo = "https://github.com/apache/cassandra-dtest.git" if(binding.hasVariable("CASSANDRA_DTEST_GIT_URL")) { dtestRepo = "${CASSANDRA_DTEST_GIT_URL}" } +def dtestBranch = "trunk" +if(binding.hasVariable("CASSANDRA_DTEST_GIT_BRANCH")) { + dtestRepo = "${CASSANDRA_DTEST_GIT_BRANCH}" +} def buildDescStr = 'REF = ${GIT_BRANCH} <br /> COMMIT = ${GIT_COMMIT}' // Cassandra active branches -def cassandraBranches = ['cassandra-2.2', 'cassandra-3.0', 'cassandra-3.11', 'cassandra-4.0', 'cassandra-4.1', 'cassandra-5.0', 'trunk'] +def cassandraBranches = ['cassandra-2.2', 'cassandra-3.0', 'cassandra-3.11', 'cassandra-4.0', 'cassandra-4.1'] if(binding.hasVariable("CASSANDRA_BRANCHES")) { cassandraBranches = "${CASSANDRA_BRANCHES}".split(",") } @@ -59,6 +60,7 @@ def testTargets = ['test', 'test-burn', 'test-cdc', 'test-compression', 'stress- if(binding.hasVariable("CASSANDRA_ANT_TEST_TARGETS")) { testTargets = "${CASSANDRA_ANT_TEST_TARGETS}".split(",") } + def testDockerImage = 'apache/cassandra-testing-ubuntu2004-java11-w-dependencies' // Dtest test targets @@ -68,6 +70,10 @@ if(binding.hasVariable("CASSANDRA_DTEST_TEST_TARGETS")) { } def dtestDockerImage = 'apache/cassandra-testing-ubuntu2004-java11' +// tmp for CASSANDRA-18665 +def cassandraBranchesInTreeScript = ['cassandra-5.0', 'trunk'] +def dtestTargetsInTreeScript = ['dtest', 'dtest-novnode', 'dtest-offheap', 'dtest-large', 'dtest-large-novnode', 'dtest-upgrade', 'dtest-upgrade-novnode', 'dtest-upgrade-large', 'dtest-upgrade-novnode-large'] + // expected longest job runtime def maxJobHours = 12 if(binding.hasVariable("MAX_JOB_HOURS")) { @@ -107,13 +113,13 @@ def isSplittableTest(targetName) { def jdks(branchName, targetName) { if (branchName == 'trunk' || branchName ==~ /cassandra-5.\d+/) { - if (!targetName.endsWith('dtest-upgrade')) { + if (!targetName.contains('dtest-upgrade')) { return ['jdk_11_latest', 'jdk_17_latest'] } else { // upgrade tests need an overlapping jdk return ['jdk_11_latest'] } - } else if ((branchName ==~ /cassandra-[4].\d+/) && !targetName.endsWith('dtest-upgrade')) { + } else if ((branchName ==~ /cassandra-[4].\d+/) && !targetName.contains('dtest-upgrade')) { return ['jdk_1.8_latest','jdk_11_latest'] } else { // upgrade tests need an overlapping jdk @@ -150,7 +156,7 @@ matrixJob('Cassandra-template-artifacts') { timestamps() } properties { - githubProjectUrl(githubRepo) + githubProjectUrl(mainRepo) priority(1) } scm { @@ -174,7 +180,7 @@ matrixJob('Cassandra-template-artifacts') { steps { buildDescription('', buildDescStr) shell(""" - git clean -xdff || echo "failed to clean… continuing…"; + git clean -qxdff || echo "failed to clean… continuing…"; git clone --depth 1 --single-branch -b ${buildsBranch} ${buildsRepo} ; echo "cassandra-builds at: `git -C cassandra-builds log -1 --pretty=format:'%H %an %ad %s'`" ; """) @@ -224,7 +230,7 @@ matrixJob('Cassandra-template-test') { timestamps() } properties { - githubProjectUrl(githubRepo) + githubProjectUrl(mainRepo) priority(3) } scm { @@ -248,7 +254,7 @@ matrixJob('Cassandra-template-test') { steps { buildDescription('', buildDescStr) shell(""" - git clean -xdff -e build/test/jmh-result.json || echo "failed to clean… continuing…"; + git clean -qxdff -e build/test/jmh-result.json || echo "failed to clean… continuing…"; git clone --depth 1 --single-branch -b ${buildsBranch} ${buildsRepo} ; echo "cassandra-builds at: `git -C cassandra-builds log -1 --pretty=format:'%H %an %ad %s'`" ; echo "\${BUILD_TAG}) cassandra: `git log -1 --pretty=format:'%H %an %ad %s'`" > \${BUILD_TAG}.head @@ -283,7 +289,7 @@ matrixJob('Cassandra-template-dtest-matrix') { timestamps() } properties { - githubProjectUrl(githubRepo) + githubProjectUrl(mainRepo) priority(7) } scm { @@ -307,7 +313,7 @@ matrixJob('Cassandra-template-dtest-matrix') { steps { buildDescription('', buildDescStr) shell(""" - git clean -xdff || echo "failed to clean… continuing…"; + git clean -qxdff || echo "failed to clean… continuing…"; git clone --depth 1 --single-branch -b ${buildsBranch} ${buildsRepo} ; echo "cassandra-builds at: `git -C cassandra-builds log -1 --pretty=format:'%H %an %ad %s'`" ; echo "\${BUILD_TAG}) cassandra: `git log -1 --pretty=format:'%H %an %ad %s'`" > \${BUILD_TAG}.head ; @@ -335,7 +341,7 @@ matrixJob('Cassandra-template-cqlsh-tests') { timestamps() } properties { - githubProjectUrl(githubRepo) + githubProjectUrl(mainRepo) priority(3) } scm { @@ -359,7 +365,7 @@ matrixJob('Cassandra-template-cqlsh-tests') { steps { buildDescription('', buildDescStr) shell(""" - git clean -xdff || echo "failed to clean… continuing…"; + git clean -qxdff || echo "failed to clean… continuing…"; git clone --depth 1 --single-branch -b ${buildsBranch} ${buildsRepo} ; echo "cassandra-builds at: `git -C cassandra-builds log -1 --pretty=format:'%H %an %ad %s'`" ; echo "\${BUILD_TAG}) cassandra: `git log -1 --pretty=format:'%H %an %ad %s'`" > \${BUILD_TAG}.head @@ -367,6 +373,583 @@ matrixJob('Cassandra-template-cqlsh-tests') { } } + +//////////////////////////////////////////////////////////// +// +// in-tree scripts, temporary between CASSANDRA-18133 and CASSANDRA-18594 +// +// TODO: remove this, and 5.0 and 'trunk' from cassandraBranches, when CASSANDRA-18594 is merged +//////////////////////////////////////////////////////////// + +cassandraBranchesInTreeScript.each { + def branchName = it + + // FIXME testing before merge + def jobNamePrefix = "Cassandra-intree-${branchName}".replaceAll('cassandra-', '') + //def jobNamePrefix = "Cassandra-${branchName}".replaceAll('cassandra-', '') + + matrixJob("${jobNamePrefix}-artifacts") { + description(jobDescription) + concurrentBuild() + compressBuildLog() + logRotator { + numToKeep(10) + artifactNumToKeep(5) + artifactDaysToKeep(1) + } + wrappers { + timeout { + noActivity(600) + } + timestamps() + } + properties { + githubProjectUrl(mainRepo) + priority(1) + } + scm { + git { + remote { + url(mainRepo) + } + branch(branchName) + extensions { + cleanAfterCheckout() + cloneOption { + shallow(false) + reference('.') + honorRefspec(true) + noTags(true) + timeout(maxJobHours * 60) + } + } + } + } + axes { + jdk(jdks(branchName, 'artifacts')) + if (arm64_enabled) { + label('label', slaveLabel, slaveArm64Label) + } else { + label('label', slaveLabel) + } + } + steps { + buildDescription('', buildDescStr) + shell(""" + git clean -qxdff || echo "failed to clean… continuing…"; + + # broken, CASSANDRA-18808 + #.build/docker/check-code.sh \$(java -version 2>&1 | awk -F '"' '/version/ {print \$2}' | awk -F. '{print \$1}') ; + + .build/docker/build-artifacts.sh \$(java -version 2>&1 | awk -F '"' '/version/ {print \$2}' | awk -F. '{print \$1}') ; + .build/docker/build-debian.sh \$(java -version 2>&1 | awk -F '"' '/version/ {print \$2}' | awk -F. '{print \$1}') ; + .build/docker/build-redhat.sh rpm \$(java -version 2>&1 | awk -F '"' '/version/ {print \$2}' | awk -F. '{print \$1}') ; + .build/docker/build-redhat.sh noboolean \$(java -version 2>&1 | awk -F '"' '/version/ {print \$2}' | awk -F. '{print \$1}') ; + + wget --retry-connrefused --waitretry=1 "\${BUILD_URL}/timestamps/?time=HH:mm:ss&timeZone=UTC&appendLog" -qO - > console.log || echo wget failed ; + xz -f console.log + """) + } + publishers { + extendedEmail { + recipientList('bui...@cassandra.apache.org') + triggers { + failure { + sendTo { + recipientList() + developers() + requester() + culprits() + } + } + fixed { + sendTo { + recipientList() + developers() + requester() + culprits() + } + } + } + } + publishOverSsh { + server('Nightlies') { + transferSet { + sourceFiles("console.log.xz, build/apache-cassandra-*.tar.gz, build/apache-cassandra-*.jar, build/apache-cassandra-*.pom, build/cassandra*.deb, build/cassandra*.rpm") + remoteDirectory("cassandra/${branchName}/${jobNamePrefix}-artifacts/\${BUILD_NUMBER}/\${JOB_NAME}/") + } + retry(9, 5000) + } + failOnError(false) + } + matrixPostBuildScript { + buildSteps { + markBuildUnstable(false) + postBuildStep { + executeOn('BOTH') + stopOnFailure(false) + results(['SUCCESS','UNSTABLE','FAILURE','NOT_BUILT','ABORTED']) + buildSteps { + shell { + // docker needs to (soon or later) prune its volumes too, but that can only be done when the agent is idle + // if the agent is busy, just prune everything that is older than maxJobHours + command(""" + echo "Cleaning project…"; git clean -qxdff || echo "failed to clean… continuing…"; + echo "Cleaning processes…" ; + if ! ( pgrep -xa docker || pgrep -af "cassandra-builds/build-scripts" ) ; then pkill -9 -f org.apache.cassandra. || echo "already clean" ; fi ; + echo "Pruning docker…" ; + if pgrep -xa docker || pgrep -af "cassandra-builds/build-scripts" ; then docker system prune --all --force --filter "until=${maxJobHours}h" || true ; else docker system prune --all --force --volumes || true ; fi; + echo "Reporting disk usage…"; df -h ; + echo "Cleaning tmp…"; + find . -type d -name tmp -delete 2>/dev/null ; + find /tmp -type f -atime +2 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null || echo clean tmp failed ; + echo "For test report and logs see https://nightlies.apache.org/cassandra/${branchName}/${jobNamePrefix}-artifacts/\${BUILD_NUMBER}/\${JOB_NAME}/" + """) + } + } + } + } + } + } + } + + /** + * Main branch ant test target jobs + */ + testTargets.each { + def targetName = it + + if (exists(branchName, targetName)) { + matrixJob("${jobNamePrefix}-${targetName}") { + description(jobDescription) + concurrentBuild() + compressBuildLog() + logRotator { + numToKeep(10) + artifactNumToKeep(5) + artifactDaysToKeep(1) + } + wrappers { + timeout { + noActivity(5400) + } + timestamps() + } + properties { + githubProjectUrl(mainRepo) + priority(3) + } + scm { + git { + remote { + url(mainRepo) + } + branch(branchName) + extensions { + cleanAfterCheckout() + cloneOption { + shallow(false) + reference('.') + honorRefspec(true) + noTags(true) + timeout(maxJobHours * 60) + } + } + } + } + def _testSplits = '' + axes { + if (isSplittableTest(targetName)) { + List<String> values = new ArrayList<String>() + (1..testSplits).each { values << it.toString() } + text('split', values) + _testSplits = "/${testSplits}" + } else { + _testSplits = "1/1" + } + jdk(jdks(branchName, targetName)) + if (use_arm64_test_label()) { + label('label', slaveLabel, slaveArm64Label) + } else { + label('label', slaveLabel) + } + } + steps { + buildDescription('', buildDescStr) + // stage jobs cannot stash and unstash, so build-jar.sh is used through docker + shell(""" + git clean -qxdff -e build/test/jmh-result.json || echo "failed to clean… continuing…"; + + echo "stage jobs cannot stash and unstash, so build-jar.sh is used through docker" ; + .build/docker/_docker_run.sh bullseye-build.docker build-jars.sh \$(java -version 2>&1 | awk -F '"' '/version/ {print \$2}' | awk -F. '{print \$1}'); + + .build/docker/run-tests.sh ${targetName} \${split}${_testSplits} \$(java -version 2>&1 | awk -F '"' '/version/ {print \$2}' | awk -F. '{print \$1}'); + + wget --retry-connrefused --waitretry=1 "\${BUILD_URL}/timestamps/?time=HH:mm:ss&timeZone=UTC&appendLog" -qO - > console.log || echo wget failed ; + xz -f console.log + """) + } + publishers { + archiveArtifacts { + pattern('build/test/**/TEST-*.xml, **/*.head') + allowEmpty() + fingerprint() + } + if (targetName == 'microbench') { + jmhReport { + resultPath('build/test/jmh-result.json') + } + archiveJunit('build/test/**/TEST-*.xml') { + allowEmptyResults(true) + } + } else { + archiveJunit('build/test/**/TEST-*.xml') { + testDataPublishers { + publishTestStabilityData() + } + } + } + publishOverSsh { + server('Nightlies') { + transferSet { + sourceFiles("console.log.xz,TESTS-TestSuites.xml.xz,build/test/logs/**,build/test/jmh-result.json") + remoteDirectory("cassandra/${branchName}/${jobNamePrefix}-${targetName}/\${BUILD_NUMBER}/\${JOB_NAME}/") + } + retry(9, 5000) + } + failOnError(false) + } + matrixPostBuildScript { + buildSteps { + markBuildUnstable(false) + postBuildStep { + executeOn('BOTH') + stopOnFailure(false) + results(['SUCCESS','UNSTABLE','FAILURE','NOT_BUILT','ABORTED']) + buildSteps { + shell { + // docker needs to (soon or later) prune its volumes too, but that can only be done when the agent is idle + // if the agent is busy, just prune everything that is older than maxJobHours + command(""" + echo "Cleaning project…"; git clean -qxdff -e build/test/jmh-result.json || echo "failed to clean… continuing…" ; + echo "Cleaning processes…" ; + if ! ( pgrep -xa docker || pgrep -af "cassandra-builds/build-scripts" ) ; then pkill -9 -f org.apache.cassandra. || echo "already clean" ; fi ; + echo "Pruning docker…" ; + if pgrep -xa docker || pgrep -af "cassandra-builds/build-scripts" ; then docker system prune --all --force --filter "until=${maxJobHours}h" || true ; else docker system prune --all --force --volumes || true ; fi; + echo "Reporting disk usage…"; du -xm / 2>/dev/null | sort -rn | head -n 30 ; df -h ; + echo "Cleaning tmp…"; + find . -type d -name tmp -delete 2>/dev/null ; + find /tmp -type f -atime +2 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null || echo clean tmp failed ; + echo "For test report and logs see https://nightlies.apache.org/cassandra/trunk/${jobNamePrefix}-${targetName}/\${BUILD_NUMBER}/\${JOB_NAME}/" + """) + } + } + } + } + } + cleanWs() + } + } + } + } + + /** + * Main branch dtest variation jobs + */ + archs.each { + def arch = it + dtestTargetsInTreeScript.each { + def targetName = it + def targetArchName = targetName + arch + + matrixJob("${jobNamePrefix}-${targetArchName}") { + description(jobDescription) + concurrentBuild() + compressBuildLog() + logRotator { + numToKeep(10) + artifactNumToKeep(5) + artifactDaysToKeep(1) + } + wrappers { + timeout { + noActivity(5400) + } + timestamps() + } + properties { + githubProjectUrl(mainRepo) + priority(7) + } + scm { + git { + remote { + url(mainRepo) + } + branch(branchName) + extensions { + cleanAfterCheckout() + cloneOption { + shallow(false) + reference('../1') + honorRefspec(true) + noTags(true) + timeout(maxJobHours * 60) + } + } + } + } + axes { + jdk(jdks(branchName, targetName)) + List<String> values = new ArrayList<String>() + if (targetName == 'dtest-large' || targetName == 'dtest-large-novnode') { + splits = dtestLargeSplits + } else { + splits = dtestSplits + } + (1..splits).each { values << it.toString() } + text('split', values) + if (targetName == 'dtest-large' || targetName == 'dtest-large-novnode') { + if (arch == "-arm64") { + label('label', slaveArm64DtestLargeLabel) + } else { + label('label', slaveDtestLargeLabel) + } + } else { + if (arch == "-arm64") { + label('label', slaveArm64DtestLabel) + } else { + label('label', slaveDtestLabel) + } + } + } + steps { + buildDescription('', buildDescStr) + // stage jobs cannot stash and unstash, so build-jar.sh is used through docker + shell(""" + git clean -qxdff || echo "failed to clean… continuing…"; + + export python_version="3.7" ; + export cassandra_dtest_dir="\$(pwd)/build/cassandra-dtest" ; + mkdir -p build ; + until git clone --quiet --depth 1 -b ${dtestBranch} ${dtestRepo} "\${cassandra_dtest_dir}" ; do echo "git clone failed… trying again… " ; done + + echo "stage jobs cannot stash and unstash, so build-jar.sh is used through docker" ; + .build/docker/_docker_run.sh bullseye-build.docker build-jars.sh \$(java -version 2>&1 | awk -F '"' '/version/ {print \$2}' | awk -F. '{print \$1}'); + + .build/docker/run-tests.sh ${targetName} \${split}/${splits} \$(java -version 2>&1 | awk -F '"' '/version/ {print \$2}' | awk -F. '{print \$1}'); + + wget --retry-connrefused --waitretry=1 "\${BUILD_URL}/timestamps/?time=HH:mm:ss&timeZone=UTC&appendLog" -qO - > console.log || echo wget failed ; + xz -f console.log + """) + } + publishers { + publishOverSsh { + server('Nightlies') { + transferSet { + sourceFiles("console.log.xz,**/nosetests.xml,**/test_stdout.txt.xz,**/ccm_logs.tar.xz") + remoteDirectory("cassandra/${branchName}/${jobNamePrefix}-${targetArchName}/\${BUILD_NUMBER}/\${JOB_NAME}/") + } + retry(9, 5000) + } + failOnError(false) + } + archiveArtifacts { + pattern('**/nosetests.xml') + allowEmpty() + fingerprint() + } + archiveJunit('**/nosetests.xml') { + testDataPublishers { + publishTestStabilityData() + } + } + matrixPostBuildScript { + buildSteps { + markBuildUnstable(false) + postBuildStep { + executeOn('BOTH') + stopOnFailure(false) + results(['SUCCESS','UNSTABLE','FAILURE','NOT_BUILT','ABORTED']) + buildSteps { + shell { + // docker needs to (soon or later) prune its volumes too, but that can only be done when the agent is idle + // if the agent is busy, just prune everything that is older than maxJobHours + command(""" + echo "Cleaning project…"; git clean -qxdff || echo "failed to clean… continuing…"; + echo "Cleaning processes…" ; + if ! ( pgrep -xa docker || pgrep -af "cassandra-builds/build-scripts" ) ; then pkill -9 -f org.apache.cassandra. || echo "already clean" ; fi ; + echo "Pruning docker…" ; + if pgrep -xa docker || pgrep -af "cassandra-builds/build-scripts" ; then docker system prune --all --force --filter "until=${maxJobHours}h" || true ; else docker system prune --all --force --volumes || true ; fi; + echo "Reporting disk usage…"; df -h ; + echo "Cleaning tmp…"; + find . -type d -name tmp -delete 2>/dev/null ; + find /tmp -type f -atime +2 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null || echo clean tmp failed ; + echo "For test report and logs see https://nightlies.apache.org/cassandra/trunk/${jobNamePrefix}-${targetArchName}/\${BUILD_NUMBER}/\${JOB_NAME}/" + """) + } + } + } + } + } + cleanWs() + } + } + } + } + + matrixJob("${jobNamePrefix}-cqlsh-tests") { + description(jobDescription) + concurrentBuild() + compressBuildLog() + logRotator { + numToKeep(10) + artifactNumToKeep(5) + artifactDaysToKeep(1) + } + wrappers { + timeout { + noActivity(1200) + } + timestamps() + } + properties { + githubProjectUrl(mainRepo) + priority(3) + } + scm { + git { + remote { + url(mainRepo) + } + branch(branchName) + extensions { + cleanAfterCheckout() + cloneOption { + shallow(false) + reference('.') + honorRefspec(true) + noTags(true) + timeout(maxJobHours * 60) + } + } + } + } + axes { + text('cython', 'yes', 'no') + jdk(jdks(branchName, 'cqlsh-tests')) + if (use_arm64_test_label()) { + label('label', slaveLabel, slaveArm64Label) + } else { + label('label', slaveLabel) + } + } + steps { + buildDescription('', buildDescStr) + // stage jobs cannot stash and unstash, so build-jar.sh is used through docker + shell(""" + git clean -qxdff || echo "failed to clean… continuing…"; + + .build/docker/_docker_run.sh bullseye-build.docker build-jars.sh \$(java -version 2>&1 | awk -F '"' '/version/ {print \$2}' | awk -F. '{print \$1}'); + .build/docker/run-tests.sh cqlsh-test 1/1 \$(java -version 2>&1 | awk -F '"' '/version/ {print \$2}' | awk -F. '{print \$1}'); + + wget --retry-connrefused --waitretry=1 "\${BUILD_URL}/timestamps/?time=HH:mm:ss&timeZone=UTC&appendLog" -qO - > console.log || echo wget failed ; + xz -f console.log + """) + } + publishers { + publishOverSsh { + server('Nightlies') { + transferSet { + sourceFiles("console.log.xz,**/cqlshlib.xml") + remoteDirectory("cassandra/${branchName}/${jobNamePrefix}-cqlsh-tests/\${BUILD_NUMBER}/\${JOB_NAME}/") + } + retry(9, 5000) + } + failOnError(false) + } + archiveArtifacts { + pattern('**/cqlshlib.xml') + allowEmpty() + fingerprint() + } + archiveJunit('**/cqlshlib.xml') { + testDataPublishers { + publishTestStabilityData() + } + } + matrixPostBuildScript { + buildSteps { + markBuildUnstable(false) + postBuildStep { + executeOn('BOTH') + stopOnFailure(false) + results(['SUCCESS','UNSTABLE','FAILURE','NOT_BUILT','ABORTED']) + buildSteps { + shell { + // docker needs to (soon or later) prune its volumes too, but that can only be done when the agent is idle + // if the agent is busy, just prune everything that is older than maxJobHours + command(""" + echo "Cleaning project…"; git clean -qxdff || echo "failed to clean… continuing…"; + echo "Cleaning processes…" ; + if ! (pgrep -xa docker || pgrep -af "cassandra-builds/build-scripts") ; then pkill -9 -f org.apache.cassandra. || echo "already clean" ; fi ; + echo "Pruning docker…" ; + if pgrep -xa docker || pgrep -af "cassandra-builds/build-scripts" ; then docker system prune --all --force --filter "until=${maxJobHours}h" || true ; else docker system prune --all --force --volumes || true ; fi; + echo "Reporting disk usage…"; df -h ; + echo "Cleaning tmp…"; + find . -type d -name tmp -delete 2>/dev/null ; + find /tmp -type f -atime +2 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null || echo clean tmp failed ; + echo "For test report and logs see https://nightlies.apache.org/cassandra/trunk/${jobNamePrefix}--cqlsh-tests/\${BUILD_NUMBER}/\${JOB_NAME}/" + """) + } + } + } + } + } + cleanWs() + } + } + + /** + * Branch Pipelines + */ + pipelineJob("${jobNamePrefix}") { + description(jobDescription) + logRotator { + numToKeep(30) + artifactNumToKeep(10) + } + properties { + githubProjectUrl(mainRepo) + priority(1) + } + definition { + cpsScm { + scm { + git { + remote { + url(mainRepo) + } + branch(branchName) + extensions { + cleanAfterCheckout() + cloneOption { + shallow(false) + reference('.') + honorRefspec(true) + noTags(true) + timeout(maxJobHours * 60) + } + } + } + } + scriptPath('.jenkins/Jenkinsfile') + } + } + } +} +// end tmp + //////////////////////////////////////////////////////////// // // Branch Job Definitions @@ -428,7 +1011,7 @@ cassandraBranches.each { // docker needs to (soon or later) prune its volumes too, but that can only be done when the agent is idle // if the agent is busy, just prune everything that is older than maxJobHours command(""" - echo "Cleaning project…"; git clean -xdff || echo "failed to clean… continuing…"; + echo "Cleaning project…"; git clean -qxdff || echo "failed to clean… continuing…"; echo "Cleaning processes…" ; if ! ( pgrep -xa docker || pgrep -af "cassandra-builds/build-scripts" ) ; then pkill -9 -f org.apache.cassandra. || echo "already clean" ; fi ; echo "Pruning docker…" ; @@ -522,7 +1105,7 @@ cassandraBranches.each { // docker needs to (soon or later) prune its volumes too, but that can only be done when the agent is idle // if the agent is busy, just prune everything that is older than maxJobHours command(""" - echo "Cleaning project…"; git clean -xdff -e build/test/jmh-result.json || echo "failed to clean… continuing…" ; + echo "Cleaning project…"; git clean -qxdff -e build/test/jmh-result.json || echo "failed to clean… continuing…" ; echo "Cleaning processes…" ; if ! ( pgrep -xa docker || pgrep -af "cassandra-builds/build-scripts" ) ; then pkill -9 -f org.apache.cassandra. || echo "already clean" ; fi ; echo "Pruning docker…" ; @@ -624,7 +1207,7 @@ cassandraBranches.each { // docker needs to (soon or later) prune its volumes too, but that can only be done when the agent is idle // if the agent is busy, just prune everything that is older than maxJobHours command(""" - echo "Cleaning project…"; git clean -xdff || echo "failed to clean… continuing…"; + echo "Cleaning project…"; git clean -qxdff || echo "failed to clean… continuing…"; echo "Cleaning processes…" ; if ! ( pgrep -xa docker || pgrep -af "cassandra-builds/build-scripts" ) ; then pkill -9 -f org.apache.cassandra. || echo "already clean" ; fi ; echo "Pruning docker…" ; @@ -706,7 +1289,7 @@ cassandraBranches.each { // docker needs to (soon or later) prune its volumes too, but that can only be done when the agent is idle // if the agent is busy, just prune everything that is older than maxJobHours command(""" - echo "Cleaning project…"; git clean -xdff || echo "failed to clean… continuing…"; + echo "Cleaning project…"; git clean -qxdff || echo "failed to clean… continuing…"; echo "Cleaning processes…" ; if ! (pgrep -xa docker || pgrep -af "cassandra-builds/build-scripts") ; then pkill -9 -f org.apache.cassandra. || echo "already clean" ; fi ; echo "Pruning docker…" ; @@ -736,14 +1319,15 @@ cassandraBranches.each { numToKeep(30) artifactNumToKeep(10) } - if (branchName != 'cassandra-4.1') { + if (branchName != 'cassandra-5.0') { // allow one pipeline branch to "have focus" and be unthrottled, all other branches queue throttleConcurrentBuilds { maxTotal(1) + categories(['cassandra']) } } properties { - githubProjectUrl(githubRepo) + githubProjectUrl(mainRepo) priority(1) } definition { @@ -812,7 +1396,7 @@ matrixJob('Cassandra-devbranch-artifacts') { stringParam('BRANCH', 'trunk', 'The branch of cassandra to checkout') } properties { - githubProjectUrl(githubRepo) + githubProjectUrl(mainRepo) priority(1) } scm { @@ -836,7 +1420,7 @@ matrixJob('Cassandra-devbranch-artifacts') { steps { buildDescription('', buildDescStr) shell(""" - git clean -xdff ; + git clean -qxdff ; git clone --depth 1 --single-branch -b ${buildsBranch} ${buildsRepo} ; echo "cassandra-builds at: `git -C cassandra-builds log -1 --pretty=format:'%H %an %ad %s'`" ; ./cassandra-builds/build-scripts/cassandra-artifacts.sh ; @@ -867,7 +1451,7 @@ matrixJob('Cassandra-devbranch-artifacts') { // docker needs to (soon or later) prune its volumes too, but that can only be done when the agent is idle // if the agent is busy, just prune everything that is older than maxJobHours command(""" - echo "Cleaning project…"; git clean -xdff ; + echo "Cleaning project…"; git clean -qxdff ; echo "Cleaning processes…" ; if ! (pgrep -xa docker || pgrep -af "cassandra-builds/build-scripts") ; then pkill -9 -f org.apache.cassandra. || echo "already clean" ; fi ; echo "Pruning docker…" ; @@ -927,7 +1511,7 @@ testTargets.each { stringParam('BRANCH', 'trunk', 'The branch of cassandra to checkout') } properties { - githubProjectUrl(githubRepo) + githubProjectUrl(mainRepo) priority(3) } scm { @@ -951,7 +1535,7 @@ testTargets.each { steps { buildDescription('', buildDescStr) shell(""" - git clean -xdff ${targetName == 'microbench' ? '-e build/test/jmh-result.json' : ''}; + git clean -qxdff ${targetName == 'microbench' ? '-e build/test/jmh-result.json' : ''}; git clone --depth 1 --single-branch -b ${buildsBranch} ${buildsRepo} ; echo "cassandra-builds at: `git -C cassandra-builds log -1 --pretty=format:'%H %an %ad %s'`" ; """) @@ -995,7 +1579,7 @@ testTargets.each { // docker needs to (soon or later) prune its volumes too, but that can only be done when the agent is idle // if the agent is busy, just prune everything that is older than maxJobHours command(""" - echo "Cleaning project…"; git clean -xdff ${targetName == 'microbench' ? '-e build/test/jmh-result.json' : ''}; + echo "Cleaning project…"; git clean -qxdff ${targetName == 'microbench' ? '-e build/test/jmh-result.json' : ''}; echo "Cleaning processes…" ; if ! (pgrep -xa docker || pgrep -af "cassandra-builds/build-scripts") ; then pkill -9 -f org.apache.cassandra. || echo "already clean" ; fi ; echo "Pruning docker…" ; @@ -1075,7 +1659,7 @@ archs.each { } } properties { - githubProjectUrl(githubRepo) + githubProjectUrl(mainRepo) priority(6) } scm { @@ -1099,7 +1683,7 @@ archs.each { steps { buildDescription('', buildDescStr) shell(""" - git clean -xdff ; + git clean -qxdff ; git clone --depth 1 --single-branch -b ${buildsBranch} ${buildsRepo} ; echo "cassandra-builds at: `git -C cassandra-builds log -1 --pretty=format:'%H %an %ad %s'`" ; echo "Cassandra-devbranch-${targetArchName}) cassandra: `git log -1 --pretty=format:'%H %an %ad %s'`" > Cassandra-devbranch-${targetArchName}.head ; @@ -1139,7 +1723,7 @@ archs.each { // docker needs to (soon or later) prune its volumes too, but that can only be done when the agent is idle // if the agent is busy, just prune everything that is older than maxJobHours command(""" - echo "Cleaning project…" ; git clean -xdff ; + echo "Cleaning project…" ; git clean -qxdff ; echo "Cleaning processes…" ; if ! (pgrep -xa docker || pgrep -af "cassandra-builds/build-scripts") ; then pkill -9 -f org.apache.cassandra. || echo "already clean" ; fi ; echo "Pruning docker…" ; @@ -1197,7 +1781,7 @@ matrixJob('Cassandra-devbranch-cqlsh-tests') { // this should prevent long path expansion from the axis definitions childCustomWorkspace('.') properties { - githubProjectUrl(githubRepo) + githubProjectUrl(mainRepo) priority(3) } scm { @@ -1221,7 +1805,7 @@ matrixJob('Cassandra-devbranch-cqlsh-tests') { steps { buildDescription('', buildDescStr) shell(""" - git clean -xdff ; + git clean -qxdff ; echo "\${BUILD_TAG}) cassandra: `git log -1 --pretty=format:'%H %an %ad %s'`" > \${BUILD_TAG}.head ; git clone --depth 1 --single-branch -b ${buildsBranch} ${buildsRepo} ; echo "cassandra-builds at: `git -C cassandra-builds log -1 --pretty=format:'%H %an %ad %s'`" ; @@ -1259,7 +1843,7 @@ matrixJob('Cassandra-devbranch-cqlsh-tests') { // docker needs to (soon or later) prune its volumes too, but that can only be done when the agent is idle // if the agent is busy, just prune everything that is older than maxJobHours command(""" - echo "Cleaning project…"; git clean -xdff ; + echo "Cleaning project…"; git clean -qxdff ; echo "Cleaning processes…" ; if ! ( pgrep -xa docker || pgrep -af "cassandra-builds/build-scripts" ) ; then pkill -9 -f org.apache.cassandra. || echo "already clean" ; fi ; echo "Pruning docker…" ; @@ -1300,7 +1884,7 @@ pipelineJob('Cassandra-devbranch') { stringParam('DOCKER_IMAGE', "${dtestDockerImage}", 'Docker image for running dtests') } properties { - githubProjectUrl(githubRepo) + githubProjectUrl(mainRepo) priority(1) } definition { diff --git a/jenkins-dsl/print-shas.sh b/jenkins-dsl/print-shas.sh index 51bd820..ff50dd3 100755 --- a/jenkins-dsl/print-shas.sh +++ b/jenkins-dsl/print-shas.sh @@ -3,6 +3,7 @@ # Print the SHAs used in all the stage jobs. # If they all match then print just them, else print every job's used SHA # +# Deprecated from 5.0 (post CASSANDRA-18594) if [ $(find . -type f -name "*.head" -exec cat {} \; | grep ") cassandra" | awk -F') cassandra' '{print $2}' | sort -u | sed -n '$=') = "3" ]; then echo "The folllowing SHAs were consistently used in all jobs in the pipeline…" --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org