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 stapp01 and remote root directory /home/sarah/jenkins_agent.
The repository already exists on the server at /var/www/html.
Yes, the agent was able to start and run jobs successfully. Initially I had an issue starting the Jenkins agent because Java was not properly set up on the App Server (stapp01) . I installed OpenJDK 17 on the server and verified it with java -version . After that, Jenkins was able to launch the agent and run the pipeline without errors. I also fixed the permissions for /home/sarah/jenkins_agent and /var/www/html so the Jenkins user (tony ) could execute Git commands and deploy the code. After these fixes, the node connected successfully and the pipeline ran on App Server 1 (label: stapp01) , switching branches and deploying the code to /var/www/html .
I am exactly facing the same error “Validation file not found on App Server.”- tried like 5 times now - The conditional pipeline is working fine, builds are successful - and I can see through the LB UI, the text changing depending on the conditional pipeline I run.
@mmumshad and Team - can you please review this task?
Just tried the task, and this worked for me. Some questions for you:
What server was used as the node?
What does your pipeline script look like?
I followed this guide with modifications, because the node is now run as user sarah, and there was no need to use sudo in the script – everything runs as “sarah” and everything needed belongs to that user on the app server.
Hello Rob, I followed the guide you mentioned. The task has been tweaked. “Add a slave node named App Server 1 . It should be labeled as stapp01 and its remote root directory should be /home/sarah/jenkins_agent (the repository is cloned under /var/www/html ).” I am running agent as stapp01 tony user using ssh but it failed as “Could not copy remoting.jar into ‘/home/sarah/jenkins_agent’ on agent”. Copying remoting.jar to sarah directory as a tony user will denied permission as clearly. How should I perform as a sarah?
It’s actually pretty simple, because the agent is running as user sarah, and all the directories you need read or write to belong to user sarah, or are readable by that user. So you don’t need to supply a password or do sudo to do anything in the job. That simplifies the task considerably.