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
How can automation help with development practices
Search
PaulRbr
December 06, 2017
Programming
0
9
How can automation help with development practices
PaulRbr
December 06, 2017
Tweet
Share
More Decks by PaulRbr
See All by PaulRbr
A smooth migration to Docker focusing on build pipelines
paulrbr
0
23
Production upgrade of PostgreSQL 9.1 to 9.5
paulrbr
0
29
Other Decks in Programming
See All in Programming
CSRF対策のやり方、そろそろアップデートしませんか / Update your knowledge of CSRF protection
hiro_y
25
14k
document.write再考
brn
5
2.5k
TCA魔法学入門🪄
dazy
0
280
Docker ハンズオン / docker-hands-on
suzukihoge
51
16k
プロンプトエンジニアリング入門
tomokusaba
2
970
両面どころかインフラもTSでできるよ ~ 全方位TypeScriptによるプロダクト開発 ~
myfinder
8
2.2k
設計の知識と技能で駆動するソフトウェア開発
masuda220
PRO
18
10k
LPIXEL×CADDi_kaerururu
kaerururu
3
300
Ruby製社内ツールのGo移行
bgpat
2
260
コミュニティに参加したことで起きた変化
ohmori_yusuke
3
130
WinUI 3デモ - "CommunityToolkit.Mvvm"NuGetパッケージ編
andrewkeepcoding
0
130
Swiftの型推論を学ぼう | Let's Learn About Type Inference in Swift
omochi
2
510
Featured
See All Featured
WebSockets: Embracing the real-time Web
robhawkes
59
6.9k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
101
6.6k
Building Applications with DynamoDB
mza
88
5.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
18
1.7k
Building Adaptive Systems
keathley
29
1.8k
Clear Off the Table
cherdarchuk
82
310k
Building a Modern Day E-commerce SEO Strategy
aleyda
15
6.3k
It's Worth the Effort
3n
180
27k
The Straight Up "How To Draw Better" Workshop
denniskardys
227
130k
The Brand Is Dead. Long Live the Brand.
mthomps
48
21k
Large-scale JavaScript Application Architecture
addyosmani
501
110k
Building Effective Engineering Teams - LeadDev
addyosmani
25
1.8k
Transcript
HOW CAN AUTOMATION HELP WITH DEVELOPMENT PRACTICES
a.k.a LA MÉTHODE DE DEV CHEZ CAPITAINE TRAIN
WHO AM I? ⌨ + ⚙ + ⏸ So ware
Developer ▶ Linux Infra & Ops @paulRb_r
None
autonomy
initiative
empathy
communication
honesty
responsibility
humor
DEVELOPMENT WORKFLOW
Local changes
Pull Request · Merge Request ·
Review
Review
Review
Integration testing ✅
Merge Master
Ship it to Production
TL; DL · Local changes · Pull Request / Merge
Request · Review · ✅ Integration testing · Merge Master · Ship
DUG THE DEVELOPER Willing to contribute code
DUG THE DEVELOPER Working in the 25kv team
DEVELOPMENT WORKFLOW
GIT WORKFLOW
Test Platform
Test Platform Code repository (capitainetrain/25kv)
Test Platform Code repository (capitainetrain/25kv) (dugd/25kv) Local changes
None
Test Platform Code repository (dugd/25kv) (capitainetrain/25kv) Local changes
None
Test Platform Code repository (dugd/25kv) (capitainetrain/25kv) Local changes
None
(dugd/25kv) (capitainetrain/25kv) + Merge Request & Review
None
(dugd/25kv) (capitainetrain/25kv) ✅ Integration testing
None
(dugd/25kv) (capitainetrain/25kv) Merge Master
None
(dugd/25kv) (capitainetrain/25kv) Ship to Production
None
GIT WORKFLOW
BUILD PIPELINE WORKFLOW
BUILD PIPELINE CI WORKFLOW
BUILD PIPELINE CI CD WORKFLOW
BUILD PIPELINE WORKFLOW
None
None
1 commit == 1 pipeline
GITLAB
Open Source ❤
GITLAB · source code · merge request · review ·
CI build pipelines · Artifacts · Docker registry · ...much more
GITLAB CI
Open Source ❤
.gitlab-ci.yml file
versioned within git
declarative
job1: script: make build job2: script: make test
integrated
PIPELINE
1 pipeline == n stages
stages: - build - test - deploy
1 stage == n jobs
job1-unit-test: stage: test job2-acceptance-test: stage: test
1 pipeline == jobs x stages
None
REMEMBER DUG?
None
None
.gitlab-ci.yml image: ruby:2.4
.gitlab-ci.yml image: ruby:2.4 bundle: stage: build script: - bundle install
--deployment artifacts: paths: [ '.bundle/', 'vendor/' ]
.gitlab-ci.yml image: ruby:2.4 bundle: stage: build script: - bundle install
--deployment artifacts: paths: [ '.bundle/', 'vendor/' ] test: stage: test script: - bundle exec rake test
.gitlab-ci.yml image: ruby:2.4 bundle: stage: build script: - bundle install
--deployment artifacts: paths: [ '.bundle/', 'vendor/' ] test: stage: test script: - bundle exec rake test lint: stage: test script: - bundle exec rubocop
.gitlab-ci.yml image: ruby:2.4 # … security: stage: test script: -
bundle exec brakeman
.gitlab-ci.yml image: ruby:2.4 # … security: stage: test script: -
bundle exec brakeman bundle-audit: stage: test script: - bundle exec bundle-audit check --update
+ Merge Request & Review
None
None
None
Review
None
✅
None
.gitlab-ci.yml image: ruby:2.4 deploy:integration: stage: deploy script: - bundle exec
rake deploy env=${CI_COMMIT_REF_NAME} only: - dev
.gitlab-ci.yml image: ruby:2.4 stages: - build - test - deploy
- # Something missing?
.gitlab-ci.yml image: ruby:2.4 stages: - build - test - deploy
- qa
.gitlab-ci.yml image: ruby:2.4 deploy:integration: stage: deploy script: - bundle exec
rake deploy env=${CI_COMMIT_REF_NAME} only: - dev performance: stage: qa script: - bundle exec rake performance \ target="https://${CI_COMMIT_REF_NAME}.test.trainline.eu/" only: - dev
None
None
None
None
None
None
.gitlab-ci.yml image: ruby:2.4 deploy:integration: stage: deploy script: - bundle exec
rake deploy env=${CI_COMMIT_REF_NAME} only: - dev
.gitlab-ci.yml image: ruby:2.4 deploy:integration: stage: deploy script: - bundle exec
rake deploy env=${CI_COMMIT_REF_NAME} only: - dev - master
.gitlab-ci.yml image: ruby:2.4 deploy:integration: stage: deploy script: - bundle exec
rake deploy env=${CI_COMMIT_REF_NAME} only: - dev - master deploy:production: stage: deploy script: - bundle exec rake deploy env=production only: - master when: manual # ← Manual button to trigger Job
None
None
HERITAGE
6 years
None
None
None
mature
None
alive
builds "as code"
for people
Thank you! QUESTIONS? · Slides → · Demo CI →
https://paulrbr.gitlab.io/talks/dev-workflow.html https://gitlab.com/paulrbr/ruby-ci