Jenkins Create Scheduled Builds Failed even after the successfull job completion on validation. Please find the screenshots attached, could you please guide me what went wrong on the task.
I have already created passwordless login between app server and storage.
Even the sudo failed the files are copied to the target directory, verified by logging into the storage server. The screenshot already attached. Can you please make the task pending for me.
@jgeorg0001 As per the console output, there is an error [sudo] password for tony: These repeated three times mean the password not accepted.
You can try a different approach. Since you have established password less authentication you also can set the folder permission so that you don’t have to run with sudo privilege.
@mihsan I have already retried after review as you suggested- passwordless auth between app server and storage server-. The project has been successfully built without the sudo error and the verified the scheduled build. Still the task failed with same error. It would be better we have some direction in task that the plugin names which we need to use.
@jgeorg0001 Agree but if the team specify the plugin then it will also limit the alternatives for approaching the task. However what i have seen is, the KKE team specify the options they are perticular in validation.
If you are sure the Jenkins job is running regularly as per the schedule and the log files are copied without any issue at the end of each build (you can verify this with the file timestamp), then report it here and tag KKE team.
They will have a look as well.
I have go the task again and successfully completed job but task got failed again as per screenshots.
can someone guide me where it went wong. i have spend almost 5 hours learn and complete task.
Did your build run successfully? Because I see 2 problems:
You used sudo -S but you have not supplied the sudo password (i.e. Ir0nM@n) to the command via stdin
You are trying to scp file from stapp01 to /usr/src/security on ststor01. Sudo user natasha will not have permissions to this directory by default. So this step will fail. To get around this, one approach is to copy the file to /tmp directory on ststor01 and then move the files to the actual location
I did point out the problem in your review. I’m not sure why you have 2 copy instructions in your build job: first one copying all files from from /etc/httpd/logs and then next one copying all files from /var/log/httpd. As there are duplicate copies, if there are access_log and error_log in /var/log/httpd, they will overwrite the files copied from /etc/httpd/logs. Hence your task could fail.