Use yarn for ci.
Some checks failed
farmcontrol/farmcontrol-ui/pipeline/head There was a failure building this commit

This commit is contained in:
Tom Butcher 2025-12-28 17:25:29 +00:00
parent 9ef8874418
commit e74d88d286

16
Jenkinsfile vendored
View File

@ -4,8 +4,8 @@ def deploy() {
stage('Deploy (Ubuntu)') {
checkout scm
nodejs(nodeJSInstallationName: 'Node23') {
sh 'npm ci --include=dev'
sh 'npm run build'
sh 'yarn install --frozen-lockfile'
sh 'yarn build'
// Deploy to Cloudflare Pages using wrangler
// CLOUDFLARE_API_TOKEN should be set as a Jenkins credential/env variable
sh 'npx wrangler pages deploy build'
@ -30,10 +30,10 @@ def buildOnLabel(label, buildCommand) {
nodejs(nodeJSInstallationName: 'Node23') {
if (isUnix()) {
sh 'node -v'
sh 'npm -v'
sh 'yarn -v'
} else {
bat 'node -v'
bat 'npm -v'
bat 'yarn -v'
}
}
}
@ -41,9 +41,9 @@ def buildOnLabel(label, buildCommand) {
stage("Install Dependencies (${label})") {
nodejs(nodeJSInstallationName: 'Node23') {
if (isUnix()) {
sh 'npm ci --include=dev'
sh 'yarn install --frozen-lockfile'
} else {
bat 'npm ci --include=dev'
bat 'yarn install --frozen-lockfile'
}
}
}
@ -76,8 +76,8 @@ def buildOnLabel(label, buildCommand) {
try {
parallel(
'Windows Build': buildOnLabel('windows', 'npm run build:electron'),
'MacOS Build': buildOnLabel('macos', 'npm run build:electron'),
'Windows Build': buildOnLabel('windows', 'yarn build:electron'),
'MacOS Build': buildOnLabel('macos', 'yarn build:electron'),
'Ubuntu Deploy': { deploy() }
)