Browse Source

added steps to Jenkins pipeline

Bulat Yusupov 5 years ago
parent
commit
2dcbe01517
1 changed files with 26 additions and 0 deletions
  1. 26 0
      Jenkinsfile

+ 26 - 0
Jenkinsfile

@@ -1,3 +1,5 @@
+#!/usr/bin/env groovy
+
 pipeline {
 pipeline {
 
 
     agent any
     agent any
@@ -6,6 +8,30 @@ pipeline {
         stage('Test') {
         stage('Test') {
             steps {
             steps {
                 echo 'Test...'
                 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'
             }
             }
         }
         }
     }
     }