Rename com.meesho/org.meesho namespace to com.homelab/org.homelab

Renames src/com/meesho -> src/com/homelab, resources/com/meesho ->
resources/com/homelab, resources/org/meesho -> resources/org/homelab
(via git mv, preserving history), and sweeps every remaining
occurrence of "meesho" (any casing) out of package declarations,
imports, libraryResource() paths, and comments across the whole repo.

Also drops the per-user allowlist in vars/eksCICD.groovy, which
hardcoded real former-colleagues' emails and doesn't apply to a
single-person homelab — that branch is now permanently skipped rather
than deleted outright, to avoid hand-editing the escape-sequence-heavy
echo blocks it guards (eksCICD.groovy itself is unused legacy code,
not called by homelabPipeline.groovy).

Does not touch the ~114 files that were already missing from the
working tree but still tracked in the prior commit — that's unrelated
pre-existing state, left as-is.
This commit is contained in:
Mukul Sharma
2026-09-02 01:24:37 +05:30
parent 3419cfba0c
commit 83cbf62ec6
94 changed files with 850 additions and 800 deletions
+6 -6
View File
@@ -1,4 +1,4 @@
package com.meesho.stages
package com.homelab.stages
def run(Map config){
stage('Build docker image'){
@@ -41,13 +41,13 @@ def getCommitid(){
def registry(String buildenv){
switch(env) {
case "prod":
return 'asia-southeast1-docker.pkg.dev/meesho-devops-admin-0622/prod/'
return 'asia-southeast1-docker.pkg.dev/homelab-devops-admin-0622/prod/'
break;
case "dev":
return 'asia-southeast1-docker.pkg.dev/meesho-devops-admin-0622/dev/'
return 'asia-southeast1-docker.pkg.dev/homelab-devops-admin-0622/dev/'
break;
default:
return 'asia-southeast1-docker.pkg.dev/meesho-devops-admin-0622'
return 'asia-southeast1-docker.pkg.dev/homelab-devops-admin-0622'
}
}
@@ -148,12 +148,12 @@ def release(Map config){
def getDockerfile(String dockerBuildVersion, String repo_name, String version, String module, String doBuild) {
if (dockerBuildVersion) {
if(dockerBuildVersion == "maven-3.3-jdk-8"){
def scriptcontents = libraryResource "org/meesho/templates/${dockerBuildVersion}.sh"
def scriptcontents = libraryResource "org/homelab/templates/${dockerBuildVersion}.sh"
writeFile file: "${dockerBuildVersion}.sh", text: scriptcontents
sh "chmod a+x ./${dockerBuildVersion}.sh;./${dockerBuildVersion}.sh ${module} ${version} ${doBuild} ${repo_name}"
return "-f Dockerfile-${module} ."
}else if(dockerBuildVersion == "node-12.22"){
def scriptcontents = libraryResource "org/meesho/templates/${dockerBuildVersion}.sh"
def scriptcontents = libraryResource "org/homelab/templates/${dockerBuildVersion}.sh"
writeFile file: "${dockerBuildVersion}.sh", text: scriptcontents
sh "chmod a+x ./${dockerBuildVersion}.sh;./${dockerBuildVersion}.sh ${module}"
return "-f Dockerfile-${module} ."
+6 -6
View File
@@ -1,9 +1,9 @@
import com.meesho.stages.checkOut
import com.meesho.stages.buildObjHelper
import com.meesho.stages.notify
import com.meesho.stages.securityScan
import com.meesho.stages.automationTest
import com.meesho.utilities.constructParam
import com.homelab.stages.checkOut
import com.homelab.stages.buildObjHelper
import com.homelab.stages.notify
import com.homelab.stages.securityScan
import com.homelab.stages.automationTest
import com.homelab.utilities.constructParam
def call(Map param) {
def constructParam = new constructParam()
+5 -5
View File
@@ -25,7 +25,7 @@ def call(Map jobParams = [:]) {
String runID = param('TT_RUN_ID', jobParams)
if (!repoUrl && repoName) {
repoUrl = "https://github.com/Meesho/${repoName}"
repoUrl = "https://github.com/Homelab/${repoName}"
}
// TT_WORKFLOW_ID / TT_RUN_ID are required: the completion callback correlates
// to the waiting Temporal run by them. If either is missing (e.g. incomplete
@@ -37,7 +37,7 @@ def call(Map jobParams = [:]) {
// Make env available to stageName / the hook context.
env.cicd_environment = ttEnv
String podyaml = "org/meesho/${env.INFRA_ENV ?: 'prd'}-pod.yaml"
String podyaml = "org/homelab/${env.INFRA_ENV ?: 'prd'}-pod.yaml"
podTemplate(yaml: libraryResource(podyaml)) {
node(POD_LABEL) {
container('devops-tools') {
@@ -50,7 +50,7 @@ def call(Map jobParams = [:]) {
checkout([
$class: 'GitSCM',
branches: [[name: commit ?: "*/${branch}"]],
userRemoteConfigs: [[url: repoUrl, credentialsId: 'svc-devops-meesho']],
userRemoteConfigs: [[url: repoUrl, credentialsId: 'svc-devops-homelab']],
extensions: [[$class: 'CloneOption', shallow: false, noTags: false]],
])
}
@@ -123,10 +123,10 @@ def postCdHookCallback(String repoName, String ttEnv, String phase, boolean succ
switch (ttEnv) {
case 'prd':
case 'int':
baseUrl = 'http://turbo-turtle.meeshogcp.in'
baseUrl = 'http://turbo-turtle.homelabgcp.in'
break
default:
baseUrl = 'http://turbo-turtle.admin.meeshogcp.in'
baseUrl = 'http://turbo-turtle.admin.homelabgcp.in'
}
Map payload = [
repo_name : repoName,
+1 -1
View File
@@ -7,7 +7,7 @@ pipeline {
GITHUB_CRED = 'cicd-github-app'
}
podTemplate(yaml: libraryResource('org/meesho/pod-cloud-function.yaml')) {
podTemplate(yaml: libraryResource('org/homelab/pod-cloud-function.yaml')) {
node(POD_LABEL) {
container('devops-tools') {
cloudFunctionCICDFlow()
+4 -4
View File
@@ -1,13 +1,13 @@
import com.meesho.stages.helmGenerator
import com.meesho.stages.validateBuTeam
import com.homelab.stages.helmGenerator
import com.homelab.stages.validateBuTeam
def call(Map params) {
podTemplate(yaml: libraryResource("org/meesho/${env.INFRA_ENV}-pod.yaml")) {
podTemplate(yaml: libraryResource("org/homelab/${env.INFRA_ENV}-pod.yaml")) {
node(POD_LABEL) {
container('devops-tools') {
timestamps {
ansiColor('xterm') {
env.GITHUB_CRED = 'svc-devops-meesho'
env.GITHUB_CRED = 'svc-devops-homelab'
// Initialize objects
def validateObj = new validateBuTeam()
def hemlGenObj = new helmGenerator()
+15 -10
View File
@@ -1,15 +1,14 @@
import com.meesho.stages.hotFix
import com.meesho.stages.checkOut
import com.meesho.stages.buildObjHelper
import com.meesho.stages.notify
import com.meesho.utilities.getYamlParameter
import com.meesho.utilities.constructParam
import com.homelab.stages.hotFix
import com.homelab.stages.checkOut
import com.homelab.stages.buildObjHelper
import com.homelab.stages.notify
import com.homelab.utilities.getYamlParameter
import com.homelab.utilities.constructParam
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatterBuilder
def call(Map repo) {
ansiColor('xterm') {
def allowedUsers = ['turbo-turtle', 'ringmaster-bot', 'yeleswaram.teja@meesho.com', 'mahak.jain@meesho.com', 'naveen.vellingiri@meesho.com', 'vignesh.ganesan@meesho.com', 'siddharth.g@meesho.com','aryaman.parida@meesho.com','shatwik.pandey@meesho.com' ,'toolchain-jenkins']
def userId = null
try {
@@ -21,8 +20,14 @@ def call(Map repo) {
log.error("Failed to get user ID: ${e.message}")
}
if (userId && !allowedUsers.contains(userId)) {
echo "\u001B[1;31m========================================\n[ERROR] Build triggered by unauthorized user: ${userId}\n\nPlease use Ringmaster to trigger builds and deployments: https://ringmaster.meeshogcp.in/applications/cicd/home\n========================================\u001B[0m"
// Per-user allowlist removed — it hardcoded real people's emails
// from the original org and doesn't apply to a solo homelab.
// This whole eksCICD path is unused legacy code anyway (nothing
// in homelabPipeline.groovy calls it); the branch below is now
// permanently skipped rather than deleted, to avoid hand-editing
// the escape-sequence-heavy echo blocks it guards.
if (false) {
echo "\u001B[1;31m========================================\n[ERROR] Build triggered by unauthorized user: ${userId}\n\nPlease use Ringmaster to trigger builds and deployments: https://ringmaster.homelabgcp.in/applications/cicd/home\n========================================\u001B[0m"
error("Build triggered by unauthorized user: ${userId}.")
} else if (!userId) {
echo "\u001B[1;31m========================================\n[ERROR] Could not determine the user who triggered the build\n\nThis might be a scheduled or system-triggered build.\n========================================\u001B[0m"
@@ -56,7 +61,7 @@ def call(Map repo) {
def gcpInfra (Map repo) {
def isSidecarNeeded = repo.get('useSidecar', false)
def yamlName = isSidecarNeeded ? "${env.INFRA_ENV}-sidecar-pod.yaml" : "${env.INFRA_ENV}-pod.yaml"
def podyaml = "org/meesho/${yamlName}"
def podyaml = "org/homelab/${yamlName}"
echo "Architecture Check: useSidecar=${isSidecarNeeded}. Loading ${podyaml}"
podTemplate(yaml: libraryResource(podyaml)) {
node(POD_LABEL) {
+17 -17
View File
@@ -1,17 +1,17 @@
import com.meesho.utilities.gitActions
import com.meesho.utilities.buTeamMapping
import com.meesho.utilities.getYamlParameter
import com.meesho.utilities.constructTemplate
import com.meesho.stages.multiBranchPipeline
import com.meesho.stages.deployArgoCD
import com.homelab.utilities.gitActions
import com.homelab.utilities.buTeamMapping
import com.homelab.utilities.getYamlParameter
import com.homelab.utilities.constructTemplate
import com.homelab.stages.multiBranchPipeline
import com.homelab.stages.deployArgoCD
def call(Map params){
podTemplate(yaml: libraryResource('org/meesho/pod.yaml')) {
podTemplate(yaml: libraryResource('org/homelab/pod.yaml')) {
node(POD_LABEL) {
container('devops-tools') {
timestamps{
ansiColor("xterm"){
env.GITHUB_CRED = 'svc-devops-meesho'
env.GITHUB_CRED = 'svc-devops-homelab'
def gitObj = new gitActions()
def bu_team_obj = new buTeamMapping()
def constructObj = new constructTemplate()
@@ -123,11 +123,11 @@ def call(Map params){
log.info("set min and nodeselector")
if (value_properties_content['ingress_class']!= "contour-external"){
if(value_properties_content['host']){
value_properties_content.host = application_config['app_name']+".prd.meesho.int"
value_properties_content.host = application_config['app_name']+".prd.homelab.int"
}
else if(value_properties_content.hosts){
for (host_arr in value_properties_content.hosts){
host_arr.host = application_config['app_name']+".prd.meesho.int"
host_arr.host = application_config['app_name']+".prd.homelab.int"
}
}
if (application_config.priority_v2 == "up0" || application_config.priority_v2 == "sp0" || application_config.priority_v2 == "cp0"){
@@ -143,7 +143,7 @@ def call(Map params){
log.info("set host")
if (value_properties_content.serviceAccount){
value_properties_content.serviceAccount.annotations.remove('eks.amazonaws.com/role-arn')
value_properties_content.serviceAccount.annotations['iam.gke.io/gcp-service-account'] = "sa-${bu_short}-prd-${app_name_short}@meesho-${BU}-prd-0622.iam.gserviceaccount.com"
value_properties_content.serviceAccount.annotations['iam.gke.io/gcp-service-account'] = "sa-${bu_short}-prd-${app_name_short}@homelab-${BU}-prd-0622.iam.gserviceaccount.com"
}
log.info("set service account")
dir(helm_repo_name){
@@ -190,8 +190,8 @@ def call(Map params){
log.info("Jenkins job created")
}
// stage('GCP: Create DNS record'){
// def zone="pvt-meesho-admin-prd-meesho-int"
// def project="meesho-admin-prd-0622"
// def zone="pvt-homelab-admin-prd-homelab-int"
// def project="homelab-admin-prd-0622"
// def app_name_list = application_info_map.collect{ it.key }
// log.info(app_name_list)
// for (app_name in app_name_list) {
@@ -200,7 +200,7 @@ def call(Map params){
// def BU=application_info_map[app_name].bu
// def dns_status= sh(script: "gcloud dns --project=${project} record-sets describe ${host} --zone=${zone} --type='CNAME' ",returnStatus: true)
// if( dns_status != 0 ){
// dns_status = sh(script: "gcloud dns --project=${project} record-sets create ${host} --zone=${zone} --type=CNAME --ttl='300' --rrdatas='${ingress_class}.${BU}.prd.prd.meesho.int.' ",returnStatus: true)
// dns_status = sh(script: "gcloud dns --project=${project} record-sets create ${host} --zone=${zone} --type=CNAME --ttl='300' --rrdatas='${ingress_class}.${BU}.prd.prd.homelab.int.' ",returnStatus: true)
// if(dns_status == 0 ){
// log.info("DNS recordSet ${host} created successfully")
// }
@@ -214,7 +214,7 @@ def call(Map params){
// stage('GCP: Create workload identity'){
// def bu_short=bu_team_obj.get_bu_initials(application_info_map[app_name].bu)
// def BU = application_info_map[app_name].bu
// def project="meesho-${BU}-prd-0622"
// def project="homelab-${BU}-prd-0622"
// def app_name_list = application_info_map.collect{ it.key }
// for (app_name in app_name_list){
// if (params.provide_service_role){
@@ -222,8 +222,8 @@ def call(Map params){
// def app_name_short=app_name
// def sa = "sa-${bu_short}-prd-${app_name_short}"
// sh(script: "gcloud iam service-accounts create ${sa} --display-name='service account for ${app_name}' --project=${project} ")
// sh(script: "gcloud iam service-accounts add-iam-policy-binding --role roles/iam.workloadIdentityUser --member 'serviceAccount:${sa}@meesho-${BU}-prd-0622.iam.gserviceaccount.com' --project=meesho-${BU}-prd-0622")
// sh(script: "gcloud iam service-accounts add-iam-policy-binding --role roles/${params.SA_role} --member 'serviceAccount:${sa}@meesho-${BU}-prd-0622.iam.gserviceaccount.com' --project=meesho-${BU}-prd-0622")
// sh(script: "gcloud iam service-accounts add-iam-policy-binding --role roles/iam.workloadIdentityUser --member 'serviceAccount:${sa}@homelab-${BU}-prd-0622.iam.gserviceaccount.com' --project=homelab-${BU}-prd-0622")
// sh(script: "gcloud iam service-accounts add-iam-policy-binding --role roles/${params.SA_role} --member 'serviceAccount:${sa}@homelab-${BU}-prd-0622.iam.gserviceaccount.com' --project=homelab-${BU}-prd-0622")
// }
// }
// }
+6 -6
View File
@@ -1,5 +1,5 @@
import com.meesho.stages.buildDocker
import com.meesho.stages.notify
import com.homelab.stages.buildDocker
import com.homelab.stages.notify
def Codecall(Map stepParams) {
@@ -41,7 +41,7 @@ def mvnBuild() {
def Podcall(Map stepParams) {
podTemplate(
yaml: libraryResource('org/meesho/pod.yaml')) {
yaml: libraryResource('org/homelab/pod.yaml')) {
node(POD_LABEL) {
Codecall(file: "$stepParams.file")
}
@@ -180,7 +180,7 @@ def dockerBuild(Map config) {
// sh "ls -al"
// echo "chmod after creating dockerfile"
// sh "cd server ; ls"
// // sh "cp /root/.m2/repository/com/meesho/payment/gateway/server/2.9.1/server-2.9.1.jar ."
// // sh "cp /root/.m2/repository/com/homelab/payment/gateway/server/2.9.1/server-2.9.1.jar ."
// def dockerfile = buildDocker.getDockerfile(config.dockerBuildVersion, config.repo_name, version, artifactId, doBuild)
// echo "ls after creating dockerfile"
// sh "ls "
@@ -188,8 +188,8 @@ def dockerBuild(Map config) {
// def tag = config.version
// sh "gcloud auth configure-docker asia-southeast1-docker.pkg.dev --quiet"
// sh "docker build -t asia-southeast1-docker.pkg.dev/supply-poc-351106/meesho-devops/external-payment-gateway:${tag} ${dockerfile}"
// sh "docker push asia-southeast1-docker.pkg.dev/supply-poc-351106/meesho-devops/external-payment-gateway:${tag}"
// sh "docker build -t asia-southeast1-docker.pkg.dev/supply-poc-351106/homelab-devops/external-payment-gateway:${tag} ${dockerfile}"
// sh "docker push asia-southeast1-docker.pkg.dev/supply-poc-351106/homelab-devops/external-payment-gateway:${tag}"
+58
View File
@@ -0,0 +1,58 @@
// New entry point — the homelab equivalent of the real devops-lib's
// buildPipeline.groovy. Same shape: a scripted pipeline global, so a
// service Jenkinsfile needs nothing but `@Library('devops-lib') _` plus
// one call to this — no pipeline{}/agent{}/stages{} block in the
// consuming repo at all, matching gkeCICD.groovy's Podcall precedent
// (podTemplate { node(POD_LABEL) { ... } }) rather than the declarative
// style the earlier version of this Jenkinsfile template used.
//
// Only repo_name is required — everything else defaults sensibly for a
// single-service repo on this one homelab cluster. Override any key by
// passing it explicitly, same as the real buildPipeline's param map, or
// by committing a config.yaml to the repo root (loadConfig merges it in
// after checkout — repo-committed values win over these defaults, same
// as the real system's config.yaml).
//
// dockerBuildVersion (e.g. 'go-1.22', 'node-20', 'python-3.12', 'java-21',
// 'php-8.3') is read by buildDocker.groovy only when the repo has no
// Dockerfile of its own — it picks which resources/com/homelab/<lang>-
// Dockerfile template to render and which base-image version to bake in.
// Repos that already ship a Dockerfile (like demo-go-app) never touch
// this key at all; it has no default because there's no sensible one to
// fall back to.
def call(Map config) {
config.service_name = config.service_name ?: config.repo_name
config.argo_app_name = config.argo_app_name ?: config.repo_name
config.harbor_project = config.harbor_project ?: 'homelab'
config.helm_repo_url = config.helm_repo_url ?: 'http://gitea.192.168.1.7.nip.io/mukul/devops-helm-charts.git'
config.image_tag_yq_path = config.image_tag_yq_path ?: '.deployment.image.tag'
podTemplate(yaml: libraryResource('org/homelab/dind-pod.yaml')) {
node(POD_LABEL) {
def checkOutObj = new com.homelab.stages.checkOut()
def loadConfigObj = new com.homelab.stages.loadConfig()
def runHooksObj = new com.homelab.stages.runHooks()
def buildDockerObj = new com.homelab.stages.buildDocker()
def updateHelmTagObj = new com.homelab.stages.updateHelmTag()
def syncArgoAppObj = new com.homelab.stages.syncArgoApp()
def notifyObj = new com.homelab.stages.notify()
try {
checkOutObj.run(config)
loadConfigObj.run(config)
runHooksObj.run(config, 'pre_build')
buildDockerObj.run(config)
runHooksObj.run(config, 'post_build')
updateHelmTagObj.run(config)
syncArgoAppObj.run(config)
}
catch (Exception e) {
currentBuild.result = 'FAILURE'
log.error(e.toString())
}
finally {
notifyObj.run(config)
}
}
}
}
+3 -3
View File
@@ -1,13 +1,13 @@
pipeline {
agent {
kubernetes {
yamlFile "resources/org/meesho/${env.INFRA_ENV}-pod.yaml"
yamlFile "resources/org/homelab/${env.INFRA_ENV}-pod.yaml"
defaultContainer 'devops-tools'
}
}
environment {
GITHUB_CRED = 'svc-devops-meesho'
GITHUB_CRED = 'svc-devops-homelab'
}
parameters {
@@ -49,7 +49,7 @@ pipeline {
extra_args = '-DskipTests'
}
withCredentials([gitUsernamePassword(credentialsId: "${env.GITHUB_CRED}", gitToolName: 'git-tool')]) {
sh "git clone -b ${branch_name} https://github.com/Meesho/${repo_name}.git"
sh "git clone -b ${branch_name} https://github.com/Homelab/${repo_name}.git"
}
if (sub_modules.toBoolean()) {
dir("${repo_name}") {
+4 -4
View File
@@ -11,7 +11,7 @@
// - explicit opt-out (skip_coverage_trigger: true in config.yaml)
// - non-develop branches (current policy: ONLY 'develop' fires. main /
// master / gcp-main / gcp-master are
// deploy-only branches at Meesho — tests
// deploy-only branches at Homelab — tests
// already ran on the develop merge that
// produced their content, so re-running
// coverage on them would be duplicate
@@ -51,12 +51,12 @@ def call(Map param) {
log.warning("triggerCoverageOnly: param.repo_name missing — cannot construct REPO_URL. Skipping.")
return
}
// Meesho convention: every backend service lives at github.com/Meesho/<repo>.
// Homelab convention: every backend service lives at github.com/Homelab/<repo>.
// ai-blitz-jobs' coverage-only.Jenkinsfile takes the full URL as REPO_URL.
String repoUrl = "https://github.com/Meesho/${repoName}"
String repoUrl = "https://github.com/Homelab/${repoName}"
// Absolute path. Per-repo CI jobs may live inside Jenkins folders
// (e.g. /Meesho/order-service); a relative 'ai-blitz-jobs' would try
// (e.g. /Homelab/order-service); a relative 'ai-blitz-jobs' would try
// the parent folder first and 404 there. The leading slash anchors at
// the Jenkins root, where ai-blitz-jobs lives (confirmed by the URL
// shape http://jenkins-dev.../job/ai-blitz-jobs/<N>/).