Added cloudflare api token and ensuring wrangler is installed.
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 18:24:24 +00:00
parent 21f61229e4
commit 5301530c70
2 changed files with 5 additions and 3 deletions

5
Jenkinsfile vendored
View File

@ -7,8 +7,9 @@ def deploy() {
sh 'yarn install --frozen-lockfile --production=false'
sh 'NODE_ENV=production 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'
withCredentials([string(credentialsId: 'cloudflare-api-token', variable: 'CLOUDFLARE_API_TOKEN')]) {
sh 'yarn wrangler pages deploy build'
}
}
}
} finally {

View File

@ -120,7 +120,8 @@
"vite": "^7.1.3",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-svgo": "^2.0.0",
"vite-plugin-svgr": "^4.5.0"
"vite-plugin-svgr": "^4.5.0",
"wrangler": "^3.100.0"
},
"build": {
"appId": "com.tombutcher.farmcontrol",