I would like to imitate the following formatting.
The randomness of the styles should be adjustable by indicating the seed used so that the same diagram is always repeated if necessary.
I would also like to have the same vertical distances between the nodes automatically if possible.
Here is a starting code.
\documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes, arrows} \begin{document} % The styles \tikzset{ block/.style = { rectangle, draw, text width=5em, text centered, minimum height=4em }, connection/.style={ draw, -latex' } } \begin{tikzpicture}[node distance = 2cm, auto] % Place nodes \node [block] (lint) {Lint}; \node [block, below of = lint] (run) {Run unit and integration tests}; \node [block, below of = run] (build) {Build image}; \node [block, below of = build] (upload) {Upload image to registry}; \node [block, below of = upload, node distance=2.5cm] (update) {Update running service to use new image}; % Draw arrows. \path [connection] (lint) -- (run); \path [connection] (run) -- (build); \path [connection] (build) -- (upload); \path [connection] (upload) -- (update); \end{tikzpicture} \end{document} 

\tikzstyleis obsolete. Use\tikzsetinsteadpositioninglibrary and its keys <placement>=of <reference>` instead of<placement> of=<reference>. [1], [2]. If you have figured out the randomness and the decorations you will have to do the drawing and the filling separately since they describe different paths:preaction/postaction.calligraphylibrary might help with the varying line width.drawing the border, you should be able to use the optionuse penon it after you've defined a\pen, of course and have loaded thecalligraphylibrary.