Jenkinsfile add

This commit is contained in:
egelhaus 2025-03-10 08:55:42 +01:00 committed by GitHub
parent eccd833d0b
commit 775547dd7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 46 additions and 0 deletions

46
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,46 @@
# This is required by the Integrations "Postiz-CI/CD"
pipeline {
agent any
environment {
NODE_VERSION = '20.17.0'
}
stages {
stage('Checkout Repository') {
steps {
checkout scm
}
}
stage('Setup Node.js') {
steps {
script {
sh "curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash -"
sh "sudo apt-get install -y nodejs"
}
}
}
stage('Install Dependencies') {
steps {
sh 'npm ci'
}
}
stage('Build Project') {
steps {
sh 'npm run build'
}
}
}
post {
success {
echo 'Build completed successfully!'
}
failure {
echo 'Build failed!'
}
}
}