Install node
Some checks failed
tombutcher.work/tombutcher-ui/pipeline/head There was a failure building this commit
Some checks failed
tombutcher.work/tombutcher-ui/pipeline/head There was a failure building this commit
This commit is contained in:
parent
21a07a3fda
commit
a7b5408c5e
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
@ -6,9 +6,25 @@ pipeline {
|
|||||||
CLOUDFLARE_ACCOUNT_ID = credentials('cloudflare-account-id')
|
CLOUDFLARE_ACCOUNT_ID = credentials('cloudflare-account-id')
|
||||||
CLOUDFLARE_API_TOKEN = credentials('cloudflare-api-token')
|
CLOUDFLARE_API_TOKEN = credentials('cloudflare-api-token')
|
||||||
PROJECT_NAME = 'tombutcher-ui'
|
PROJECT_NAME = 'tombutcher-ui'
|
||||||
|
NODE_VERSION = '23.11.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
|
stage('Install Node.js') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
// Install NVM and Node.js if not already installed
|
||||||
|
sh ''
|
||||||
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
|
||||||
|
export NVM_DIR="$HOME/.nvm"
|
||||||
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||||
|
nvm install $NODE_VERSION
|
||||||
|
nvm use $NODE_VERSION
|
||||||
|
nvm alias default $NODE_VERSION
|
||||||
|
''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Checkout') {
|
stage('Checkout') {
|
||||||
steps {
|
steps {
|
||||||
checkout scm
|
checkout scm
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user