ソースを参照

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'
+        }
+    }
+}