You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2020/12/13 04:42:09 UTC

[iotdb] 01/01: enable deploying the website automatically

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

hxd pushed a commit to branch enable_deploy_website_auto
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 8d7f1cc574ad7ebe41f7cb79af44f2ca187fd825
Author: xiangdong huang <sa...@gmail.com>
AuthorDate: Sun Dec 13 12:41:38 2020 +0800

    enable deploying the website automatically
---
 Jenkinsfile       | 25 +++++++++++++++++++++++--
 site/README-zh.md |  2 +-
 site/README.md    |  2 +-
 3 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 6e1ae99..0e811e3 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -85,7 +85,7 @@ pipeline {
                 sh 'mvn clean'
                 // We'll deploy to a relative directory so we can
                 // deploy new versions only if the entire build succeeds
-                sh 'mvn ${MVN_TEST_FAIL_IGNORE} -DaltDeploymentRepository=snapshot-repo::default::file:./local-snapshots-dir clean deploy'
+                sh 'mvn ${MVN_TEST_FAIL_IGNORE} -DaltDeploymentRepository=snapshot-repo::default::file:./local-snapshots-dir -P client-cpp clean deploy'
             }
             post {
                 always {
@@ -120,7 +120,28 @@ pipeline {
             steps {
                 echo 'Deploying'
                 // Deploy the artifacts using the wagon-maven-plugin.
-                sh 'mvn -f jenkins.pom -X -P deploy-snapshots wagon:upload'
+                sh 'mvn -f jenkins.pom -X -P deploy-snapshots -P client-cpp wagon:upload'
+            }
+        }
+
+        stage('Deploy site') {
+            when {
+                branch 'master'
+            }
+            // Only the nodes labeled 'git-websites' have the credentials to commit to the.
+            agent {
+                node {
+                    label 'git-websites'
+                }
+            }
+            steps {
+                // Publish the site with the scm-publish plugin.
+                sh 'mvn -P site -P compile-site -P compile-site-0.11 -P compile-site-0.10 -P compile-site-0.9 -P compile-site-0.8 compile scm-publish:publish-scm -pl site'
+
+                // Clean up the snapshots directory (freeing up more space after deploying).
+                dir("target") {
+                    deleteDir()
+                }
             }
         }
 
diff --git a/site/README-zh.md b/site/README-zh.md
index 123f17c..5034fe0 100644
--- a/site/README-zh.md
+++ b/site/README-zh.md
@@ -29,7 +29,7 @@
 
 ## 如何建立
 
-跑`mvn compile -DskipTests  -P compile-site -P download-website` 
+跑`mvn compile -DskipTests  -P compile-site -P download-site` 
 
 ## 如何调试
 
diff --git a/site/README.md b/site/README.md
index 5c2d1b4..3d01bc6 100644
--- a/site/README.md
+++ b/site/README.md
@@ -32,7 +32,7 @@ See https://iotdb.apache.org/
 ## Build Setup
 
 
-run `mvn compile -DskipTests  -P compile-site -P download-website` for doing the following steps automatically:
+run `mvn compile -DskipTests  -P compile-site -P download-site` for doing the following steps automatically:
 
 - get docs from the master branch and all lagecy docs remotely.
 - download node.js and npm;