[100 Days of DevOps - Day 78] Jenkins Pipeline Task - "Validation file not found on App Server" Error - Need Help

Hi Community,

I am on Day 78 of my 100 Days of DevOps challenge and stuck
on the Jenkins Pipeline task for xFusionCorp Industries.
Keep getting “Validation file not found on App Server” error.

Here is everything I have done:

TERMINAL SETUP (stapp01):

  • Installed java-17-openjdk :white_check_mark:
  • Created /home/sarah/jenkins_agent :white_check_mark:
  • Given sarah ownership of /var/www/html :white_check_mark:
  • Added safe.directory for git :white_check_mark:
  • Added sarah to NOPASSWD sudoers :white_check_mark:

JENKINS SETUP:

  • Installed SSH Build Agents plugin :white_check_mark:
  • Added slave node “App Server 1” :white_check_mark:
    • Label: stapp01
    • Remote root: /home/sarah/jenkins_agent
    • Credentials: sarah/Sarah_pass123
    • Host Key Verification: Non verifying
  • Agent shows as connected :white_check_mark:

PIPELINE JOB (xfusion-webapp-job):

  • String parameter: BRANCH :white_check_mark:
  • Single stage named Deploy :white_check_mark:
  • Pipeline script:

pipeline {
agent { label ‘stapp01’ }
parameters {
string(name: ‘BRANCH’, defaultValue: ‘master’)
}
stages {
stage(‘Deploy’) {
steps {
sh “”"
cd /var/www/html
git fetch --all
git checkout -f ${params.BRANCH}
git pull origin ${params.BRANCH}
chmod -R 755 /var/www/html
ls -la /var/www/html
“”"
}
}
}
}

VERIFICATION:

  • Apache running on port 8080 :white_check_mark:
  • Both master and feature builds SUCCESS :white_check_mark:
  • Website loads on App URL :white_check_mark:
  • master branch index.html shows correct content :white_check_mark:
  • feature branch index.html shows “Updated” :white_check_mark:

ERROR:
Validation file not found on App Server

QUESTIONS:

  1. What exactly is the validator looking for?
  2. Is the build run order important?
    (we tried both master-last and feature-last)
  3. Is there a specific file that needs to exist
    in /var/www/html?

Any help is appreciated! Thank you! :pray:

Hi @ayush1

Please refer to the solution here and try again https://github.com/imShakil/100-Days-Of-DevOps-Challenge-KodeKloud/blob/main/days/078.md

1 Like