Member-only story
Build a DevOps Pipeline for the Ethereum Blockchain
Web3 meets DevOps

I tweeted about a DevOps pipeline I created for a Web3 project which got more engagement than I expected.
The responses encouraged me to complete the pipeline and create a blog series to show others what I had done.
In this guide, I will show how I implemented DevOps best practices for a Distributed Application (dApp) running on the Ethereum blockchain.
This will not be an introduction to DevOps or Web3 development. There are plenty of resources online to bring you up to speed on Web3 and DevOps. Therefore, prior knowledge of both topics is assumed. This will simply show how to apply DevOps to Web3 development.
The final pipeline built using Azure Pipelines will have a Dev, QA, and Prod environment. The Dev environment will deploy the application to a personal Ethereum blockchain using Ganache running in a container. QA will deploy to the Rinkeby testnet and finally Prod will deploy to Ethereum mainnet. The front end will be hosted in Azure Static Web Apps.

Compiling and Testing
To begin we need a project. For this example, I will be using Truffle to scaffold my Distributed Application (dApp).
truffle unbox react myapp
This command created a project with a React front end and contracts written in Solidity. I wrote my tests in JavaScript, so I deleted the TestSimpleStorage.sol file in the test folder. I also used NPM instead of Yarn, so I deleted the yarn.lock file from the client folder. With the project cleaned up I initialized and committed my code with git.
git init
git branch -m main
git add -–all
git commit -a -m “init”
I created a new branch named “blog/part1” for this section.
git checkout -b blog/part1
Before I got too far, I wanted to determine how to compile, test and deploy the code locally using Truffle. I will duplicate these commands in the final pipeline.