From 50cbec1dc80010d3ce3afd68e8765c042f7bb0c5 Mon Sep 17 00:00:00 2001 From: Anton Iakimov Date: Tue, 29 Oct 2024 11:47:55 +0100 Subject: [PATCH] ci: fix paths --- ci/Jenkinsfile | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index 4c76dbf..3133ce2 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -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}" } }