38 lines
1.1 KiB
Groovy
38 lines
1.1 KiB
Groovy
pipeline {
|
|
agent any
|
|
|
|
stages {
|
|
stage('Checkout SCM') {
|
|
steps {
|
|
checkout([$class: 'GitSCM', branches: [[name: '**']],
|
|
doGenerateSubmoduleConfigurations: false,
|
|
extensions: [],
|
|
userRemoteConfigs: [[url: 'http://172.20.0.2:3000/Ismail/NodeMap', credentialsId: 'd378f013-2f24-417b-9afd-33df5d410ab8']]])
|
|
}
|
|
}
|
|
stage('Check Node.js Version') {
|
|
steps {
|
|
script {
|
|
def nodeVersion = sh(script: 'node --version', returnStdout: true).trim()
|
|
echo "Node.js version: ${nodeVersion}"
|
|
}
|
|
}
|
|
}
|
|
stage('Install Dependencies') {
|
|
steps {
|
|
script {
|
|
sh 'npm install'
|
|
}
|
|
}
|
|
}
|
|
stage('Run Unit Tests') {
|
|
steps {
|
|
script {
|
|
sh 'npm test'
|
|
}
|
|
}
|
|
}
|
|
// Weitere Stages ...
|
|
}
|
|
}
|