Article about this journal's infrastructure #3

Closed
fnmain wants to merge 11 commits from how_to_infra into master
Showing only changes of commit f05c2b2b27 - Show all commits

View file

@ -56,11 +56,11 @@ Deployment is the most complex part of our pipeline; getting the written, produc
- Minify and compress compiled HTML - Minify and compress compiled HTML
- Index articles with our search engine - Index articles with our search engine
Because our CI tool is running this code, we can know which articles need compilation, who wrote those articles, and if any articles need to be deleted. Via environment variables, our CI tool will pass to our code the git branch we're running on, the git commit that came before the latest one, and the latest git commit. Our code can then use this information to... Because our CI tool is running this code, we can know which articles need compilation, who wrote those articles, and if any articles need to be deleted. Our CI tools will put our code in the working directory of our git repo. And via environment variables, the CI tool will tell us which files have changed, how the pipeline was triggered (via pull request, code push, etc.), as well as which git branch production resides in, and which branch our code is currently in. Our code can then use this information to...
- Run a diff between the two commits, which is how we know which files need to be compiled, and which files have been deleted - Stat the changed files, which is how we know which files need to be compiled, and which files have been deleted
- Run a blame on the new articles, which is how we figure out who wrote them - Run a blame on new articles, which is how we figure out who wrote them
- See if we are we have changed the main branch, and index new articles if so - See if we are we have changed the production branch, and index new articles if so
In our case, what CI allows us to do is keep as much of our pipeline as automated as possible. Our journalists should only need to focus on writing good articles, not wrestling with tooling. Coming back to the benefits of plain text, git is an extremely powerful tool for working with plain text. In our case, what CI allows us to do is keep as much of our pipeline as automated as possible. Our journalists should only need to focus on writing good articles, not wrestling with tooling. Coming back to the benefits of plain text, git is an extremely powerful tool for working with plain text.