Upload artifacts to ci.
Some checks reported errors
farmcontrol/farmcontrol-ui/pipeline/head Something is wrong with the build of this commit

This commit is contained in:
Tom Butcher 2025-12-28 18:04:32 +00:00
parent 375e32a356
commit 21f61229e4

14
Jenkinsfile vendored
View File

@ -20,7 +20,6 @@ def deploy() {
def buildOnLabel(label, buildCommand) { def buildOnLabel(label, buildCommand) {
return { return {
node(label) { node(label) {
try {
stage("Checkout (${label})") { stage("Checkout (${label})") {
checkout scm checkout scm
} }
@ -51,23 +50,14 @@ def buildOnLabel(label, buildCommand) {
nodejs(nodeJSInstallationName: 'Node23') { nodejs(nodeJSInstallationName: 'Node23') {
if (isUnix()) { if (isUnix()) {
sh "NODE_ENV=production ${buildCommand}" sh "NODE_ENV=production ${buildCommand}"
sh 'ls -la build || echo "Build directory not found"'
} else { } else {
bat "set NODE_ENV=production && ${buildCommand}" bat "set NODE_ENV=production && ${buildCommand}"
bat 'if not exist build echo "Build directory not found"'
} }
} }
} }
stage("Verify Build (${label})") { stage("Archive Artifacts (${label})") {
if (isUnix()) { archiveArtifacts artifacts: 'app_dist/**/*.dmg, app_dist/**/*.exe', fingerprint: true
sh 'test -d build || (echo "Build directory does not exist" && exit 1)'
} else {
bat 'if not exist build (echo "Build directory does not exist" && exit 1)'
}
}
} finally {
cleanWs()
} }
} }
} }