diff --git a/Jenkinsfile b/Jenkinsfile index a243d2c..4e94b6e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,30 +16,6 @@ pipeline { } } } - stage('Check First Pipeline Status') { - steps { - script { - def jobName = "custom-dind-pipeline" - def jobURL = "http://jenkins-server.default.svc.cluster.local:8080/job/${jobName}/api/json" - - // Fetch the raw JSON response - def response = sh(script: "curl -s ${jobURL}", returnStdout: true).trim() - - // Parse JSON using Groovy's built-in JSON handling - def jsonSlurper = new groovy.json.JsonSlurper() - def jobData = jsonSlurper.parseText(response) - - // Extract the first build number to check if the job has run at least once - def firstBuildNumber = jobData.firstBuild?.number - - if (firstBuildNumber == null) { - error("Pipeline '${jobName}' has **never** run! Stopping execution.") - } - - echo "Pipeline '${jobName}' has executed before. First build number: ${firstBuildNumber}" - } - } - } stage('Build and Deploy') { steps { script {