I’m stuck in this task like forever. Everytime getting this error “LB did not serve deployed file” even when things looks good. or thats what I feel . Attaching snapshots here, please check and help point out the issue
I don’t see your script there, although it might work based on the log. Please look at this forum post to see if it helps.. The test of whether it works would depend whether apache is set up correctly on stapp01, since the load balancer will take the file from apache on that host, not directly from the /var/www/html directory as you show in one of your images.
The script is similar to what you’ve pointed to ,
pipeline {
agent { label ‘stapp01’ }
stages {
stage('Deploy') {
steps {
script {
sh '''
cd /var/www/html
git pull https://sarah:Sarah_pass123@/3000-port-ojl62wf4jf3reclh/sarah/web_app.git
'''
}
}
}
}
}
*** git pull origin master *** doesnt work since the config file ‘url’ value at /var/www/html/.git location has a hardcoded value and pipeline scripts pulls the git location from there . Anyway , all works well but only the LB did not serve deployed file error keeps coming . I dont know where else to look . I’ll dig further.



