Split ubuntu deploy out into steps.
Some checks are pending
farmcontrol/farmcontrol-ui/pipeline/head Build started...

This commit is contained in:
Tom Butcher 2026-02-01 22:25:36 +00:00
parent a54d331749
commit 56ff1962dd

22
Jenkinsfile vendored
View File

@ -1,11 +1,31 @@
def deploy() { def deploy() {
node('ubuntu') { node('ubuntu') {
try { try {
stage('Deploy (Ubuntu)') { stage('Checkout (Ubuntu)') {
checkout scm checkout scm
}
stage('Setup Node.js (Ubuntu)') {
nodejs(nodeJSInstallationName: 'Node23') {
sh 'node -v'
sh 'pnpm -v'
}
}
stage('Install Dependencies (Ubuntu)') {
nodejs(nodeJSInstallationName: 'Node23') { nodejs(nodeJSInstallationName: 'Node23') {
sh 'pnpm install --frozen-lockfile --production=false' sh 'pnpm install --frozen-lockfile --production=false'
}
}
stage('Build (Ubuntu)') {
nodejs(nodeJSInstallationName: 'Node23') {
sh 'NODE_ENV=production pnpm build' sh 'NODE_ENV=production pnpm build'
}
}
stage('Deploy (Ubuntu)') {
nodejs(nodeJSInstallationName: 'Node23') {
// Deploy to Cloudflare Pages using wrangler // Deploy to Cloudflare Pages using wrangler
withCredentials([string(credentialsId: 'cloudflare-api-token', variable: 'CLOUDFLARE_API_TOKEN')]) { withCredentials([string(credentialsId: 'cloudflare-api-token', variable: 'CLOUDFLARE_API_TOKEN')]) {
sh 'pnpm wrangler pages deploy build' sh 'pnpm wrangler pages deploy build'