You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mc...@apache.org on 2022/01/08 20:04:53 UTC

[cassandra-builds] 01/01: Update Cassandra build CI script for new website

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

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

commit 5f9b76b5d54e0b286f10daef97c1d69bbb78f3f8
Author: Mick Semb Wever <mc...@apache.org>
AuthorDate: Thu Aug 5 11:44:03 2021 +0200

    Update Cassandra build CI script for new website
    
     patch by Mick Semb Wever; reviewed by Anthony Grasso for CASSANDRA-16765
---
 jenkins-dsl/cassandra_job_dsl_seed.groovy | 45 ++++++++++++++++++++++++-------
 1 file changed, 36 insertions(+), 9 deletions(-)

diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index 8c69f96..a7a4f8f 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -1221,6 +1221,9 @@ job('cassandra-website') {
         numToKeep(10)
         artifactNumToKeep(10)
     }
+    throttleConcurrentBuilds {
+        maxTotal(1)
+    }
     wrappers {
         preBuildCleanup()
         timeout {
@@ -1250,21 +1253,45 @@ job('cassandra-website') {
         }
     }
     triggers {
+        upstream('Cassandra-3.11,Cassandra-4.0,Cassandra-trunk', 'UNSTABLE')
         scm('H/5 * * * *')
     }
     steps {
         buildDescription('', buildDescStr)
-        // the chmod below is a hack for INFRA-20814
         // for debugging it can be useful to add a `git show --stat HEAD` before the push
         shell("""
-                git checkout asf-staging ;
-                git reset --hard origin/trunk ;
-                docker-compose build --build-arg UID=`id -u` --build-arg GID=`id -g` cassandra-website ;
-                chmod -R 777 src content ;
-                docker-compose run cassandra-website ;
-                git add content/ src/doc/ ;
-                git commit -a -m "generate docs for `git rev-parse --short HEAD`" ;
-                git push -f origin asf-staging ;
+            git checkout asf-staging ;
+            git reset --hard origin/trunk ;
+
+            # HACK for INFRA-20814 ;
+            chmod -R ag+rw site-* ; 
+
+            ./run.sh website-ui bundle -a BUILD_USER_ARG:`whoami` -a UID_ARG:`id -u` -a GID_ARG:`id -g` ;
+            ./run.sh website build -z ./site-ui/build/ui-bundle.zip -b cassandra:trunk,cassandra-4.0,cassandra-3.11 -a BUILD_USER_ARG:`whoami` -a UID_ARG:`id -u` -a GID_ARG:`id -g` ;
+
+            # start-hack – remaining build hacks, see CASSANDRA-16761 ;
+                # copy everything to content/ directory ;
+                mkdir -p content/doc ;
+                cp -r site-content/build/html/* content/ ;
+                # move around the in-tree docs ;
+                rm -fR content/doc/4.0 content/doc/4.0.0 content/doc/3.11 content/doc/3.11.11 content/doc/stable content/doc/latest content/doc/trunk ;
+                cp -r content/Cassandra/3.11 content/doc/3.11.11 ;
+                mv content/Cassandra/3.11 content/doc/ ;
+                cp -r content/Cassandra/4.0 content/doc/4.0.0 ;
+                cp -r content/Cassandra/4.0 content/doc/4.0.1 ;
+                cp -r content/Cassandra/4.0 content/doc/stable ;
+                cp -r content/Cassandra/trunk content/doc/4.1 ;
+                cp -r content/Cassandra/trunk content/doc/latest ;
+                mv content/Cassandra/4.0 content/doc/ ;
+                mv content/Cassandra/trunk content/doc/ ;
+                # remove hardcoded domain name, and empty domain names  ;
+                for f in `grep -rl "https://cassandra.apache.org/" content ` ; do sed -i "s/https:\\/\\/cassandra.apache.org\\//\\//g" \$f ; done ;
+                for f in `grep -rl "href=\\"//" content ` ; do sed -i "s/href=\"\\/\\//href=\"\\//g" \$f ; done ;
+            #end-hack ;
+
+            git add content ;
+            git commit -a -m "generate docs for `git rev-parse --short HEAD`" ;
+            git push -f origin asf-staging ;
               """)
     }
 }

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