Explorar o código

added steps to Jenkins pipeline

Bulat Yusupov %!s(int64=5) %!d(string=hai) anos
pai
achega
2dcbe01517
Modificáronse 1 ficheiros con 26 adicións e 0 borrados
  1. 26 0
      Jenkinsfile

+ 26 - 0
Jenkinsfile

@@ -1,3 +1,5 @@
+#!/usr/bin/env groovy
+
 pipeline {
 
     agent any
@@ -6,6 +8,30 @@ pipeline {
         stage('Test') {
             steps {
                 echo 'Test...'
+                sh 'ls -la'
+            }
+        }
+
+        stage('Merge master') {
+            steps {
+                script {
+                    git 'https://github.com/provectus/kafka-ui.git'
+                    sh 'git checkout release'
+                    sh 'git merge master'
+                    pom = readMavenPom file: 'pom.xml'
+                    tag = pom.version.replace("-SNAPSHOT", "")
+                    echo "Building version ${tag}"
+//                    sh "git tag -f v${tag}"
+//                    sh "git push -f --tags"
+                }
+            }
+        }
+        stage('Build') {
+            tools {
+                maven 'mvn_3.6.3'
+            }
+            steps {
+                sh 'cd ./kafka-ui-api && ./mvnw clean install -Pprod'
             }
         }
     }