Skip to content
Snippets Groups Projects
Unverified Commit 4eb55ec4 authored by Mikaël Barbero's avatar Mikaël Barbero :dagger: Committed by GitHub
Browse files

Use new releng pipeline with previews (#22)

parent 8f37ad10
No related branches found
No related tags found
No related merge requests found
ARG NGINX_IMAGE_TAG=stable-alpine-for-hugo
FROM debian:10-slim AS builder
ARG HUGO_VERSION=0.76.5
ARG NODE_VERSION=10.15.0
RUN apt-get update && apt-get install -y \
build-essential \
ca-certificates \
curl \
git \
--no-install-recommends
RUN curl -L -o /tmp/node.tar.xz "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" \
&& mkdir -p /usr/local/lib/nodejs \
&& tar -xJf /tmp/node.tar.xz -C /usr/local/lib/nodejs \
&& ln -s /usr/local/lib/nodejs/node-v${NODE_VERSION}-linux-x64/bin/node /usr/bin/node \
&& ln -s /usr/local/lib/nodejs/node-v${NODE_VERSION}-linux-x64/bin/npm /usr/bin/npm \
&& ln -s /usr/local/lib/nodejs/node-v${NODE_VERSION}-linux-x64/bin/npx /usr/bin/npx
RUN curl -L -o /tmp/hugo.deb "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.deb" \
&& dpkg -i /tmp/hugo.deb
WORKDIR /workdir
COPY . /workdir/
RUN echo -n "Node.js version " && node --version \
&& echo -n "npm version " && npm --version \
&& hugo version
RUN npm --unsafe-perm ci \
&& hugo
FROM eclipsefdn/nginx:${NGINX_IMAGE_TAG}
COPY --from=builder /workdir/public/ /usr/share/nginx/html/
@Library('common-shared') _
@Library('releng-pipeline') _
hugoWebsitePipeline appname: 'lts.eclipse.org'
hugo (
appName: 'lts.eclipse.org',
productionDomain: 'lts.eclipse.org'
)
local deployment = import "../../releng/hugo-websites/kube-deployment.jsonnet";
deployment.newProductionDeploymentWithStaging(
"lts.eclipse.org", "lts-staging.eclipse.org"
)
[build]
publish = "public"
command = "npm run build_netlify && hugo --gc --minify -b https://eclipsefdn-lts.netlify.com"
[build.environment]
NODE_VERSION = "12.18.3"
[context.production.environment]
HUGO_VERSION = "0.76.5"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
[context.split1]
command = "npm run build_netlify && hugo --gc --minify --enableGitInfo"
[context.split1.environment]
HUGO_VERSION = "0.76.5"
HUGO_ENV = "production"
[context.deploy-preview]
command = "npm run build_netlify && hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
[context.deploy-preview.environment]
HUGO_VERSION = "0.76.5"
[context.branch-deploy]
command = "npm run build_netlify && hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.branch-deploy.environment]
HUGO_VERSION = "0.76.5"
[context.next.environment]
HUGO_ENABLEGITINFO = "true"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment