Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Patience and the right tools II – ways to handl...
Search
stefan judis
June 28, 2018
Technology
220
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Patience and the right tools II – ways to handle content model changes
stefan judis
June 28, 2018
More Decks by stefan judis
See All by stefan judis
Back to boring (part 2)
stefanjudis
0
390
Playwright can do this?
stefanjudis
0
260
Things you should know about Frontend Development in 2022
stefanjudis
0
570
Throw yourself out there for fun and profit
stefanjudis
0
140
Back to Boring
stefanjudis
1
540
Wanna scale up? Make sure your CMS is ready for it!
stefanjudis
0
290
Did we(b development) lose the right direction?
stefanjudis
6
2.2k
Regular expressions – my secret love
stefanjudis
1
1.1k
Write a Function
stefanjudis
0
630
Other Decks in Technology
See All in Technology
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
130
生成AIのテナント制御とシャドーMCP対策 | AIを"止めずに"、情報を守る
yukun
0
140
20260906 「AWS運用入門」著者が教える、運用業務への生成AI活用入門
masaruogura
0
260
Screen Lens - 今見てる画面を翻訳する
komagata
0
240
なぜSRE・セキュリティは評価されないのか?守りの組織を事業成長エンジンに変えた実践
cscengineer
PRO
3
2.4k
AIネイティブプロダクトで顧客価値を最大化するプロダクトエンジニアとFDEの協働
righttouch
PRO
0
230
全員がプロダクトへ向き合う組織を持続成長させるために——組織づくりのフライホイールと4象限 / The Flywheel Model and Four Quadrants for Organizational Design
hiro_torii
4
960
Microsoft 365 Copilot chat -tekoälypalvelun tietosuojaongelmat
hponka
0
650
Redmine 7.0で私が開発した新機能の狙いと背景
vividtone
1
160
Omarchy Quattro の日本語設定周り
simosako
2
140
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
260
「図書館」という名前のままでいいのか -Code4Lib JAPANカンファレンス2026 アンカンファレンス報告- / Code4Lib JAPAN Conference 2026: Unconference Report
ykiyota
0
160
Featured
See All Featured
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
320
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
520
Skip the Path - Find Your Career Trail
mkilby
1
220
Bash Introduction
62gerente
615
220k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
730
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
370
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Faster Mobile Websites
deanohume
310
32k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
510
Transcript
Patience and the right tools @stefanjudis Ways to handle content
model changes
Stefan Judis Frontend Developer, Occasional Teacher, Meetup Organizer ❤ Open
Source, Performance and Accessibility ❤ @stefanjudis
NOBODY(!) GETS IT RIGHT THE FIRST TIME...
4 WAYS TO SURVIVE SHARE & REUSE ANALYSE EVOLVE
5 WAYS TO SURVIVE SHARE & REUSE ANALYSE EVOLVE
github.com/contentful/contentful-migration
github.com/contentful/contentful-migration PROGRAMMATIC CONTENT MODEL CHANGES
MIGRATION CLI CONTENT TYPE OPERATIONS Create a content type 01
02 03 04 05 Delete a content type Edit a content type Create/edit/delete fields Change a field ID
Transform an entry in place 01 02 Derive an entry
from another MIGRATION CLI CONTENT TRANSFORMATIONS
MIGRATION CLI ADVANTAGES Repeatable 01 02 03 04 Can be
kept in VC Includes sanity checks Perfect for CI
None
speakerdeck.com/stefanjudis/patience-and-the-right-tools-ways-to-approach-content-modelling youtu.be/eX2FzlA-QnQ
13 How to DISCARD TEST PREVIEW a migration?
Sandbox Environments
None
CREATE MULTIPLE VERSIONS OF A SPACE CHANGE/TEST THEM IN ISOLATION
cdn.contentful.com/spaces/{space_id}/entries const contentful = require('contentful'); const client = contentful.createClient({ space:
'<space_id>', accessToken: '<content_delivery_api_key>' }); client.getEntries();
cdn.contentful.com/spaces/{space_id}/environments/{environment_id}/entries const contentful = require('contentful'); const client = contentful.createClient({ space:
'<space_id>', environment: '<environment_id>', accessToken: '<content_delivery_api_key>' }); client.getEntries();
COPIED Content types Entries Assets Locales UI-extensions Saved views SHARED
Users & space memberships Roles & permissions API keys Web hooks
youtu.be/7DE6PQ3tPyI
21 Common use cases LOCAL DEVELOPMENT STAGING/QA CONTINUOUS INTEGRATION
22 Common use cases LOCAL DEVELOPMENT STAGING/QA CONTINUOUS INTEGRATION
None
24 Common use cases LOCAL DEVELOPMENT STAGING/QA CONTINUOUS INTEGRATION
FEATURE SANDBOXES
FEATURE SANDBOXES ENVIRONMENT SANDBOXES
ENVIRONMENT SANDBOXES FEATURE SANDBOXES CI SANDBOXES
www.contentful.com/r/knowledgebase/cms-as-code/ www.contentful.com/developers/docs/concepts/multiple-environments/
www.contentful.com/r/knowledgebase/cms-as-code/ www.contentful.com/developers/docs/concepts/multiple-environments/ BUT HOW TO DO THIS?
None
migrations 0_0_4.js 0_0_5.js 0_0_6.js 0_0_7.js 0_0_8.js
0_0_8.js module.exports = function runMigration(migration) { const post = migration.editContentType("post");
post .createField("rating") .name("Rating") .type("Number") .required(false); return; };
- run: name: Preparing environment for testing command: | .
venv/bin/activate python scripts/migration_prep.py "CI_$CIRCLE_BRANCH" scripts/migrate.js $SPACE_ID "CI_$CIRCLE_BRANCH" $MANAGEMENT_API_KEY
- run: name: Preparing environment for testing command: | .
venv/bin/activate python scripts/migration_prep.py "CI_$CIRCLE_BRANCH" scripts/migrate.js $SPACE_ID "CI_$CIRCLE_BRANCH" $MANAGEMENT_API_KEY client = contentful_management.Client(MANGEMENT_API_KEY) environment = client.environments(SPACE_ID).create(TESTING_ENV, {"name": TESTING_ENV})
- run: name: Preparing environment for testing command: | .
venv/bin/activate python scripts/migration_prep.py "CI_$CIRCLE_BRANCH" scripts/migrate.js $SPACE_ID "CI_$CIRCLE_BRANCH" $MANAGEMENT_API_KEY const {default: runMigration} = require('contentful-migration/built/bin/cli'); await runMigration({ /* ... */ }); client = contentful_management.Client(MANGEMENT_API_KEY) environment = client.environments(SPACE_ID).create(TESTING_ENV, {"name": TESTING_ENV})
Keep code and content model in sync
Demo
Feedback? Ideas?
Integrate your content model into your delivery pipeline
Thanks. @stefanjudis Slides ctfl.io/ci-environments Example ctfl.io/ci-environments-example