2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CodeBuildのチュートリアルをやったまとめ

Posted at

CodeBuildのtutorialをやったまとめ。

やってることはこんなこと。

image.png

buildspec.ymlを作成する。

  • buildspec.ymlはCodeDeployのappspec.ymlファイルと同じくビルドの設定を記述するファイル。
  • S3に限らず、リポジトリのソースディレクトリのルートに配置する。
  • S3以外ではzipにしてはいけない。

参考)buildspec.ymlの書き方

buildspec.yml
version: 0.2

phases:
  install:
    runtime-versions:
      java: corretto11
  pre_build:
    commands:
      - echo Nothing to do in the pre_build phase...
  build:
    commands:
      - echo Build started on `date`
      - mvn install
  post_build:
    commands:
      - echo Build completed on `date`
artifacts:
  files:
    - target/messageUtil-1.0.jar

artifactsはビルド結果をどこに何て名前で保存するかを指定している。

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?