Browse Source

添加 'Jenkinsfile'

wuheng 2 years ago
parent
commit
dc4c999018
1 changed files with 33 additions and 0 deletions
  1. 33 0
      Jenkinsfile

+ 33 - 0
Jenkinsfile

@@ -0,0 +1,33 @@
+pipeline {
+    agent any
+    environment {
+        BRANCH_NAME="${env.BRANCH_NAME}".toLowerCase()
+    }
+    stages {
+        stage('pullCode'){
+            steps{
+                echo 'This is a pullCode step'
+                checkout scm
+            }
+        }
+        stage('Build') {
+            steps {
+                echo 'Building..'
+                #sh 'docker-compose down'
+                #sh '~/tools/apache-maven-3.6.3/bin/mvn  clean install -Dmaven.test.skip=true'
+                #sh 'docker build -t ${BRANCH_NAME}:${BUILD_NUMBER} .'
+            }
+        }
+        stage('Test') {
+            steps {
+                echo 'Testing..'
+            }
+        }
+        stage('Deploy') {
+            steps {
+                echo 'Deploying....'
+                #sh 'docker-compose up -d'
+            }
+        }
+    }
+}