← azuredeploy

Add jenkins file

bbacb54bc9670831bfd2825095f23a3f8498719a · ovidiucs · Mar 1, 2024 19:03

+42 · 1 file changed

  • jenkins/Jenkinsfile +42 −0
diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile
index e69de29..007f511 100644
--- a/jenkins/Jenkinsfile
+++ b/jenkins/Jenkinsfile
@@ -0,0 +1,42 @@
+pipeline {
+    agent any
+    
+    triggers {
+        githubPush(branch: 'main') // Trigger on main branch commit
+    }
+    
+    stages {
+        stage('Checkout') {
+            steps {
+                checkout scm
+            }
+        }
+        
+        stage('Build') {
+            steps {
+                // Add your build steps here
+                sh 'echo clean' // Example Maven build step
+            }
+        }
+        
+        stage('Test') {
+            steps {
+                // Add your test steps here
+                sh 'echo test' // Example Maven test step
+            }
+        }
+        
+        // Add more stages as needed
+    }
+    
+    post {
+        success {
+            // Add actions to perform after a successful build
+            echo 'Build successful'
+        }
+        failure {
+            // Add actions to perform after a failed build
+            echo 'Build failed'
+        }
+    }
+}