소스 검색

let's try a Jenkinsfile

nossr50 4 일 전
부모
커밋
085197abc0
1개의 변경된 파일37개의 추가작업 그리고 0개의 파일을 삭제
  1. 37 0
      Jenkinsfile

+ 37 - 0
Jenkinsfile

@@ -0,0 +1,37 @@
+pipeline {
+    agent any
+
+    tools {
+        jdk 'jdk17'
+    }
+
+    options {
+        timestamps()
+        disableConcurrentBuilds()
+    }
+
+    stages {
+        stage('Checkout') {
+            steps {
+                checkout scm
+            }
+        }
+
+        stage('Build') {
+            steps {
+                sh '''
+                    ./mvnw -V -B clean package
+                '''
+            }
+        }
+    }
+
+    post {
+        success {
+            echo 'Build succeeded'
+        }
+        failure {
+            echo 'Build failed'
+        }
+    }
+}