add example to CI

This commit is contained in:
Sasha 2024-01-22 23:20:31 +01:00
parent cbb436ad35
commit 20bac0582f
No known key found for this signature in database
2 changed files with 3 additions and 12 deletions

View File

@ -20,7 +20,8 @@ jobs:
web-chat, web-chat,
noise-js, noise-js,
noise-rtc, noise-rtc,
relay-direct-rtc relay-direct-rtc,
rln-js
] ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

12
ci/Jenkinsfile vendored
View File

@ -43,7 +43,7 @@ pipeline {
stage('noise-js') { steps { script { buildExample() } } } stage('noise-js') { steps { script { buildExample() } } }
stage('noise-rtc') { steps { script { buildExample() } } } stage('noise-rtc') { steps { script { buildExample() } } }
stage('relay-direct-rtc') { steps { script { buildExample() } } } stage('relay-direct-rtc') { steps { script { buildExample() } } }
stage('rln-js') { steps { script { buildNextJSExample() } } } stage('rln-js') { steps { script { buildExample() } } }
} }
} }
@ -86,13 +86,3 @@ def copyExample(example=STAGE_NAME) {
sh "mkdir -p ${dest}" sh "mkdir -p ${dest}"
sh "cp -r ${source}/. ${dest}" sh "cp -r ${source}/. ${dest}"
} }
def buildNextJSExample(example=STAGE_NAME) {
def dest = "${WORKSPACE}/build/docs/${example}"
dir("examples/${example}") {
sh 'npm install --silent'
sh 'npm run build'
sh "mkdir -p ${dest}"
sh "cp -r out/* ${dest}"
}
}