AWS上的Spring Boot应用与GitHub持续部署

发布于 2025-01-27 10:04:59 字数 2398 浏览 3 评论 0原文

我正在学习与AWS的工作方式,现在我正在尝试进行连接AWS和GitHub(Spring Boot Jar Application)的Codepipeline。我已经与github连接并编译了来源,但是部署失败了。

这是管道中显示的错误:

“在此处输入图像说明”

我已经转到了指定错误的日志,并找到了其他描述:

2022/05/09 20:38:31.199534 [INFO] Job for web.service failed because the control process exited with error code. See "systemctl status web.service" and "journalctl -xe" for details.

2022/05/09 20:38:31.199559 [ERROR] An error occurred during execution of command [app-deploy] - [FlipApplication]. Stop running the command. Error: Register application failed because the registration of proc web failed: 
startProcess Failure: starting process "web" failed: Command /bin/sh -c systemctl start web.service failed with error exit status 1. Stderr:Job for web.service failed because the control process exited with error code. See "systemctl status web.service" and "journalctl -xe" for details.

但是我不明白。我在网络上寻找并尝试,但它仍然不起作用。我已经从pom.xm更改了版本。 这是我使用的buildspec.yml:

version: 0.2
 
phases:
  install:
    runtime-versions:
      java: corretto11
    commands:
      - echo install
  pre_build:
    commands:
      - echo pre_build
  build:
    commands:
      - mvn package
      - echo build
  post_build:
    commands:
      - echo post_build

artifacts:
  files:
    - '**/*'
    - target/02-todo-rest-api-h2-0.0.2-SNAPSHOT.jar

我添加codepipeline配置的摘要:

”步骤1:选择管道设置”

事先感谢您的帮助。

I'm learning how work with AWS, and now I'm trying to do a codepipeline connecting AWS and GitHub (a spring boot jar applicacion). I have connected with GitHub and compile the sources but the deployment fails.

enter image description here

This is the error showed in the pipeline:

enter image description here

I have gone to the log that specify the error and find this other description:

2022/05/09 20:38:31.199534 [INFO] Job for web.service failed because the control process exited with error code. See "systemctl status web.service" and "journalctl -xe" for details.

2022/05/09 20:38:31.199559 [ERROR] An error occurred during execution of command [app-deploy] - [FlipApplication]. Stop running the command. Error: Register application failed because the registration of proc web failed: 
startProcess Failure: starting process "web" failed: Command /bin/sh -c systemctl start web.service failed with error exit status 1. Stderr:Job for web.service failed because the control process exited with error code. See "systemctl status web.service" and "journalctl -xe" for details.

But I don't understand. I looking in the web and try but it still not work. I have change the version from pom.xm already.
This is the buildspec.yml that I use:

version: 0.2
 
phases:
  install:
    runtime-versions:
      java: corretto11
    commands:
      - echo install
  pre_build:
    commands:
      - echo pre_build
  build:
    commands:
      - mvn package
      - echo build
  post_build:
    commands:
      - echo post_build

artifacts:
  files:
    - '**/*'
    - target/02-todo-rest-api-h2-0.0.2-SNAPSHOT.jar

I add the codepipeline configuration's summary:

Step 1: Choose pipeline settings
Step 2: Add source stage
Step 3: Add build stage
Step 4: Add deploy stage

Thanks in advance for your help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文