From 5301530c70095085a19d6dc98fa0d52936d61de6 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Sun, 28 Dec 2025 18:24:24 +0000 Subject: [PATCH] Added cloudflare api token and ensuring wrangler is installed. --- Jenkinsfile | 5 +++-- package.json | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2e83818..3022d4b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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 { diff --git a/package.json b/package.json index f4cca14..22d88c7 100644 --- a/package.json +++ b/package.json @@ -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",