ci: fix paths

This commit is contained in:
Anton Iakimov 2024-10-29 11:47:55 +01:00
parent 97be344b01
commit 50cbec1dc8
No known key found for this signature in database
1 changed files with 4 additions and 24 deletions

28
ci/Jenkinsfile vendored
View File

@ -43,8 +43,8 @@ pipeline {
stage('experimental/rln-identity') { steps { script { buildExample() } } }
stage('dogfooding') { steps { script { buildExample() } } }
stage('message-monitor') { steps { script { buildExample() } } }
stage('flush-notes') { steps { script { buildNextJSExample() } } }
stage('buddybook') { steps { script { buildViteExample() } } }
stage('flush-notes') { steps { script { buildExample(outDir='out') } } }
stage('buddybook') { steps { script { buildExample(outDir='dist') } } }
}
}
@ -69,33 +69,13 @@ pipeline {
}
}
def buildExample(example=STAGE_NAME) {
def buildExample(example=STAGE_NAME, outDir=build) {
def dest = "${WORKSPACE}/build/docs/${example}"
dir("examples/${example}") {
sh 'npm install --silent'
sh 'npm run build'
sh "mkdir -p ${dest}"
sh "cp -r build/. ${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}"
}
}
def buildViteExample(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 dist/. ${dest}"
sh "cp -r ${outDir}/. ${dest}"
}
}