Repository: cassandra-builds Updated Branches: refs/heads/master d3cd2e8ce -> 27bc20645
create a separate jenkins job for running dtests in docker Project: http://git-wip-us.apache.org/repos/asf/cassandra-builds/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra-builds/commit/27bc2064 Tree: http://git-wip-us.apache.org/repos/asf/cassandra-builds/tree/27bc2064 Diff: http://git-wip-us.apache.org/repos/asf/cassandra-builds/diff/27bc2064 Branch: refs/heads/master Commit: 27bc2064575d236c9b2f5878f8fafed35b8ba6fc Parents: d3cd2e8 Author: Marcus Eriksson <[email protected]> Authored: Wed Feb 21 14:02:38 2018 -0800 Committer: Marcus Eriksson <[email protected]> Committed: Wed Feb 21 14:02:38 2018 -0800 ---------------------------------------------------------------------- docker/jenkins/dtest.sh | 9 +++++ docker/jenkins/jenkinscommand.sh | 13 ++++++ jenkins-dsl/cassandra_job_dsl_seed.groovy | 55 ++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra-builds/blob/27bc2064/docker/jenkins/dtest.sh ---------------------------------------------------------------------- diff --git a/docker/jenkins/dtest.sh b/docker/jenkins/dtest.sh new file mode 100644 index 0000000..87dd77f --- /dev/null +++ b/docker/jenkins/dtest.sh @@ -0,0 +1,9 @@ +#!/bin/sh +export WORKSPACE=/home/cassandra/cassandra +export LANG=en_US.UTF-8 +export PYTHONIOENCODING=utf-8 +export PYTHONUNBUFFERED=true +git clone --depth=1 --branch=$BRANCH https://github.com/$REPO/cassandra.git +cd cassandra +git clone --branch=$DTEST_BRANCH $DTEST_REPO +../cassandra-builds/build-scripts/cassandra-dtest-pytest.sh http://git-wip-us.apache.org/repos/asf/cassandra-builds/blob/27bc2064/docker/jenkins/jenkinscommand.sh ---------------------------------------------------------------------- diff --git a/docker/jenkins/jenkinscommand.sh b/docker/jenkins/jenkinscommand.sh new file mode 100644 index 0000000..f218ff9 --- /dev/null +++ b/docker/jenkins/jenkinscommand.sh @@ -0,0 +1,13 @@ +#!/bin/sh +cat > env.list <<EOF +REPO=$REPO +BRANCH=$BRANCH +DTEST_REPO=$DTEST_REPO +DTEST_BRANCH=$DTEST_BRANCH +EOF +ID=$(docker run --env-file env.list -dt kjellman/cassandra-test:0.4.3 bash -ilc "git clone --depth=1 --branch dock https://github.com/krummas/cassandra-builds.git; sh ./cassandra-builds/docker/jenkins/dtest.sh") +# use docker attach instead of docker wait to get output +docker attach --no-stdin $ID +echo "$ID done, copying files" +docker cp $ID:/home/cassandra/cassandra/cassandra-dtest/nosetests.xml . +docker cp $ID:/home/cassandra/cassandra/test_stdout.txt . http://git-wip-us.apache.org/repos/asf/cassandra-builds/blob/27bc2064/jenkins-dsl/cassandra_job_dsl_seed.groovy ---------------------------------------------------------------------- diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy b/jenkins-dsl/cassandra_job_dsl_seed.groovy index c950e0a..9ab039c 100644 --- a/jenkins-dsl/cassandra_job_dsl_seed.groovy +++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy @@ -479,6 +479,61 @@ job('Cassandra-devbranch-dtest') { } /** + * Parameterized Dev Branch dtest in docker + */ +job('Cassandra-devbranch-dtest-docker') { + description(jobDescription) + concurrentBuild() + jdk(jdkLabel) + label(slaveLabel) + logRotator { + numToKeep(50) + } + wrappers { + timeout { + noActivity(2400) + } + } + throttleConcurrentBuilds { + categories(['Cassandra']) + } + parameters { + stringParam('REPO', 'apache', 'The github user/org to clone cassandra repo from') + stringParam('BRANCH', 'trunk', 'The branch of cassandra to checkout') + stringParam('DTEST_REPO', "${dtestRepo}", 'The cassandra-dtest repo URL') + stringParam('DTEST_BRANCH', 'master', 'The branch of cassandra-dtest to checkout') + } + scm { + git { + remote { + url('https://github.com/${REPO}/cassandra.git') + } + branch('${BRANCH}') + extensions { + cleanAfterCheckout() + } + } + } + steps { + buildDescription('', buildDescStr) + shell("git clean -xdff ; git clone -b dock https://github.com/krummas/cassandra-builds.git") + shell('sh ./cassandra-builds/docker/jenkins/jenkinscommand.sh') + } + publishers { + archiveArtifacts('test_stdout.txt') + archiveJunit('nosetests.xml') { + testDataPublishers { + publishTestStabilityData() + } + } + postBuildTask { + task('.', 'echo "Finding job process orphans.."; if pgrep -af ${JOB_BASE_NAME}; then pkill -9 -f ${JOB_BASE_NAME}; fi') + } + } +} + + +/** * Parameterized Dev Branch cqlsh-tests */ matrixJob('Cassandra-devbranch-cqlsh-tests') { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
