Merge pull request #1455 from johndoe6345789/codex/add-jenkinsfile-to-download-npm/node

Download Node in Jenkins pipeline
This commit is contained in:
2026-01-13 21:56:28 +00:00
committed by GitHub

18
Jenkinsfile vendored
View File

@@ -1,6 +1,13 @@
pipeline {
agent any
environment {
NODE_VERSION = '20.11.1'
NODE_DIST = "node-v${NODE_VERSION}-linux-x64"
NODE_HOME = "${WORKSPACE}/${NODE_DIST}"
PATH = "${NODE_HOME}/bin:${env.PATH}"
}
options {
timestamps()
}
@@ -12,6 +19,17 @@ pipeline {
}
}
stage('Download Node') {
steps {
sh '''
curl -fsSLO https://nodejs.org/dist/v${NODE_VERSION}/${NODE_DIST}.tar.xz
tar -xJf ${NODE_DIST}.tar.xz
node --version
npm --version
'''
}
}
stage('Install') {
steps {
sh 'npm ci'