Skip to content

Commit

Permalink
CI_BUILD_ID
Browse files Browse the repository at this point in the history
  • Loading branch information
martin.cong committed Sep 21, 2023
1 parent 5fa19d8 commit 934080d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ guavaVersion=32.1.2-jre
errorProneVersion=2.21.1
## above override grpc-api dependency//
# common lib
lombokVersion=1.18.28
lombokVersion=1.18.30
slf4jVersion=2.0.9
#slf4jVersion=1.7.36
jacksonVersion=2.15.2
8 changes: 5 additions & 3 deletions rpc-common/src/main/java/com/bt/rpc/common/RpcConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.time.LocalDate;
import java.time.LocalTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;

/**
Expand All @@ -22,9 +23,10 @@ public interface RpcConstants {
String VENDOR = "java";

//利用graalVM特性,缓存构建信息
String CI_BUILD_ID = "v"+System.getenv("CI_PIPELINE_ID")+"-"+System.getenv("BTSP")
+"-"+ LocalDate.now()+'T'+ LocalTime.now().format(DateTimeFormatter.ofPattern("HH:mm"))
+"-"+ System.getenv("CI_COMMIT_SHORT_SHA");
String CI_BUILD_ID = System.getProperty("ci.build")+"-"+ LocalDate.now(ZoneId.of("Asia/Shanghai"))+' '
+ LocalTime.now(ZoneId.of("Asia/Shanghai")).format(DateTimeFormatter.ofPattern("HH:mm"));
//+"-"+ System.getenv("CI_COMMIT_SHORT_SHA");
//+"-"+;

int DEFAULT_PORT = 50051;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class GraalvmBuild {

static {
System.out.println("[ RPC Server For GraalvmBuild ] ServerProvider :" + RpcConstants.CI_BUILD_ID+" , " + ServerProvider.provider());
System.out.println("ENV : \n" + System.getenv());
//System.out.println("ENV : \n" + System.getenv());
//System.out.println("PROP : \n" + System.getProperties());
}

Expand Down

0 comments on commit 934080d

Please sign in to comment.