From 775547dd7fdbab4c566c96a98a4119fe70590e97 Mon Sep 17 00:00:00 2001 From: egelhaus <156946629+egelhaus@users.noreply.github.com> Date: Mon, 10 Mar 2025 08:55:42 +0100 Subject: [PATCH] Jenkinsfile add --- Jenkinsfile | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..2c941a6f --- /dev/null +++ b/Jenkinsfile @@ -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!' + } + } +} \ No newline at end of file