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

francischuang pushed a commit to branch test-site
in repository https://gitbox.apache.org/repos/asf/calcite.git

commit dded5398cce4a66d960ee4507b10319d916656fa
Author: Francis Chuang <[email protected]>
AuthorDate: Sun Jun 9 15:40:40 2019 +1000

    Add Jenkinsfile for automated site build
---
 Jenkinsfile             | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 site/docker-compose.yml |  2 +-
 2 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..6f56090
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,47 @@
+pipeline {
+    agent {
+        node {
+            label 'git-websites'
+        }
+    }
+
+    environment {
+        COMPOSE_PROJECT_NAME = "${env.JOB_NAME}-${env.BUILD_ID}"
+    }
+
+    options {
+        timeout(time: 20, unit: 'MINUTES')
+    }
+
+    stages {
+        stage('Build') {
+            steps {
+                dir ("site") {
+                    sh '''
+                        docker-compose run -d -e JEKYLL_UID=$(id -u) -e 
JEKYLL_GID=$(id -g) build-site
+                        containerID=$(docker-compose ps -q build-site)
+
+                        while $(docker inspect -f '{{.State.Running}}' 
$containerID) != "false"; do
+                            sleep 1
+                        done
+
+                        docker logs $containerID
+                    '''
+                }
+                echo "Website assets built."
+            }
+        }
+
+        stage('Test') {
+            steps {
+                echo 'Testing....'
+            }
+        }
+
+        stage('Deploy') {
+            steps {
+                echo 'Deploying....'
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/site/docker-compose.yml b/site/docker-compose.yml
index 13b808c..d85b842 100644
--- a/site/docker-compose.yml
+++ b/site/docker-compose.yml
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-version: '3'
+version: '3.7'
 services:
   dev:
     image: jekyll/jekyll:3

Reply via email to