Building My Resume
As I write this I am actively looking for new professional opportunities. Part of that process involves ensuring my résumé (or CV or curriculum vitae if you prefer Latin to French) is up-to-date.
LaTeX Résumé
Rather than use a WYSIWYG word processor such as Microsoft Word or OpenOffice, I write my resume in LaTeX, like a nerd. LaTeX is a typesetting system, commonly used in academia, especially in technical articles and publications to elegantly typeset mathematic and scientific equations. I started using it in college for study guides and problem sets in my econ courses.
One of the difficulties of writing documents in the TeX typesetting/markup language is that the LaTeX system must be installed in order to compile .tex
files to PDFs. There are distributions for most major operating systems and I have installed and used them on various systems when actively developing LaTeX files. However, it can be overkill to install it everywhere, especially when needed infrequently.
I like to keep an up-to-date copy of my resume online here so I can easily share or reference the latest version. Originally, I made an effort to upload an updated PDF whenever I made changes. But like any repeated, manual process that relies human memory and effort, it was crying out for automation. So like a good engineer, rather than spend two minutes on something a few times a year, I spent a couple of hours automating the process.
The CV/CD Build Process
Recently, I’ve started learning to use continuous integration and continuous delivery tools to become a better systems engineer. While I’m still something of a beginner, this project seemed like a relatively simple, albeit useful, application of CI/CD. I briefly considered other build tools such as Jenkins and Travis CI, but since my ultimate goal was to upload the compiled PDF to S3, I decided to use AWS CodeBuild, with the cv.tex
source stored on GitHub.
In addition to the TeX file containing the contents and formatting of my CV, the GitHub repo also includes the buildspec.yml
file, which define the what CodeBuild will actually do during the build process.
AWS has a pretty thorough guide to the buildspec.yml
syntax in the CodeBuild docs. There’s a lot you can do in the build specification file, but the one for this project is pretty straightforward. It instructs CodeBuild to install the LaTeX system into the build environment and then build (compile) the PDF from the cv.tex
file (there is a minor quirk where LaTeX requires the pdflatex
command be run twice to properly format the document). The only artifact (files output by the build process) of interest is the actual PDF. This is uploaded straight to the root of the S3 bucket by CodeBuild, sans packaging or encryption, ensuring the resume hosted online is always up-to-date.
This is a pretty simple build pipeline. There aren’t really any tests—the build either succeeds or it doesn’t, and its up to me to check the CodeBuild logs in case of the latter. But it accomplishes the goal I set out with, namely, automating the process of building and deploying the PDF of my resume. The resulting artifact is uploaded to S3, where it sits behind CloudFront. If the build fails, the previous version remains in place, ensuring there is always a valid resume at the URL.
Conclusion
As I said before, this is a simple build pipeline, really not much more than a beginner’s tutorial. It lacks the integration and unit testing that should be hallmarks of a robust continuous integration. However, the various steps involved—a webhook to trigger a build upon pushing to source control, installing the tools and setting up the build environment, running commands to actually compile and build the desired artifacts, and then uploading those artifacts to S3—give a good idea of what a continuous deployment process sets out to do. It also accomplishes one of the key goals of any automated build pipeline, namely removing human error from the process. It’s simple, and yet somewhat elegant in its execution. And of course, it brings a whole new meaning to the term “Resume Driven Development.”