devsapp / fc

阿里云函数计算(FC)组件
MIT License
139 stars 40 forks source link

Custom Runtime 如果启动命令是java -jar,需要将codeUri打成zip包 #890

Closed lowkeyrd closed 2 years ago

lowkeyrd commented 2 years ago

s 现在打包的逻辑是按codeUri后缀区分的,codeUri后缀是jar、war、zip,deploy时就不再进行打包直接传文件,否则会将codeUri打成zip包 https://github.com/devsapp/fc-deploy/blob/8be93bd33c729a7edded2486a96e55d7acfb8fbb/src/lib/fc/function.ts#L445

示例: https://github.com/devsapp/start-web-framework/blob/master/web-framework/java/springboot/src/s.yaml#L52 https://github.com/devsapp/start-fc/blob/master/custom-function/java8/fc-custom-java8-http/src/s.yaml#L57

但是现在直接传jar包有个限制,不能以jara -jar方式启动,参考现在控制台的提示 image

因此打包时需要新增一个条件,当启动命令包含java -jar时,需要把jar打成zip