This is an automated email from the ASF dual-hosted git repository.

mck pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-builds.git


The following commit(s) were added to refs/heads/master by this push:
     new eb58d1b  In Jenkins always use `git clone --depth 1 --single-branch …`
eb58d1b is described below

commit eb58d1b98c03c1c4344703d0d258b9211b1ddf29
Author: mck <m...@apache.org>
AuthorDate: Sat Jul 25 18:39:51 2020 +0200

    In Jenkins always use `git clone --depth 1 --single-branch …`
---
 docker/jenkins/dtest.sh                   |  8 ++++----
 docker/jenkins/jenkinscommand.sh          |  4 ++--
 jenkins-dsl/cassandra_job_dsl_seed.groovy | 14 +++++++-------
 jenkins-dsl/cassandra_pipeline.groovy     |  6 +++---
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/docker/jenkins/dtest.sh b/docker/jenkins/dtest.sh
index 20915b6..47ec642 100644
--- a/docker/jenkins/dtest.sh
+++ b/docker/jenkins/dtest.sh
@@ -4,9 +4,9 @@ export LANG=en_US.UTF-8
 export LC_CTYPE=en_US.UTF-8
 export PYTHONIOENCODING=utf-8
 export PYTHONUNBUFFERED=true
-echo "dtest.sh: running: git clone --depth=1 --branch=$BRANCH 
https://github.com/$REPO/cassandra.git";
-git clone --depth=1 --branch=$BRANCH https://github.com/$REPO/cassandra.git
+echo "dtest.sh: running: git clone --depth 1 --single-branch --branch=$BRANCH 
https://github.com/$REPO/cassandra.git";
+git clone --depth 1 --single-branch --branch=$BRANCH 
https://github.com/$REPO/cassandra.git
 cd cassandra
-echo git clone --branch=$DTEST_BRANCH $DTEST_REPO
-git clone --branch=$DTEST_BRANCH $DTEST_REPO
+echo git clone --depth 1 --single-branch --branch=$DTEST_BRANCH $DTEST_REPO
+git clone --depth 1 --single-branch --branch=$DTEST_BRANCH $DTEST_REPO
 ../cassandra-builds/build-scripts/cassandra-dtest-pytest.sh $1
diff --git a/docker/jenkins/jenkinscommand.sh b/docker/jenkins/jenkinscommand.sh
index ea6d764..bc2b835 100644
--- a/docker/jenkins/jenkinscommand.sh
+++ b/docker/jenkins/jenkinscommand.sh
@@ -14,8 +14,8 @@ DTEST_REPO=$3
 DTEST_BRANCH=$4
 EOF
 
-echo "jenkinscommand.sh: running: git clone --branch $BUILDSBRANCH 
$BUILDSREPO; sh ./cassandra-builds/docker/jenkins/dtest.sh $TARGET"
-ID=$(docker run --env-file env.list -dt $DOCKER_IMAGE dumb-init bash -ilc "git 
clone --branch $BUILDSBRANCH $BUILDSREPO; sh 
./cassandra-builds/docker/jenkins/dtest.sh $TARGET")
+echo "jenkinscommand.sh: running: git clone --single-branch --depth 1 --branch 
$BUILDSBRANCH $BUILDSREPO; sh ./cassandra-builds/docker/jenkins/dtest.sh 
$TARGET"
+ID=$(docker run --env-file env.list -dt $DOCKER_IMAGE dumb-init bash -ilc "git 
clone --single-branch --depth 1 --branch $BUILDSBRANCH $BUILDSREPO; sh 
./cassandra-builds/docker/jenkins/dtest.sh $TARGET")
 
 # use docker attach instead of docker wait to get output
 docker attach --no-stdin $ID
diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy 
b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index 254e5e0..39bc2b1 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -105,7 +105,7 @@ matrixJob('Cassandra-template-artifacts') {
     }
     steps {
         buildDescription('', buildDescStr)
-        shell("git clean -xdff ; git clone -b ${buildsBranch} ${buildsRepo}")
+        shell("git clean -xdff ; git clone --depth 1 --single-branch -b 
${buildsBranch} ${buildsRepo}")
     }
     publishers {
         archiveArtifacts('build/apache-cassandra-*.tar.gz, 
build/apache-cassandra-*.jar, build/apache-cassandra-*.pom, 
build/cassandra*.deb, build/cassandra*.rpm, 
build/**/eclipse_compiler_checks.txt')
@@ -186,7 +186,7 @@ job('Cassandra-template-test') {
     }
     steps {
         buildDescription('', buildDescStr)
-        shell("git clean -xdff ; git clone -b ${buildsBranch} ${buildsRepo}")
+        shell("git clean -xdff ; git clone --depth 1 --single-branch -b 
${buildsBranch} ${buildsRepo}")
     }
     publishers {
         archiveArtifacts {
@@ -249,7 +249,7 @@ job('Cassandra-template-dtest') {
     }
     steps {
         buildDescription('', buildDescStr)
-        shell("git clean -xdff ; git clone -b ${buildsBranch} ${buildsRepo} ; 
git clone ${dtestRepo}")
+        shell("git clean -xdff ; git clone --depth 1 --single-branch -b 
${buildsBranch} ${buildsRepo} ; git clone --depth 1 --single-branch 
${dtestRepo}")
     }
     publishers {
         archiveArtifacts {
@@ -319,7 +319,7 @@ matrixJob('Cassandra-template-cqlsh-tests') {
     }
     steps {
         buildDescription('', buildDescStr)
-        shell("git clean -xdff ; git clone ${dtestRepo}")
+        shell("git clean -xdff ; git clone --depth 1 --single-branch 
${dtestRepo}")
     }
     publishers {
         archiveArtifacts {
@@ -536,7 +536,7 @@ matrixJob('Cassandra-devbranch-artifacts') {
     }
     steps {
         buildDescription('', buildDescStr)
-        shell("git clean -xdff ; git clone -b ${buildsBranch} ${buildsRepo}")
+        shell("git clean -xdff ; git clone --depth 1 --single-branch -b 
${buildsBranch} ${buildsRepo}")
         shell('./cassandra-builds/build-scripts/cassandra-artifacts.sh')
     }
     publishers {
@@ -598,7 +598,7 @@ testTargets.each {
         }
         steps {
             buildDescription('', buildDescStr)
-            shell("git clean -xdff ; git clone -b ${buildsBranch} 
${buildsRepo}")
+            shell("git clean -xdff ; git clone --depth 1 --single-branch -b 
${buildsBranch} ${buildsRepo}")
             shell("./cassandra-builds/build-scripts/cassandra-test.sh 
${targetName}")
         }
         publishers {
@@ -677,7 +677,7 @@ dtestTargets.each {
         }
         steps {
             buildDescription('', buildDescStr)
-            shell("git clean -xdff ; git clone -b ${buildsBranch} 
${buildsRepo}")
+            shell("git clean -xdff ; git clone --depth 1 --single-branch -b 
${buildsBranch} ${buildsRepo}")
             shell("sh ./cassandra-builds/docker/jenkins/jenkinscommand.sh 
\$REPO \$BRANCH \$DTEST_REPO \$DTEST_BRANCH ${buildsRepo} ${buildsBranch} 
\$DOCKER_IMAGE  ${targetName}")
         }
         publishers {
diff --git a/jenkins-dsl/cassandra_pipeline.groovy 
b/jenkins-dsl/cassandra_pipeline.groovy
index 348c77e..408dbde 100644
--- a/jenkins-dsl/cassandra_pipeline.groovy
+++ b/jenkins-dsl/cassandra_pipeline.groovy
@@ -12,9 +12,9 @@ pipeline {
       stage('Init') {
           steps {
               cleanWs()
-              sh "git clone -b ${BRANCH} 
https://github.com/${REPO}/cassandra.git";
+              sh "git clone --depth 1 --single-branch -b ${BRANCH} 
https://github.com/${REPO}/cassandra.git";
               sh "test -f cassandra/.jenkins/Jenkinsfile"
-              sh "git clone -b ${DTEST_BRANCH} ${DTEST_REPO}"
+              sh "git clone --depth 1 --single-branch -b ${DTEST_BRANCH} 
${DTEST_REPO}"
               sh "test -f cassandra-dtest/requirements.txt"
               sh "docker pull ${DOCKER_IMAGE}"
           }
@@ -225,7 +225,7 @@ pipeline {
       stage('Summary') {
         steps {
             sh "rm -fR cassandra-builds"
-            sh "git clone 
https://gitbox.apache.org/repos/asf/cassandra-builds.git";
+            sh "git clone --depth 1 --single-branch 
https://gitbox.apache.org/repos/asf/cassandra-builds.git";
             sh "./cassandra-builds/build-scripts/cassandra-test-report.sh"
             junit '**/build/test/**/TEST*.xml,**/cqlshlib.xml,**/nosetests.xml'
             script {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to