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/03/03 17:57:41 UTC

[camel-website] branch pr/caching created (now 4f3a487)

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

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


      at 4f3a487  test caching using Docker layers

This branch includes the following new commits:

     new 4f3a487  test caching using Docker layers

The 1 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/01: test caching using Docker layers

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

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

commit 4f3a487dc414e8852916e0c22bcf783e57e84c38
Author: Zoran Regvart <zr...@gmail.com>
AuthorDate: Sun Mar 3 18:44:46 2019 +0100

    test caching using Docker layers
---
 .dockerignore                             |  7 +++++++
 .github/action-website/Dockerfile         | 26 --------------------------
 .github/main.workflow                     | 10 +++++-----
 Dockerfile                                | 27 ++++++++++++++++++++++++++-
 antora-ui-camel/package.json              |  3 ---
 package.json                              |  2 +-
 .github/action-website/publish => publish |  0
 7 files changed, 39 insertions(+), 36 deletions(-)

diff --git a/.dockerignore b/.dockerignore
index 91224e5..320641a 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1 +1,8 @@
 **/*
+!publish
+!package.json
+!yarn.lock
+!.yarnrc
+!antora-ui-camel/package.json
+!antora-ui-camel/yarn.lock
+
diff --git a/.github/action-website/Dockerfile b/.github/action-website/Dockerfile
deleted file mode 100644
index a10d51d..0000000
--- a/.github/action-website/Dockerfile
+++ /dev/null
@@ -1,26 +0,0 @@
-FROM node:10-stretch
-
-LABEL "com.github.actions.name"="Camel Website tooling"
-LABEL "com.github.actions.description"="Nodejs with tools for Camel Website"
-LABEL "com.github.actions.icon"="package"
-LABEL "com.github.actions.color"="orange"
-
-LABEL "repository"="https://github.com/apache/camel-website"
-LABEL "homepage"="https://camel.apache.org"
-LABEL "maintainer"="Camel Developers <de...@camel.apache.org>"
-
-RUN set -ex \
-  && apt-get update \
-  && apt-get install -y --no-install-recommends \
-    libasound2 \
-    libatk-bridge2.0-0 \
-    libgtk-3-0 \
-    libnss3 \
-    libx11-xcb1 \
-    libxss1 \
-    libxtst6 \
-    jq \
-  && rm -rf /var/lib/apt/lists/*
-
-ADD publish /usr/local/bin 
-
diff --git a/.github/main.workflow b/.github/main.workflow
index e0360e5..e260398 100644
--- a/.github/main.workflow
+++ b/.github/main.workflow
@@ -4,15 +4,15 @@ workflow "Build and publish the website" {
 }
 
 action "Build theme" {
-  uses = "./.github/action-website"
-  runs = "yarn"
+  uses = "."
+  runs = "yarn gulp"
   args = "--non-interactive --frozen-lockfile --cwd antora-ui-camel"
 }
 
 action "Build website" {
-  uses = "./.github/action-website"
+  uses = "."
   needs = ["Build theme"]
-  runs = "yarn"
+  runs = "yarn build"
   args = "--non-interactive --frozen-lockfile"
 }
 
@@ -23,7 +23,7 @@ action "On master branch" {
 }
 
 action "Publish" {
-  uses = "./.github/action-website"
+  uses = "."
   needs = ["On master branch"]
   runs = "publish"
   secrets = ["GITHUB_TOKEN"]
diff --git a/Dockerfile b/Dockerfile
index 62560b1..f64427e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,13 @@
-FROM node:lts-stretch
+FROM node:10-stretch
+
+LABEL "com.github.actions.name"="Camel Website tooling"
+LABEL "com.github.actions.description"="Nodejs with tools for Camel Website"
+LABEL "com.github.actions.icon"="package"
+LABEL "com.github.actions.color"="orange"
+
+LABEL "repository"="https://github.com/apache/camel-website"
+LABEL "homepage"="https://camel.apache.org"
+LABEL "maintainer"="Camel Developers <de...@camel.apache.org>"
 
 RUN set -ex \
   && apt-get update \
@@ -10,4 +19,20 @@ RUN set -ex \
     libx11-xcb1 \
     libxss1 \
     libxtst6 \
+    jq \
   && rm -rf /var/lib/apt/lists/*
+
+ADD publish /usr/local/bin
+
+ADD package.json /tmp
+ADD yarn.lock /tmp
+ADD .yarnrc /tmp
+
+RUN yarn --non-interactive --frozen-lockfile --cwd /tmp install
+
+ADD antora-ui-camel/package.json /tmp
+ADD antora-ui-camel/yarn.lock /tmp
+
+RUN yarn --non-interactive --frozen-lockfile --cwd /tmp install
+RUN rm -rf /tmp/*
+
diff --git a/antora-ui-camel/package.json b/antora-ui-camel/package.json
index a823402..e784905 100644
--- a/antora-ui-camel/package.json
+++ b/antora-ui-camel/package.json
@@ -10,9 +10,6 @@
   "engines": {
     "node": ">= 8.0.0"
   },
-  "scripts": {
-    "install": "gulp"
-  },
   "devDependencies": {
     "autoprefixer": "~9.4",
     "browserify": "~16.2",
diff --git a/package.json b/package.json
index bfc0a84..ab1512f 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,7 @@
     "website": "hugo --minify",
     "critical": "gulp critical",
     "minify": "gulp minify",
-    "install": "run-s documentation website minify critical"
+    "build": "run-s documentation website minify critical"
   },
   "devDependencies": {
     "@antora/cli": "^2.0.0",
diff --git a/.github/action-website/publish b/publish
similarity index 100%
rename from .github/action-website/publish
rename to publish