Hi everyone,
I’m working on the Jenkins Pipeline Deployment task (deploying the web_app repository to the Nautilus App Server) and my pipeline runs successfully, but the lab validator still fails with the error:
“Validation file not found on App Server.”
Here is what I configured:
- Created a Jenkins pipeline job named
devops-webapp-job(not a multibranch pipeline). - Added a string parameter
BRANCH. - Added a Jenkins agent named App Server 1 with label
stapp01and remote root directory/home/sarah/jenkins_agent. - The repository already exists on the server at
/var/www/html. - Apache is running on port 8080.
My pipeline script:
pipeline {
agent { label 'stapp01' }
parameters {
string(name: 'BRANCH', defaultValue: 'master', description: 'Branch to deploy')
}
stages {
stage('Deploy') {
steps {
sh """
cd /var/www/html
git reset --hard
git clean -fd
git fetch origin
git checkout ${params.BRANCH}
git pull origin ${params.BRANCH}
"""
}
}
}
}
Pipeline output shows SUCCESS, and when I check the server:
cd /var/www/html
git branch
I can switch between master and feature, and the files (index.html, feature.html) are present.
Despite this, the lab still returns “Validation file not found on App Server.”
Could someone please help confirm if I missed any requirement (job name, pipeline configuration, or deployment step)?
Thanks!