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
Rocro Inspecode Hands On with Bitbucket
Search
Yoshiyuki Mineo
November 01, 2017
Technology
0
110
Rocro Inspecode Hands On with Bitbucket
Bitbucket + Rocro Hands-On Seminar 2017/11/01
Yoshiyuki Mineo
November 01, 2017
Tweet
Share
More Decks by Yoshiyuki Mineo
See All by Yoshiyuki Mineo
GCP を活用してスケーラブルな CI サービスを作った話
yoshiyukimineo
0
180
開発者向けSaaS Rocro
yoshiyukimineo
0
730
Rocro Inspecode Hands On
yoshiyukimineo
0
520
RocroにおけるGCP活用事例
yoshiyukimineo
0
970
Other Decks in Technology
See All in Technology
Grafanaのvariables機能について
tiina
0
180
CNAPPから考えるAWSガバナンスの実践と最適化
yuobayashi
5
680
エラーバジェット枯渇の原因 - 偽陽性との戦い -
phaya72
1
100
Oracle Cloud Infrastructure:2025年1月度サービス・アップデート
oracle4engineer
PRO
0
210
Site Reliability Engineering on Kubernetes
nwiizo
6
4.4k
Server Side Swift 実践レポート: 2024年に案件で採用して見えた課題と可能性
yusuga
1
420
Japan AWS Jr. Championsがお届けするre:Invent2024のハイライト ~ラスベガスで見てきた景色~
fukuchiiinu
0
1.1k
バクラクの組織とアーキテクチャ(要約)2025/01版
shkomine
13
3k
Enhancing SRE Using AI
yoshiiryo1
1
280
[2024年10月版] Notebook 2.0のご紹介 / Notebook2.0
databricksjapan
0
1.6k
さいきょうのアーキテクチャを生み出すセンスメイキング
jgeem
0
270
BLEAでAWSアカウントのセキュリティレベルを向上させよう
koheiyoshikawa
0
140
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
44
13k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Why Our Code Smells
bkeepers
PRO
335
57k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
990
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Building Applications with DynamoDB
mza
93
6.2k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
30
2.1k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Building Your Own Lightsaber
phodgson
104
6.2k
Transcript
ROCRO INSPECODE ハンズオン Bitbucket編 Rocro株式会社 峯尾 嘉征 2017/11/01
• 開発者向けサービス群 • https://rocro.com • GitHub / Bitbucketと連携 • 9/14
public beta開始 • 名前の由来 • アジャイル開発:イテレーションを回しながらソフトウェアをつくる • 回転させながらものをつくる道具 → ろくろ 2
Inspecode • 自動コードレビュー&コード修正サービス • 約50種類の静的解析ツールをサポート • 一部の言語でユニットテストもサポート開始 • サポート言語: C,
C++, Clojure, CoffeeScript, CSS, Go, HTML, Java, JavaScript, PHP, Python, Ruby, Scala, Shell, TypeScriptなど • Public Beta 3
What's New • 下記ツールを新規にサポート • Tailor(Swift) • Prospector(Python) • Prettier(CSS/JavaScript/TypeScript)
• Unused(多言語対応) • Public Repositoryへの対応 • Bitbucketでも自動修正機能をサポート • レポートバッジ(詳細は後述) • Fixedステータス(詳細は後述) 4
ハンズオン資料 https://bitbucket.org/your-team/inspecode-hands-on 5 https://bitbucket.org/your-team/inspecode-hands- on/downloads/inspecode-hands-on-bitbucket_jp.pdf Click “ダウンロード” Download pdf
Agenda • セットアップと基本的な使い方 • rocro.ymlの追加 • 自動修正 • 入力分割 •
バッジ 6
セットアップと基本的な使い⽅ 7
https://bitbucket.org/your-team/inspecode-hands- on を Fork ① Click “+” mark 8
https://bitbucket.org/your-team/inspecode-hands- on を Fork ② Click “Fork this repository” 9
https://bitbucket.org/your-team/inspecode-hands- on を Fork ③ Click 10
inspecode.rocro.com からサインイン Sign in with BitBucket 11
Authorize ROCRO Click 12
Repositories ページに移動 Click “Repositories” 13
レポジトリを登録 2. Back to “Reports” 1. Register “inspecode-hands-on” repository 14
※repositoryが現れない場合は、右上の”Sync”ボタンを押してください
Report が生成されることを確認 15
Report Summaryを表示① Click “Report” 16
Report Summaryを表示② 17
File一覧を表示① Click “D” bar 18
File一覧を表示② ※「Filesタブ→プルダウンメニューでGrade Dを選択」 でも同じ画⾯に⾏けます。 19
特定ファイルのIssue一覧を表示① Click 20
特定ファイルのIssue一覧を表示② 21
特定ファイルのIssue出現箇所を確認① Click “Source” 22
特定ファイルのIssue出現箇所を確認② 23
Jobの履歴を表示① 24 Click “History”
Jobの履歴を表示② 25
Jobの詳細を表示① Click 26
Jobの詳細を表示② Click “golint” 27
Jobの詳細を表示③ golintのコンソールログを確認 28
rocro.ymlの追加 29
rocro.yml inspecode: gofmt: thresholds: num-issues: 0 options: [-s] go-test: thresholds:
num-issues: 0 misspell: default golint: default rocro.ymlにより様々な設定が可能 左のrocro.ymlは、gofmt, golintで 1つでもissueが検出されたら Jobをfailさせる設定 Note: Notificationsの設定で “Only failure and recovery” を選択すると Jobのfailに気づきやすくなる 30 https://inspecode.rocro.com/help/configuration/tool.html#field-thresholds
rocro-ymlブランチをマージ① Click “ブランチ” 31
rocro-ymlブランチをマージ② Click “rocro-yml” 32
rocro-ymlブランチをマージ③ Click “マージ” 33
rocro-ymlブランチをマージ④ Click “マージ” 34
Threshold設定によりJobがFailしたことを確認① 35 Click “History”
Threshold設定によりJobがFailしたことを確認② 36 Click
Threshold設定によりJobがFailしたことを確認③ 37 gofmtがfailしたのを確認
自動修正 38
rocro.yml inspecode: gofmt: thresholds: num-issues: 0 options: [-s] auto-fix: true
go-test: thresholds: num-issues: 0 misspell: default golint: default gofmtのauto-fixを有効にして 先程のgofmt errorを自動的に修正する 39 https://inspecode.rocro.com/help/configuration/tool.html#field-auto-fix
auto-fixブランチをマージ① 40 Click “ブランチ”
auto-fixブランチをマージ② 41 Click “auto-fix”
auto-fixブランチをマージ③ 42 Click “マージ”
auto-fixブランチをマージ④ 43 Click “マージ”
Report Summaryを表示 2. Click “Report” 44 1. Click “Reports”
レポート画面からブランチ画面を表示 Click “Compare” 45 ※“Compare”が表⽰されない場合は、“History”から 最新のJobを選択して”View Report”ボタンを押してください
master@inspecode を master にマージ① Create ”マージ” 46
master@inspecode を master にマージ② Create ”マージ” 47
コミット履歴から Report Summary を表示① 48 Click “コミット”
コミット履歴から Report Summary を表示② 49 Click green icon
修正された Issues を確認① Click “Number of Fixed Issues” 50
修正された Issues を確認② 51
自動修正によりFailed→Succeededになったことを確認① Click “History” 52
自動修正によりFailed→Succeededになったことを確認② 53 Click
自動修正によりFailed→Succeededになったことを確認③ 54
入力分割 55
rocro.yml inspecode: gofmt: thresholds: num-issues: 0 options: [-s] auto-fix: true
go-test: thresholds: num-issues: 0 misspell: default golint: - input: c* - ignore: c* golintの入力を分割して 並列化・高速化する ”c”で始まるファイル群と それ以外のファイル群に2分割 56
参考:Multiple Configurations 57 inspecode: <tool>: input: <pattern> ignore: <pattern> https://inspecode.rocro.com/help/configuration/tool.html#multiple-configurations
inspecode: <tool>: - input: <pattern> ignore: <pattern> - input: <pattern> ignore: <pattern> Single Configuration inputで入力パターンを指定(複数可) ignoreで除外パターンを指定(複数可) Multiple Configurations リスト形式で複数のconfigurationを 記述可能
divide-inputブランチをマージ① 58 Click “ブランチ”
divide-inputブランチをマージ② 59 Click “auto-fix”
divide-inputブランチをマージ③ 60 Click “マージ”
divide-inputブランチをマージ④ 61 Click “マージ”
golintが分割・並列実行されたことを確認① 62 Click “History”
golintが分割・並列実行されたことを確認② 63 Click
golintが分割・並列実行されたことを確認③ 64
バッジ 65
バッジ • READMEに貼るアイコン • ステータスバッジ • 最新のジョブのステータス(Succeeded, Failedなど)を表示 • クリックすると最新のジョブの詳細画面へジャンプ
• レポートバッジ • 最新のレポートの5段階評価(A, B, C, D, F)を表示 • クリックすると最新のレポート画面へジャンプ 66
Settings 画面を開く Click “Settings” 67
Badges 画面を開く Click “Badges” 68
Markdownスニペットをコピー Copy this snippet 69
README.mdを編集① Click “ソース” 70
README.mdを編集② Click “README.md” 71
README.mdを編集③ Click “編集” 72
README.mdを編集④ 1. コピーしたスニペットを 8⾏⽬に貼り付ける 2. Click “コミット” 73
README.mdを編集⑤ Click “コミット” 74
レポートバッジを確認① Click “ファイルを表⽰” 75
レポートバッジを確認② バッジが表⽰される 76