Level4 Jenkins node App

Node app docker run :

pipeline {
agent { label ‘stapp03’ }

stages {
    stage('Build') {
        steps {
            sh "rm -rf ${WORKSPACE}/*"
            sh 'git clone http://git.stratos.xfusioncorp.com/sarah/web.git'
           dir('web') {

sh 'docker rm -f node-app || true'
sh 'docker rmi stregi01.stratos.xfusioncorp.com:5000/node-app:latest || true'

// Build and push 
sh 'docker buildx build --push -t stregi01.stratos.xfusioncorp.com:5000/node-app:latest .'

}
}
}
stage(‘Deploy’) {
steps {
//run app from image
sh ‘docker run --name=node-app -itd -p 8080:8080 stregi01.stratos.xfusioncorp.com:5000/node-app:latest
}
}

}

}


Any idea It works for me and i get curl page sucess but kodeklould check fails? :frowning:

It looks like your pipeline and container run fine, but KodeKloud’s validation might be checking for a specific container name or port mapping. Make sure you’re using the exact image name, tag, and container name mentioned in the task (for example, node-app and port 8080:80 if required). Also confirm the container is running on the correct app server (stapp03) and accessible via the expected port. Sometimes the validation fails if the container isn’t running in detached mode or on the correct host.