From 7bf401ed51dc5e5d9e12f3e9da10c7103200b4af Mon Sep 17 00:00:00 2001 From: Zoran Regvart Date: Fri, 4 Jan 2019 13:15:52 +0100 Subject: [PATCH] CAMEL-11500: for PnP to work we need Yarn 13+ Yarn 13+ patches `resolve` module to resolve from PnP[1]. [1] https://github.com/yarnpkg/yarn/pull/6816 --- .dockerignore | 1 + Dockerfile | 25 +++++++++++++++++++++++++ Jenkinsfile | 9 ++++----- 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000000..91224e5de82 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +**/* diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000000..63480637f49 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM node:lts-stretch + +ENV YARN_VERSION 1.13.0 + +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 \ + && rm -rf /var/lib/apt/lists/* + +RUN set -ex \ + && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \ + && curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \ + && gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ + && mkdir -p /opt \ + && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \ + && ln -fs /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \ + && ln -fs /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ +&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz diff --git a/Jenkinsfile b/Jenkinsfile index e7f5010b261..32829f8db75 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,6 @@ * under the License. */ def NODE = 'git-websites' -def NODE_IMAGE = 'circleci/node:11-browsers' pipeline { agent { @@ -42,9 +41,9 @@ pipeline { stages { stage('Theme') { agent { - docker { + dockerfile { + dir 'camel-website' label "$NODE" - image "$NODE_IMAGE" reuseNode true } } @@ -57,9 +56,9 @@ pipeline { stage('Website') { agent { - docker { + dockerfile { + dir 'camel-website' label "$NODE" - image "$NODE_IMAGE" reuseNode true } }