You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by GitBox <gi...@apache.org> on 2019/01/07 21:08:44 UTC

[GitHub] zregvart closed pull request #5: CAMEL-11500: PnP and better cache usage

zregvart closed pull request #5: CAMEL-11500: PnP and better cache usage
URL: https://github.com/apache/camel-website/pull/5
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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/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/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..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",
@@ -17,5 +16,8 @@
     "gulp-htmlmin": "^5.0.1",
     "hugo-cli": "^0.9.0",
     "npm-run-all": "^4.1.5"
+  },
+  "installConfig": {
+    "pnp": true
   }
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services