Я создал простую CodePipeline для приложения SpringBoot Java с 3 шагами:
- Источник: получить исходный код из GitHub
- Сборка: файл JAR
- Развертывание: в AWS Elasti c Beanstalk
1 и 2 шага успешно пройдены, пока шаг развертывания не выполнен. Единственная ошибка, которую я вижу в журналах Elasti c 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)
My Buildspe c:
build:
commands:
- mvn -P ci --settings settings.xml install -DskipTests
artifacts:
files:
- microservices/my-service/target/my-service.jar
Если я разверну эту банку непосредственно в AWS Elasti c Beanstalk с использованием AWS веб-интерфейса, он отлично работает.
Пожалуйста, помогите мне. Я готов поделиться любым другим конфиг по требованию.