update CI

This commit is contained in:
Sasha 2023-10-30 13:25:30 +01:00
parent e23402372b
commit 6d789a9dab
No known key found for this signature in database

12
ci/Jenkinsfile vendored
View File

@ -43,6 +43,7 @@ pipeline {
stage('noise-js') { steps { script { buildExample() } } }
stage('noise-rtc') { steps { script { buildExample() } } }
stage('relay-direct-rtc') { steps { script { buildExample() } } }
stage('rln-js') { steps { script { buildNextJSExample() } } }
}
}
@ -51,7 +52,6 @@ pipeline {
stage('relay-js') { steps { script { copyExample() } } }
stage('store-js') { steps { script { copyExample() } } }
stage('light-js') { steps { script { copyExample() } } }
stage('rln-js') { steps { script { copyExample() } } }
stage('light-chat') { steps { script { copyExample() } } }
}
}
@ -86,3 +86,13 @@ def copyExample(example=STAGE_NAME) {
sh "mkdir -p ${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}"
}
}