How we are maintaining ProtoBuf (Protocol Buffers) at NucleiMarch 2, 2020π₯ 1 min readHow we are maintaining ProtoBuf (Protocol Buffers) at Nuclei!We at Nuclei, welcome the latest technologies in our stack. We have our Micro Services in Java and Go Lang. I as a Full Stack Developer got an opportunity to completely build this system for us.GitHub Actions + GitHub Package Registry + gRPCProblems which our solution solved!Getting Go and Java artifacts at a swooshCost effective practiceRobust ArchitectureManaging protocol buffer definitions at easeGenerating the appropriate language files from the definitionsFollowing Semantic Versioning along with Pre-Releases.Challenges we faced.Managing proto files is a cumbersome task for both the user and the creator of the proto. Distributing it in a cost effective yet efficient method was another big task. Using JFrog Artifactory with Jenkins needed separate server to host.How We Manage Protocol Buffer Files.We have a monorepo known as Protorepo where we keep our latest protocol buffer files.How do we build the Java and Go Lang code?We are using GitHub Actions + GitHub Package Registry. When one creates a new release. Letβs say version V1.0.0. It triggers our GitHub Action which generates GitHub Packages (Artifacts for Java) available for the other projects and it even pushes new releases with same versions for Go Lang according to the project name.How do we pull dependencies?For java βjsonCopy1plugins {2 id("maven-publish")3 }45 publishing {6 repositories {7 maven {8 name = "GitHubPackages"9 url = uri("https://maven.pkg.github.com/USERNAME/URL")10 credentials {11 username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")12 password = project.findProperty("gpr.key") ?: System.getenv("PASSWORD")13 }14 }15 }16 publications {17 gpr(MavenPublication) {18 from(components.java)19 }20 }21 }For Go βmarkupCopy1go get <URL of the release>How helpful it is?We are able to generate 30+ artifacts for Go as well as Java in less than 3 minutes.Building code and shipping it was never so quick and easy for us.All our Development Operations become even more easier.GitHub gives us storage and CI & CD minutes in our team plan, so why not use it.Data is safe and secured.Future ScopeImplementing Chat-Ops with HuBot.