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.
203 lines
3.0 KiB
Groovy
203 lines
3.0 KiB
Groovy
import com.homelab.stages.buildDocker
|
|
import com.homelab.stages.notify
|
|
|
|
|
|
def Codecall(Map stepParams) {
|
|
def buildDocker = new buildDocker()
|
|
def notify = new notify()
|
|
checkOutCode()
|
|
config = readYaml file: "${stepParams.file}"
|
|
def maintainer = config.maintainer ?: "jenkins-user"
|
|
def msg = "Job Passed"
|
|
try{
|
|
mvnBuild()
|
|
dockerBuild(config)
|
|
}
|
|
catch(Exception e){
|
|
log.error(e.toString())
|
|
currentBuild.result = env.FAILURE
|
|
msg = "Job Failed. Error: "+ e.toString()
|
|
}
|
|
finally{
|
|
log.info(msg)
|
|
notify.run(msg,maintainer)
|
|
}
|
|
|
|
}
|
|
|
|
def checkOutCode () {
|
|
stage('Checking Out Code') {
|
|
checkout scm
|
|
}
|
|
}
|
|
|
|
def mvnBuild() {
|
|
stage('Maven Build') {
|
|
container('maven') {
|
|
sh "mvn clean install -DskipTests"
|
|
}
|
|
}
|
|
}
|
|
|
|
def Podcall(Map stepParams) {
|
|
podTemplate(
|
|
yaml: libraryResource('org/homelab/pod.yaml')) {
|
|
node(POD_LABEL) {
|
|
Codecall(file: "$stepParams.file")
|
|
}
|
|
}
|
|
}
|
|
|
|
def dockerBuild(Map config) {
|
|
// container('dockerpush') {
|
|
buildDockerGroovyGke.run(config)
|
|
// buildDockerGroovyGke.release(config)
|
|
// }
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// container('tools') {
|
|
// stage('Dockerfile creation') {
|
|
// if (config.dockerfilePresent == "Yes"){
|
|
// sh ''' docker build -t "${config.gcrAddress}/${config.repo_name} -f ${config.dockerFileName}" '''
|
|
|
|
// }
|
|
// else{
|
|
// def artifactId = config.artifactId
|
|
// def version = config.version
|
|
// def doBuild = "NO"
|
|
// sh "ls -al"
|
|
// echo "chmod after creating dockerfile"
|
|
// sh "cd server ; ls"
|
|
// // 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 "
|
|
|
|
// 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/homelab-devops/external-payment-gateway:${tag} ${dockerfile}"
|
|
// sh "docker push asia-southeast1-docker.pkg.dev/supply-poc-351106/homelab-devops/external-payment-gateway:${tag}"
|
|
|
|
|
|
|
|
// // echo "docker build -t ${config.gcrImagePod}/${config.repo_name} ${dockerfile}"
|
|
// // echo "docker tag ${config.gcrImagePod}/${config.repo_name} ${config.gcrAddress}/${config.gcrImagePod}/${config.repo_name}:${tag}"
|
|
// // echo "docker push ${config.gcrAddress}/${config.gcrImagePod}/${config.repo_name}:${tag}"
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|