Use yarn for ci.
Some checks failed
farmcontrol/farmcontrol-ui/pipeline/head There was a failure building this commit
Some checks failed
farmcontrol/farmcontrol-ui/pipeline/head There was a failure building this commit
This commit is contained in:
parent
9ef8874418
commit
e74d88d286
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
@ -4,8 +4,8 @@ def deploy() {
|
|||||||
stage('Deploy (Ubuntu)') {
|
stage('Deploy (Ubuntu)') {
|
||||||
checkout scm
|
checkout scm
|
||||||
nodejs(nodeJSInstallationName: 'Node23') {
|
nodejs(nodeJSInstallationName: 'Node23') {
|
||||||
sh 'npm ci --include=dev'
|
sh 'yarn install --frozen-lockfile'
|
||||||
sh 'npm run build'
|
sh 'yarn build'
|
||||||
// Deploy to Cloudflare Pages using wrangler
|
// Deploy to Cloudflare Pages using wrangler
|
||||||
// CLOUDFLARE_API_TOKEN should be set as a Jenkins credential/env variable
|
// CLOUDFLARE_API_TOKEN should be set as a Jenkins credential/env variable
|
||||||
sh 'npx wrangler pages deploy build'
|
sh 'npx wrangler pages deploy build'
|
||||||
@ -30,10 +30,10 @@ def buildOnLabel(label, buildCommand) {
|
|||||||
nodejs(nodeJSInstallationName: 'Node23') {
|
nodejs(nodeJSInstallationName: 'Node23') {
|
||||||
if (isUnix()) {
|
if (isUnix()) {
|
||||||
sh 'node -v'
|
sh 'node -v'
|
||||||
sh 'npm -v'
|
sh 'yarn -v'
|
||||||
} else {
|
} else {
|
||||||
bat 'node -v'
|
bat 'node -v'
|
||||||
bat 'npm -v'
|
bat 'yarn -v'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -41,9 +41,9 @@ def buildOnLabel(label, buildCommand) {
|
|||||||
stage("Install Dependencies (${label})") {
|
stage("Install Dependencies (${label})") {
|
||||||
nodejs(nodeJSInstallationName: 'Node23') {
|
nodejs(nodeJSInstallationName: 'Node23') {
|
||||||
if (isUnix()) {
|
if (isUnix()) {
|
||||||
sh 'npm ci --include=dev'
|
sh 'yarn install --frozen-lockfile'
|
||||||
} else {
|
} else {
|
||||||
bat 'npm ci --include=dev'
|
bat 'yarn install --frozen-lockfile'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -76,8 +76,8 @@ def buildOnLabel(label, buildCommand) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
parallel(
|
parallel(
|
||||||
'Windows Build': buildOnLabel('windows', 'npm run build:electron'),
|
'Windows Build': buildOnLabel('windows', 'yarn build:electron'),
|
||||||
'MacOS Build': buildOnLabel('macos', 'npm run build:electron'),
|
'MacOS Build': buildOnLabel('macos', 'yarn build:electron'),
|
||||||
'Ubuntu Deploy': { deploy() }
|
'Ubuntu Deploy': { deploy() }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user