mirror of
https://github.com/waku-org/js-waku.git
synced 2025-01-12 21:44:33 +00:00
ci: build examples and deply in a subfolder (#432)
This commit is contained in:
parent
b257885204
commit
e4888f779c
@ -13,28 +13,51 @@ pipeline {
|
||||
environment {
|
||||
GIT_AUTHOR_NAME = 'status-im-auto'
|
||||
GIT_AUTHOR_EMAIL = 'auto@status.im'
|
||||
PUPPETEER_SKIP_DOWNLOAD = 'true'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Install Deps') {
|
||||
stage('Deps') {
|
||||
steps {
|
||||
sh 'yarn install'
|
||||
sh 'npm install'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'yarn run doc'
|
||||
sh 'npm run build'
|
||||
sh 'npm run doc'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Publish Prod') {
|
||||
when { expression { GIT_BRANCH.endsWith('docs-build') } }
|
||||
stage('Examples') {
|
||||
parallel {
|
||||
stage('web-chat') { steps { script { buildExample() } } }
|
||||
stage('eth-pm') { steps { script { buildExample() } } }
|
||||
stage('eth-pm-wallet-encryption') { steps { script { buildExample() } } }
|
||||
}
|
||||
}
|
||||
|
||||
stage('Publish') {
|
||||
when { expression { GIT_BRANCH.endsWith('build-examples') } }
|
||||
steps { script {
|
||||
sshagent(credentials: ['status-im-auto-ssh']) {
|
||||
sh 'yarn run deploy'
|
||||
sh 'npm run deploy'
|
||||
}
|
||||
} }
|
||||
}
|
||||
}
|
||||
post {
|
||||
always { cleanWs() }
|
||||
}
|
||||
}
|
||||
|
||||
def buildExample(example=STAGE_NAME) {
|
||||
def dest = "${WORKSPACE}/build/docs/examples/${example}"
|
||||
dir("examples/${example}") {
|
||||
sh 'npm install'
|
||||
sh 'npm run build'
|
||||
sh "mkdir -p ${dest}"
|
||||
sh "cp -r build/. ${dest}"
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
"eth-sig-util": "^3.0.1",
|
||||
"ethers": "^5.5.3",
|
||||
"fontsource-roboto": "^4.0.0",
|
||||
"js-waku": "../../build/main",
|
||||
"js-waku": "file:../../build/main",
|
||||
"protobufjs": "^6.11.2",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2"
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "eth-pm-wallet-encryption",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"homepage": "/js-waku/eth-pm-wallet",
|
||||
"homepage": "/examples/eth-pm-wallet-encryption",
|
||||
"dependencies": {
|
||||
"@material-ui/core": "^4.12.3",
|
||||
"@material-ui/icons": "^4.11.2",
|
||||
@ -15,7 +15,7 @@
|
||||
"eth-sig-util": "^3.0.1",
|
||||
"ethers": "^5.5.3",
|
||||
"fontsource-roboto": "^4.0.0",
|
||||
"js-waku": "../../build/main",
|
||||
"js-waku": "file:../../build/main",
|
||||
"protobufjs": "^6.11.2",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2"
|
||||
|
2
examples/eth-pm/package-lock.json
generated
2
examples/eth-pm/package-lock.json
generated
@ -19,7 +19,7 @@
|
||||
"eth-sig-util": "^3.0.1",
|
||||
"ethers": "^5.5.3",
|
||||
"fontsource-roboto": "^4.0.0",
|
||||
"js-waku": "../../build/main",
|
||||
"js-waku": "file:../../build/main",
|
||||
"protobufjs": "^6.11.2",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2"
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "eth-pm",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"homepage": "/js-waku/eth-pm",
|
||||
"homepage": "/examples/eth-pm",
|
||||
"dependencies": {
|
||||
"@material-ui/core": "^4.12.3",
|
||||
"@material-ui/icons": "^4.11.2",
|
||||
@ -15,7 +15,7 @@
|
||||
"eth-sig-util": "^3.0.1",
|
||||
"ethers": "^5.5.3",
|
||||
"fontsource-roboto": "^4.0.0",
|
||||
"js-waku": "../../build/main",
|
||||
"js-waku": "file:../../build/main",
|
||||
"protobufjs": "^6.11.2",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2"
|
||||
|
2
examples/relay-reactjs-chat/package-lock.json
generated
2
examples/relay-reactjs-chat/package-lock.json
generated
@ -11,7 +11,7 @@
|
||||
"@testing-library/jest-dom": "^5.16.1",
|
||||
"@testing-library/react": "^12.1.2",
|
||||
"@testing-library/user-event": "^13.5.0",
|
||||
"js-waku": "../../build/esm",
|
||||
"js-waku": "file:../../build/esm",
|
||||
"protons": "^2.0.3",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
|
@ -6,7 +6,7 @@
|
||||
"@testing-library/jest-dom": "^5.16.1",
|
||||
"@testing-library/react": "^12.1.2",
|
||||
"@testing-library/user-event": "^13.5.0",
|
||||
"js-waku": "../../build/esm",
|
||||
"js-waku": "file:../../build/esm",
|
||||
"protons": "^2.0.3",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
|
2
examples/store-reactjs-chat/package-lock.json
generated
2
examples/store-reactjs-chat/package-lock.json
generated
@ -14,7 +14,7 @@
|
||||
"assert": "^2.0.0",
|
||||
"buffer": "^6.0.3",
|
||||
"crypto-browserify": "^3.12.0",
|
||||
"js-waku": "../../build/esm",
|
||||
"js-waku": "file:../../build/esm",
|
||||
"protons": "^2.0.3",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
|
@ -9,7 +9,7 @@
|
||||
"assert": "^2.0.0",
|
||||
"buffer": "^6.0.3",
|
||||
"crypto-browserify": "^3.12.0",
|
||||
"js-waku": "../../build/esm",
|
||||
"js-waku": "file:../../build/esm",
|
||||
"protons": "^2.0.3",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
|
2
examples/web-chat/package-lock.json
generated
2
examples/web-chat/package-lock.json
generated
@ -11,7 +11,7 @@
|
||||
"@livechat/ui-kit": "^0.5.0-20",
|
||||
"buffer": "^6.0.3",
|
||||
"crypto-browserify": "^3.12.0",
|
||||
"js-waku": "../../build/main",
|
||||
"js-waku": "file:../../build/main",
|
||||
"process": "^0.11.10",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
|
@ -2,12 +2,12 @@
|
||||
"name": "web-chat",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"homepage": "/js-waku",
|
||||
"homepage": "/examples/web-chat",
|
||||
"dependencies": {
|
||||
"@livechat/ui-kit": "^0.5.0-20",
|
||||
"buffer": "^6.0.3",
|
||||
"crypto-browserify": "^3.12.0",
|
||||
"js-waku": "../../build/main",
|
||||
"js-waku": "file:../../build/main",
|
||||
"process": "^0.11.10",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
|
@ -48,6 +48,7 @@
|
||||
"doc": "run-s doc:*",
|
||||
"doc:html": "typedoc --excludeInternal --listInvalidSymbolLinks --exclude **/*.spec.ts --out build/docs src/",
|
||||
"doc:cname": "echo 'js-waku.wakuconnect.dev' > build/docs/CNAME",
|
||||
"doc:examples": "mkdir -p build/docs/examples",
|
||||
"deploy": "node ci/deploy.js",
|
||||
"reset-hard": "git clean -dfx && git reset --hard && npm i && npm run build && for d in examples/*; do (cd $d; npm i); done"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user