3

gitlab CI/CD 流水线打包的问题

 2 years ago
source link: https://www.v2ex.com/t/814709
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  Java

gitlab CI/CD 流水线打包的问题

  zzfer · 16 小时 7 分钟前 · 641 次点击

用 CI/CD 流水线打的 jar 包,登录的时候,查询成功后,用户信息为 null 。但在自己本地打的 jar 就没有问题。有 v 友遇到过吗?

11 条回复    2021-11-11 22:41:30 +08:00

AoEiuV020

AoEiuV020   16 小时 1 分钟前

直接反编译检查呀,
遇到过有那么一点点沾边的问题,不过我是安卓,排查发现是 CI 的 java 版本不同,导致脱糖功能异常进而导致各种问题,

zzfer

zzfer   14 小时 49 分钟前

@AoEiuV020 大佬,要检查的文件太多,只能一个一个对比吗? jdk 大版本都是 1.8 ,小版本有点不同

AoEiuV020

AoEiuV020   14 小时 31 分钟前

@zzfer #2 我意思是逆推回去,你说的用户信息为 null 断点看看总有个直接原因吧,从原因推原因的原因,总能查到是从哪个类的哪个方法开始数据出现异常的,定位到具体 class 说不定就能看出问题了,

intmax2147483647

intmax2147483647   14 小时 2 分钟前

都 CI/CD 了没用 docker 吗

chendy

chendy   13 小时 59 分钟前

构建命令用的啥,会在不同环境用不同的编译命令吗?
配置文件写的啥,会在不同环境用不同的配置文件吗,是不是写错了?

zzfer

zzfer   13 小时 47 分钟前

@chendy 线上是 mvn -Dmaven.repo.local=${MAVEN_CACHE} clean install -Dmaven.test.skip=true
本地是 mvn clean install -Dmaven.test.skip=true

zzfer

zzfer   13 小时 47 分钟前

@intmax2147483647 是 docker ,打完 jar 再打镜像

chendy

chendy   13 小时 36 分钟前

@zzfer 本地仓库里放的自己的包么?有的话检查两边用的是不是一样的版本,特别是 snapshot 的
一样的话检查运行参数,是不是配错了啥
其实就是个大家来找茬游戏。。。

zzfer

zzfer   12 小时 57 分钟前

@chendy 解压 jar 包对比,感觉最大可能是 maven 和 jdk 版本有点不同。
CI: Maven 3.6.3
Build-Jdk: 1.8.0_92
Created-By: Apache Maven 3.3.9
Build-Jdk: 1.8.0_261

zzfer

zzfer   12 小时 57 分钟前

@chendy 解压 jar 包对比,感觉最大可能是 maven 和 jdk 版本有点不同。
CI: Maven 3.6.3
Build-Jdk: 1.8.0_92
本地: Maven 3.3.9
Build-Jdk: 1.8.0_261

defunct9

defunct9   8 小时 38 分钟前 via iPhone

把 gitlab 换成 onedev

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK