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}" } }