Skip to content

Commit

Permalink
ci: fix paths
Browse files Browse the repository at this point in the history
  • Loading branch information
yakimant committed Oct 29, 2024
1 parent 97be344 commit 50cbec1
Showing 1 changed file with 4 additions and 24 deletions.
28 changes: 4 additions & 24 deletions ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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') } } }
}
}

Expand All @@ -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}"
}
}

Expand Down

0 comments on commit 50cbec1

Please sign in to comment.