tanzhongran 3 rokov pred
rodič
commit
4d3ad2b1c8

+ 17 - 0
abi-cloud-qr-platform-server/src/main/groovy/test.groovy

@@ -0,0 +1,17 @@
+// 文件位置
+def filePath = "version.txt"
+//执行命令
+def command = "git name-rev --name-only HEAD"
+def process = command.execute()
+println "process=" + process
+process.waitFor()
+def tags = process.text.tokenize()
+def tagName = tags[0]
+println "tagName=" + tagName
+def dateTime = new Date().format("yyMMddHHmm")
+def version = "$tagName$dateTime".replace("/","")
+println "version=" + version
+File file = new File(filePath)
+println file.getAbsolutePath()
+// 写入文件
+file.write(version)

+ 4 - 0
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/infrastructure/util/UserUtil.java

@@ -0,0 +1,4 @@
+package com.abi.qms.platform.infrastructure.util;
+
+public class UserUtil {
+}

+ 1 - 0
deployment.yaml

@@ -21,6 +21,7 @@ spec:
     spec:
       containers:
         - name: abi-cloud-qr-platform-service
+          #image: registry-vpc.cn-shanghai.aliyuncs.com/ab-inbev-apac/abi-cloud-qr-platform-service:1.0
           image: registry-vpc.cn-shanghai.aliyuncs.com/ab-inbev-apac/abi-cloud-qr-platform-service:#version_num#
           imagePullPolicy: Always
           env: