You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2019/01/02 09:41:24 UTC

[camel-website] branch pnp created (now 9b1e596)

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

zregvart pushed a change to branch pnp
in repository https://gitbox.apache.org/repos/asf/camel-website.git.


      at 9b1e596  CAMEL-11500: utilize caches and separate Theme ...

This branch includes the following new commits:

     new bdba260  CAMEL-11500: use PnP
     new 9b1e596  CAMEL-11500: utilize caches and separate Theme ...

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[camel-website] 01/02: CAMEL-11500: use PnP

Posted by zr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zregvart pushed a commit to branch pnp
in repository https://gitbox.apache.org/repos/asf/camel-website.git

commit bdba26013a6919feefdcbae50c1bb9cd993dc1f1
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Mon Dec 31 10:21:59 2018 +0100

    CAMEL-11500: use PnP
---
 .gitignore                   | 4 +++-
 antora-ui-camel/package.json | 3 +++
 package.json                 | 3 +++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index f174892..bbcdae5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,4 +6,6 @@ static
 *.iml
 .project
 .classpath
-.metadata
\ No newline at end of file
+.metadata
+.pnp
+.pnp.js
diff --git a/antora-ui-camel/package.json b/antora-ui-camel/package.json
index e84238b..045b6c3 100644
--- a/antora-ui-camel/package.json
+++ b/antora-ui-camel/package.json
@@ -50,5 +50,8 @@
     "typeface-open-sans": "^0.0.54",
     "vinyl-buffer": "~1.0",
     "vinyl-fs": "~3.0"
+  },
+  "installConfig": {
+    "pnp": true
   }
 }
diff --git a/package.json b/package.json
index fd249dc..7dd039e 100644
--- a/package.json
+++ b/package.json
@@ -17,5 +17,8 @@
     "gulp-htmlmin": "^5.0.1",
     "hugo-cli": "^0.9.0",
     "npm-run-all": "^4.1.5"
+  },
+  "installConfig": {
+    "pnp": true
   }
 }


[camel-website] 02/02: CAMEL-11500: utilize caches and separate Theme ...

Posted by zr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zregvart pushed a commit to branch pnp
in repository https://gitbox.apache.org/repos/asf/camel-website.git

commit 9b1e59624c4dbcce6858297a32c6360bb69d5f02
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Wed Dec 19 15:21:15 2018 +0100

    CAMEL-11500: utilize caches and separate Theme ...
    
    ...and Website stages
    
    Make sure that caches are preserved between builds by checking out into
    a `camel-website` subdirectory and utilizing $WORKSPACE as $HOME for any
    cache folders. Also separates Theme and Website stages to make for a
    cleaner build by not invoking yarn from yarn.
---
 Jenkinsfile  | 34 ++++++++++++++++++++++++++--------
 package.json |  3 +--
 2 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 3a8d177..72de3be 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -28,10 +28,19 @@ pipeline {
         buildDiscarder(
             logRotator(artifactNumToKeepStr: '5', numToKeepStr: '10')
         )
+
+        checkoutToSubdirectory('camel-website')
+    }
+
+    environment {
+        HOME              = "$WORKSPACE"
+        ANTORA_CACHE_DIR  = "$WORKSPACE/.antora-cache"
+        YARN_CACHE_FOLDER = "$WORKSPACE/.yarn-cache"
+        HUGO_VERSION      = "0.52.0"
     }
 
     stages {
-        stage('Build') {
+        stage('Theme') {
             agent {
                 docker {
                     label "$NODE"
@@ -40,15 +49,24 @@ pipeline {
                 }
             }
 
-            environment {
-                ANTORA_CACHE_DIR  = "$WORKSPACE/.antora-cache"
-                YARN_CACHE_FOLDER = "$WORKSPACE/.yarn-cache"
-                HUGO_VERSION      = "0.52.0"
+            steps {
+                sh "cd $WORKSPACE/camel-website/antora-ui-camel && yarn --non-interactive --frozen-lockfile install"
+                sh "cd $WORKSPACE/camel-website/antora-ui-camel && yarn --non-interactive gulp bundle"
+            }
+        }
+
+        stage('Website') {
+            agent {
+                docker {
+                    label "$NODE"
+                    image "$NODE_IMAGE"
+                    reuseNode true
+                }
             }
 
             steps {
-                sh "yarn --non-interactive --frozen-lockfile install"
-                sh "yarn --non-interactive build"
+                sh "cd $WORKSPACE/camel-website && yarn --non-interactive --frozen-lockfile install"
+                sh "cd $WORKSPACE/camel-website && yarn --non-interactive build"
             }
         }
 
@@ -62,7 +80,7 @@ pipeline {
                     deleteDir()
                     sh 'git clone -b asf-site https://gitbox.apache.org/repos/asf/camel-website.git .'
                     sh 'git rm -r *'
-                    sh "cp -R $WORKSPACE/public/* ."
+                    sh "cp -R $WORKSPACE/camel-website/public/* ."
                     sh 'git add .'
                     sh 'git commit -m "Website updated to $(git rev-parse --short HEAD)"'
                     sh 'git push origin asf-site'
diff --git a/package.json b/package.json
index 7dd039e..b046019 100644
--- a/package.json
+++ b/package.json
@@ -2,12 +2,11 @@
   "version": "1.0.0-SNAPSHOT",
   "license": "Apache-2.0",
   "scripts": {
-    "theme": "(cd antora-ui-camel && yarn install && yarn gulp bundle)",
     "documentation": "antora --clean --fetch site.yml",
     "website": "hugo --minify",
     "critical": "gulp critical",
     "minify": "gulp minify",
-    "build": "run-s theme documentation website minify critical"
+    "build": "run-s documentation website minify critical"
   },
   "devDependencies": {
     "@antora/cli": "^2.0.0",