Merge pull request #114 from waku-org/ci/docker-with-pnpm
ci: use Docker image with pnpm installed
This commit is contained in:
commit
7f8e019a11
|
@ -0,0 +1,13 @@
|
||||||
|
FROM node:16-alpine3.16
|
||||||
|
|
||||||
|
LABEL maintainer="jakub@status.im"
|
||||||
|
|
||||||
|
RUN apk --no-cache add openssh git
|
||||||
|
|
||||||
|
RUN npm install -g pnpm
|
||||||
|
|
||||||
|
# Jenkins user needs a specific UID/GID to work
|
||||||
|
RUN addgroup -g 1001 jenkins \
|
||||||
|
&& adduser -u 1001 -G jenkins -D jenkins
|
||||||
|
USER jenkins
|
||||||
|
ENV HOME="/home/jenkins"
|
|
@ -1,5 +1,10 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'linux' }
|
agent {
|
||||||
|
dockerfile {
|
||||||
|
label 'linux'
|
||||||
|
dir 'ci'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
options {
|
options {
|
||||||
disableConcurrentBuilds()
|
disableConcurrentBuilds()
|
||||||
|
@ -14,13 +19,14 @@ pipeline {
|
||||||
SITE_DOMAIN = 'examples.waku.org'
|
SITE_DOMAIN = 'examples.waku.org'
|
||||||
GIT_AUTHOR_NAME = 'status-im-auto'
|
GIT_AUTHOR_NAME = 'status-im-auto'
|
||||||
GIT_AUTHOR_EMAIL = 'auto@status.im'
|
GIT_AUTHOR_EMAIL = 'auto@status.im'
|
||||||
|
GIT_SSH_COMMAND = 'ssh -o StrictHostKeyChecking=no'
|
||||||
PUPPETEER_SKIP_DOWNLOAD = 'true'
|
PUPPETEER_SKIP_DOWNLOAD = 'true'
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Pre') {
|
stage('Pre') {
|
||||||
steps {
|
steps {
|
||||||
sh 'yarn install --no-lockfile'
|
sh 'pnpm install --silent'
|
||||||
/* TODO: Build the main page. */
|
/* TODO: Build the main page. */
|
||||||
sh 'mkdir -p build/docs'
|
sh 'mkdir -p build/docs'
|
||||||
}
|
}
|
||||||
|
@ -63,8 +69,8 @@ pipeline {
|
||||||
def buildExample(example=STAGE_NAME) {
|
def buildExample(example=STAGE_NAME) {
|
||||||
def dest = "${WORKSPACE}/build/docs/${example}"
|
def dest = "${WORKSPACE}/build/docs/${example}"
|
||||||
dir("${example}") {
|
dir("${example}") {
|
||||||
sh 'yarn install --network-concurrency 1 --no-lockfile'
|
sh 'pnpm install --silent'
|
||||||
sh 'yarn run build'
|
sh 'pnpm run build'
|
||||||
sh "mkdir -p ${dest}"
|
sh "mkdir -p ${dest}"
|
||||||
sh "cp -r build/. ${dest}"
|
sh "cp -r build/. ${dest}"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue