【发布时间】:2020-07-05 12:15:10
【问题描述】:
我用 3 个步骤为 SpringBoot Java 应用程序构建了一个简单的 CodePipeline:
- 来源:从 GitHub 获取源代码
- 构建:jar 文件
- 部署:到 AWS Elastic Beanstalk 实例
1 和 2 步骤成功通过,而 Deploy 步骤失败。我在 Elastic Beanstalk 日志中看到的唯一错误:
01_configure_application.sh] : Activity execution failed, because: Executing: /usr/bin/unzip -o -d /var/app/staging /opt/elasticbeanstalk/deploy/appsource/source_bundle
FileMagic v0.7.1: compiled magic version [5.21] does not match with shared library magic version [5.37]
Archive: /opt/elasticbeanstalk/deploy/appsource/source_bundle
inflating: /var/app/staging/microservices/my-service/target/my-service.jar
Unable to launch application as the source bundle does not contain either a file named application.jar or a Procfile.
Unable to launch application as the source bundle does not contain either a file named application.jar or a Procfile. (ElasticBeanstalk::ExternalInvocationError)
caused by: Executing: /usr/bin/unzip -o -d /var/app/staging /opt/elasticbeanstalk/deploy/appsource/source_bundle
FileMagic v0.7.1: compiled magic version [5.21] does not match with shared library magic version [5.37]
Archive: /opt/elasticbeanstalk/deploy/appsource/source_bundle
inflating: /var/app/staging/microservices/my-service/target/my-service.jar
Unable to launch application as the source bundle does not contain either a file named application.jar or a Procfile.
Unable to launch application as the source bundle does not contain either a file named application.jar or a Procfile. (Executor::NonZeroExitStatus)
我的构建规范:
build:
commands:
- mvn -P ci --settings settings.xml install -DskipTests
artifacts:
files:
- microservices/my-service/target/my-service.jar
如果我使用 AWS Web Interface 将这个 jar 直接部署到 AWS Elastic Beanstalk,它会完美运行。
请帮帮我。 我已准备好按需共享任何其他配置。
【问题讨论】:
标签: amazon-web-services amazon-elastic-beanstalk aws-codepipeline