WIP: Convert blog middleman instance to a dedicated CI job and remove need for symlinks
What
Convert blog Middleman config to be a dedicated CI job, and not require symlinks.
How
The current plan is to use the same approach for the blog sub-site that we used for the part 1 of the handbook monorepo refactor.
Tasks
(Note: Some of these have already been done in separate MRs)
-
Resolve circular dependency in https://gitlab.com/gitlab-com/www-gitlab-com/blob/8a666d57f4b9508d75a5888a29fc491ceefdd1a8/source/includes/recent-posts.html.haml#L4-4 -
Move /releases/gitlab-com/index.htmlout from underreleasesand redirect (it doesn't use the releases template, and requires generators data, so it doesn't belong there, at least not for this phase of the move). -
Make necessary updates to sites/blog/config.rbmiddleman config -
Move proxies from top-level config to blog config. -
blog/categories/<category>/index.html
-
-
Remove references to blog from top-level config -
Delete extensions/listen_monkeypatch -
Skip blog in PartialBuild -
Compare CI performance of single build to PartialBuildBlog. - See how much time is actually saved, and if it's still necessary, or can be avoided and removed along with the
blog postspecific logic in the CI file.
- See how much time is actually saved, and if it's still necessary, or can be avoided and removed along with the
-
Abstract out OnlyBlogResources/OnlyHandbookResources. -
Abstract out duplication across config files. - Possibly split into multiple common include files, to allow easier overriding? Only if it makes sense and doesn't seem like premature optimization.
-
Remove broad regex matches in shared_filesconfig, and replace with individual filenames. -
Remove orphaned file under source/posts -
Remove commented config sections -
Look into DRYing up duplicated YAML load/parse of data/monorepo_sites.yml -
Update/move all occurrences of source/releases -
Doublecheck coordination of #7983 (closed), if it is still in progress and not merged. -
Separate CI job for releases proxy resource which uses generator/releases.rbwhich accesses the API.- QUESTION: Does it need a separate caching strategy, or is this only needed for the Direction generator?
-
Final compare with master to doublecheck that includes/blogfiles have not changed. -
Final pass of config, remove all unused commented code.
Additional unrelated tasks
Do these as separate MRs, tracking them here for now:
-
Fix all occurrences of File.expand_path("#{monorepo_root}/source", __dir__)(no necessary to expand ifmonorepo_rootis used, because it's already an absolute path). -
Revisit approach of including common files to remove unnecessary complexity and per-site customization: - Don't need to have
extensions/middleman_source_watcher_find_monkeypatch.rbor multiplefiles.watchentries. These were an unnecessary optimization to avoid watching the entire rootsourcedirectory, but that's unnecessary if we use a curatedonlylist. So, on master (backported to handbook)... - remove the monkey patch
- go to a single
files.watchentry forsource - have its list of
onlybe data-driven bydata/monorepo_site_paths.yml(may need to restructure it to have different keys).
- Don't need to have
Related issues
Closes #7972 (closed)
Edited by Chad Woolley