Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ChatGPTとCIパイプラインを利用してドキュメント作成作業を自動化した話
Search
Toru Takahashi
July 29, 2023
Programming
0
1.9k
ChatGPTとCIパイプラインを利用してドキュメント作成作業を自動化した話
AWS DevDay2023登壇資料です。
https://www.youtube.com/watch?v=B2TwG94zlss
Toru Takahashi
July 29, 2023
Tweet
Share
More Decks by Toru Takahashi
See All by Toru Takahashi
AWS_AmplifyとNFCカードを使ってデジタル名刺を作る.pdf
tttol
4
68
AWS AmplifyとNFCカードを使ってデジタル名刺を作る
tttol
0
49
はじめてのAWS CDKコントリビュート
tttol
0
160
Amplify製アプリケーションにパスキー認証を導入する
tttol
1
120
Virtual Threadsで実現する性能改善
tttol
1
1.6k
私がAWS Amplifyを使う理由
tttol
1
360
AWS Community Builder流:技術情報のインプット・アウトプット戦略
tttol
1
650
Amplifyで開発・運用している 個人開発アプリ紹介
tttol
0
580
AmplifyにCDKがやってきた_プレビュー版のAmplify_Gen2を触ってみた.pdf
tttol
1
770
Other Decks in Programming
See All in Programming
Enterprise Web App. Development (1): Build Tool Training Ver. 5
knakagawa
1
120
Make Parsers Compatible Using Automata Learning
makenowjust
2
6.9k
Deoptimization: How YJIT Speeds Up Ruby by Slowing Down / RubyKaigi 2025
k0kubun
1
1.9k
The Evolution of the CRuby Build System
kateinoigakukun
1
760
KANNA Android の技術的課題と取り組み
watabee
0
180
By the way Google Cloud Next 2025に行ってみてどうだった
ymd65536
0
110
Beyond_the_Prompt__Evaluating__Testing__and_Securing_LLM_Applications.pdf
meteatamel
0
100
AI時代の開発者評価について
ayumuu
0
230
音声プラットフォームのアーキテクチャ変遷から学ぶ、クラウドネイティブなバッチ処理 (20250422_CNDS2025_Batch_Architecture)
thousanda
0
380
ComposeでのPicture in Picture
takathemax
0
130
Improve my own Ruby
sisshiki1969
0
100
七輪ライブラリー: Claude AI で作る Next.js アプリ
suneo3476
1
170
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
690
The Art of Programming - Codeland 2020
erikaheidi
54
13k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
227
22k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.4k
BBQ
matthewcrist
88
9.6k
Mobile First: as difficult as doing things right
swwweet
223
9.6k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.7k
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
23
2.7k
Why You Should Never Use an ORM
jnunemaker
PRO
56
9.3k
Rebuilding a faster, lazier Slack
samanthasiow
81
9k
The Language of Interfaces
destraynor
157
25k
Transcript
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. ChatGPTとCIパイプラインを利用して ドキュメント作成作業を自動化した話 髙橋 透 F-3-2 NRIネットコム株式会社
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 髙橋 透 (Toru Takahashi) NRIネットコム株式会社 バックエンドエンジニア (主にJava SpringBoot) 自己紹介
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. ドキュメント整備 やってますか?
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. • 外部設計書 • 内部設計書 • DB 設計書 • テスト設計書 • 運用保守手順書 • etc... ドキュメント整備 やってますか? https://www.vecteezy.com/photo/10610487-close-up-hands- of-a-man-in-a-white-shirt-searching-for-contract-agreement- documents-in-stack-of-group-report-papers-clipped-in-color- clips
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. ちゃんとメンテ できてますか?
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. <よくあるケース> • アプリを更新したがドキュメントの更新が漏れていた • ドキュメントを更新したが誤記載・typo があった • 忙しさを理由にドキュメント更新を後回しにしてしまう ちゃんとメンテできてますか?
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. <よくあるケース> • アプリを更新したがドキュメントの更新が漏れていた ↑コーディングに集中したい…ドキュメント更新面倒… • ドキュメントを更新したが誤記載・typo があった • 忙しさを理由にドキュメント更新を後回しにしてしまう ちゃんとメンテできてますか?
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. <よくあるケース> • アプリを更新したがドキュメントの更新が漏れていた ↑コーディングに集中したい…ドキュメント更新面倒… • ドキュメントを更新したが誤記載・typo があった ↑ミスを100%防ぐことは難しい • 忙しさを理由にドキュメント更新を後回しにしてしまう ちゃんとメンテできてますか?
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. <よくあるケース> • アプリを更新したがドキュメントの更新が漏れていた ↑コーディングに集中したい…ドキュメント更新面倒… • ドキュメントを更新したが誤記載・typo があった ↑ミスを100%防ぐことは難しい • 忙しさを理由にドキュメント更新を後回しにしてしまう ↑エンジニアは多忙な生き物 ちゃんとメンテできてますか?
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. <よくあるケース> • アプリを更新したがドキュメントの更新が漏れていた ↑コーディングに集中したい…ドキュメント更新面倒… • ドキュメントを更新したが誤記載・typoがあった ↑100%ミスを防ぐことは難しい • 忙しさを理由にドキュメント更新を後回しにしてしまう ↑エンジニアは多忙な生き物 ちゃんとメンテできてますか? すべて解決します!!
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. • 「アプリ更新→ドキュメント自動更新」する仕組みの紹介 • (例) DBテーブルを追加するとDB定義書が自動更新される 紹介する解決方法 アプリに DBテーブルを 追加 GitにPUSH CIで ドキュメント更新
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 1.アーキテクチャ説明 2.デモ動画 3.CI パイプラインの概要 4.Flyway による DB マイグレーション 5.MySQL からテーブル情報を取得する 6.Confluence REST API を使ったページ更新 7.開発における ChatGPT の使い所 8.まとめ アジェンダ
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 1.アーキテクチャ説明 2.デモ動画 3.CI パイプラインの概要 4.Flyway による DB マイグレーション 5.MySQL からテーブル情報を取得する 6.Confluence REST API を使ったページ更新 7.開発における ChatGPT の使い所 8.まとめ アジェンダ
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. AWS Cloud AWS CodePipeline ドキュメント (Notion, Confluence等) AWS CodeBuild MySQL (Dockerコンテナ) Flyway ①ソースコードを GitにPUSH ②CodePipeline →CodeBuildの順に CI/CDが起動 ③DB構築&テーブル情報抽出 ④DBドキュメント更新
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 1.アーキテクチャ説明 2.デモ動画 3.CI パイプラインの概要 4.Flyway による DB マイグレーション 5.MySQL からテーブル情報を取得する 6.Confluence REST API を使ったページ更新 7.開発における ChatGPT の使い所 8.まとめ アジェンダ
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. デモ見せます ※今から流すデモ動画は私が 業務外で個人的に作成した サンプルアプリの映像です
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 1.アーキテクチャ説明 2.デモ動画 3.CI パイプラインの概要 4.Flyway による DB マイグレーション 5.MySQL からテーブル情報を取得する 6.Confluence REST API を使ったページ更新 7.開発における ChatGPT の使い所 8.まとめ アジェンダ
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. AWS Cloud AWS CodePipeline ドキュメント (Notion, Confluence等) AWS CodeBuild MySQL (Dockerコンテナ) Flyway ①ソースコードを GitにPUSH ②CodePipeline →CodeBuildの順に CI/CDが起動 ③DB構築&テーブル情報抽出 ④DBドキュメント更新
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. • AWS 上で CI/CD を構築できるサービス • AWS CodeXXX 系のサービスは他にもある • AWS CodeCommit • AWS CodeBuild • AWS CodeDeploy • AWS CodePipeline • AWS CodeStar AWS CodePipeline
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. • AWS 上で CI/CD を構築できるサービス • AWS CodeXXX系 のサービスは他にもある • AWS CodeCommit • AWS CodeBuild ←今回利用 • AWS CodeDeploy • AWS CodePipeline ←今回利用 • AWS CodeStar AWS CodePipeline
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. AWS CodeBuild CI で実行する処理をここで 定義する 定義は buildspec.yml という ファイルに記述 VSCode, Microsoft, https://azure.microsoft.com/ja-jp/products/visual-studio-code
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 1.アーキテクチャ説明 2.デモ動画 3.CI パイプラインの概要 4.Flyway による DB マイグレーション 5.MySQL からテーブル情報を取得する 6.Confluence REST API を使ったページ更新 7.開発における ChatGPT の使い所 8.まとめ アジェンダ
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. AWS Cloud AWS CodePipeline ドキュメント (Notion, Confluence等) AWS CodeBuild MySQL (Dockerコンテナ) Flyway ①ソースコードを GitにPUSH ②CodePipeline →CodeBuildの順に CI/CDが起動 ③DB構築&テーブル情報抽出 ④DBドキュメント更新
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. • DB のマイグレーションツール • オープンソース • ソースコードを Git でバージョン管理するように、DB の状態をバー ジョン管理可能 Flywayとは?
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Flyway 利用例 DB hoge_tableに `fuga INT` をカラム追加したい hoge_tableに `piyo VARCHAR(256)` をカラム追加したい
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Flyway 利用例ーsql ファイル作成 DB V1.0__add_fuga.sql V2.0__add_piyo.sql
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. V1.0__add_fuga.sql V2.0__add_piyo.sql VSCode, Microsoft, https://azure.microsoft.com/ja-jp/products/visual-studio-code Flyway 利用例ーsql ファイル作成
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. ├── src │ ├── main │ │ └── resources │ │ ├── db │ │ │ └── migration │ │ │ ├── V1.0__add_fuga.sql │ │ │ ├── V2.0__add_piyo.sql ・・・ ※Java(SpringBoot , Gradle)で実装した場合のディレクトリ例です Flyway 利用例ーsql ファイル配置場所
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Flyway利用例ーマイグレーション実行 CLIよりコマンドを実行することでマイグレーションが実行される ※Java(SpringBoot, Gradle)で実装した場合のコマンド例です ※Mac Terminal
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Flyway利用例ーマイグレーション実行結果 fugaカラム, piyoカラムが追加されていることを確認 ※Mac Terminal
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Flyway を使うことで何がうれしいか • DB スキーマの変更履歴を sql ファイルベースでバージョン管理可能 • 好きな場所・環境で DB ダンプ要らずで DB を構築できる • ローカル上のDockerコンテナ • GitHub ActionsのRunner • 開発/本番環境 • etc…
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. AWS Cloud AWS CodePipeline ドキュメント (Notion, Confluence等) AWS CodeBuild MySQL (Dockerコンテナ) Flyway ①ソースコードを GitにPUSH ②CodePipeline →CodeBuildの順に CI/CDが起動 ③DB構築&テーブル情報抽出 ④DBドキュメント更新 最新のDBスキーマを CodePipeline上の MySQL(Dockerコンテナ) に反映することができる
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 1.アーキテクチャ説明 2.デモ動画 3.CI パイプラインの概要 4.Flyway による DB マイグレーション 5.MySQL からテーブル情報を取得する 6.Confluence REST API を使ったページ更新 7.開発における ChatGPT の使い所 8.まとめ アジェンダ
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. • MySQL では information_schema に DB 内の情報が詰まっている • データベース名 • テーブル名 • カラムのデータ型 • アクセス権限 • etc... MySQL の information_schema
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. information_schema から情報取得 VSCode, Microsoft, https://azure.microsoft.com/ja-jp/products/visual-studio-code
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. information_schema から情報取得 ※Mac Terminal
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. information_schema から情報取得 この情報をHTMLに落とし込んで Confluenceを更新します ※Mac Terminal
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. • Python の「mysql-connector-python」を利用 • Python から MySQL に接続するライブラリ • https://pypi.org/project/mysql-connector-python/ HTML に落とし込む方法
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. HTML に落とし込む方法 VSCode, Microsoft, https://azure.microsoft.com/ja-jp/products/visual-studio-code
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 1.アーキテクチャ説明 2.デモ動画 3.CI パイプラインの概要 4.Flyway による DB マイグレーション 5.MySQL からテーブル情報を取得する 6.Confluence REST API を使ったページ更新 7.開発における ChatGPT の使い所 8.まとめ アジェンダ
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. AWS Cloud AWS CodePipeline ドキュメント (Notion, Confluence等) AWS CodeBuild MySQL (Dockerコンテナ) Flyway ①ソースコードを GitにPUSH ②CodePipeline →CodeBuildの順に CI/CDが起動 ③DB構築&テーブル情報抽出 ④DBドキュメント更新
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. • Confluence のページを操作するための REST API が 公式で用意されている • GET : ページ取得 • POST : ページ作成 • PUT : ページ更新 • DELETE : ページ削除 Confluence REST API
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. • Confluenceのページを操作するためのREST APIが 公式で用意されている • GET : ページ取得 • POST : ページ作成 • PUT : ページ更新 ←これを使う • DELETE : ページ削除 Confluence REST API
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 1.アーキテクチャ説明 2.デモ動画 3.CI パイプラインの概要 4.Flyway による DB マイグレーション 5.MySQL からテーブル情報を取得する 6.Confluence REST API を使ったページ更新 7.開発における ChatGPT の使い所 8.まとめ アジェンダ
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. ChatGPT の使い所 MySQL のテーブル内容を HTML 出力する方法を教えてください ChatGPT, OpenAI, https://chat.openai.com/ アクセス日 5/18
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. ChatGPT の使い所 ChatGPT, OpenAI, https://chat.openai.com/ アクセス日 5/18
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. ChatGPTの使い所 Confluence のページを 外部から更新する 方法を教えてください ChatGPT, OpenAI, https://chat.openai.com/ アクセス日 5/18
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 1.アーキテクチャ説明 2.デモ動画 3.CI パイプラインの概要 4.Flyway による DB マイグレーション 5.MySQL からテーブル情報を取得する 6.Confluence REST API を使ったページ更新 7.開発における ChatGPT の使い所 8.まとめ アジェンダ
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. AWS Cloud AWS CodePipeline ドキュメント (Notion, Confluence等) AWS CodeBuild MySQL (Dockerコンテナ) Flyway ①ソースコードを GitにPUSH ②CodePipeline →CodeBuildの順に CI/CDが起動 ③DB構築&テーブル情報抽出 ④DBドキュメント更新
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. AWS Cloud AWS CodePipeline ドキュメント (Notion, Confluence等) AWS CodeBuild MySQL (Dockerコンテナ) Flyway ①ソースコードを GitにPUSH ②CodePipeline →CodeBuildの順に CI/CDが起動 ③DB構築&テーブル情報抽出 ④DBドキュメント更新
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. AWS Cloud AWS CodePipeline ドキュメント (Notion, Confluence等) AWS CodeBuild MySQL (Dockerコンテナ) Flyway ①ソースコードを GitにPUSH ②CodePipeline →CodeBuildの順に CI/CDが起動 ③DB構築&テーブル情報抽出 ④DBドキュメント更新 最新の DB スキーマを CodePipeline 上の MySQL(Dockerコンテナ) に反映することができる
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. AWS Cloud AWS CodePipeline ドキュメント (Notion, Confluence等) AWS CodeBuild MySQL (Dockerコンテナ) Flyway ①ソースコードを GitにPUSH ②CodePipeline →CodeBuildの順に CI/CDが起動 ③DB構築&テーブル情報抽出 ④DBドキュメント更新
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. <よくあるケース> • アプリを更新したがドキュメントの更新が漏れていた • ドキュメントを更新したが誤記載・typo があった • 忙しさを理由にドキュメント更新を後回しにしてしまう 【再掲】ちゃんとメンテできてますか?
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. <よくあるケース> • アプリを更新したがドキュメントの更新が漏れていた ↑PUSH 時に自動更新するので漏れなし! • ドキュメントを更新したが誤記載・typo があった • 忙しさを理由にドキュメント更新を後回しにしてしまう 【再掲】ちゃんとメンテできてますか?
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. <よくあるケース> • アプリを更新したがドキュメントの更新が漏れていた ↑PUSH 時に自動更新するので漏れなし! • ドキュメントを更新したが誤記載・typo があった ↑information_schema そのままなので間違えようがない! • 忙しさを理由にドキュメント更新を後回しにしてしまう 【再掲】ちゃんとメンテできてますか?
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. <よくあるケース> • アプリを更新したがドキュメントの更新が漏れていた ↑PUSH 時に自動更新するので漏れなし! • ドキュメントを更新したが誤記載・typo があった ↑information_schema そのままなので間違えようがない! • 忙しさを理由にドキュメント更新を後回しにしてしまう ↑CI が勝手にやってくれるので開発に集中できる! 【再掲】ちゃんとメンテできてますか?
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. DB テーブル定義だけでなく、他のドキュメントも自動化 Javadoc を CIで出力させて設計書代わりに…?! Confluence 以外のサービスへの応用 REST APIがあればなんでもよい AI サービスを組み込む プロンプト次第で可能性は無限大 TRY MORE!
© 2023, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Thank you! © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.