From c813d7d613dc3fc1481df0bc35a3ba26208cced1 Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Tue, 7 Feb 2017 12:18:04 +0100
Subject: [PATCH] [Jenkins] Build web.

---
 scripts/jenkins/gcc.groovy | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/scripts/jenkins/gcc.groovy b/scripts/jenkins/gcc.groovy
index 788193ea703..fcb27cec2f6 100644
--- a/scripts/jenkins/gcc.groovy
+++ b/scripts/jenkins/gcc.groovy
@@ -20,6 +20,9 @@ def helper = new ogs.helper()
 def image = docker.image('ogs6/gcc-gui:latest')
 image.pull()
 image.inside(defaultDockerArgs) {
+    stage('Install prerequisites Web') {
+        sh 'cd ogs/web && yarn && sudo -H pip install -r requirements.txt'
+    }
     stage('Configure (Linux-Docker)') {
         configure.linux(cmakeOptions: defaultCMakeOptions, script: this)
     }
@@ -32,6 +35,10 @@ image.inside(defaultDockerArgs) {
         build.linux(script: this, target: 'tests ctest')
     }
 
+    stage('Web (Linux-Docker)') {
+        build.linux(script: this, target: 'web')
+    }
+
     stage('Data Explorer (Linux-Docker)') {
         configure.linux(
             cmakeOptions: defaultCMakeOptions + guiCMakeOptions,
@@ -45,5 +52,8 @@ image.inside(defaultDockerArgs) {
 stage('Post (Linux-Docker)') {
     post.publishTestReports 'build/Testing/**/*.xml', 'build/Tests/testrunner.xml',
         'ogs/scripts/jenkins/clang-log-parser.rules'
+    publishHTML(target: [allowMissing: false, alwaysLinkToLastBuild: false,
+        keepAll: false, reportDir: 'ogs/web/public', reportFiles: 'index.html',
+        reportName: 'Web'])
     post.cleanup()
 }
-- 
GitLab