The task “Jenkins Install Packages” seems to be a vague task as every time I use the $PACKAGE parameter, and I failed the task. Please can you clarify this as the task has been failed twice even though I carried out the exact instructions in the task.
Installed SSH & Parameterized Remote Trigger plugins after Jenkins restart
Installed Storage Server credentials then added the SSH site (storage server).
Confirmed the connection which was successful.
Proceeded to build the job based on the $PACKAGE parameter using the credentials stored
Job indicated success however once I clicked to confirm task was done on the KodeKloud portal, it indicated I failed the tasks (twice) with error - package is not installed!
the issue is that the build is actually successful however when I confirm it on the Kodekloud portal for submission, i get the error below: Jenkins job is not configured to install the provided package on Storage server ERROR final_chk.py - AssertionError: Jenkins job is not configured to install…
@mmkmou
the issue is that the build is actually successful however when I confirm it on the Kodekloud portal for submission, i get the error below: Jenkins job is not configured to install the provided package on Storage server ERROR final_chk.py - AssertionError: Jenkins job is not configured to install…
yep i did, i did an install of nginx as a package and I was able to see on the storage server. I even uninstalled it and tried with httpd. Install was successful yet when I tried to submit, i got the same Jenkins error! I deleted the successful pipeline as it couldn’t be saved once the task is submitted for grading. I will redo the task again and let you know
thanks for the reply. I managed to figure this out. So setup the Jenkins job (after installing all the plugins) as normal then add the parameterized string value
so it was just a matter of doing e.g. echo password | sudo -S yum install $PACKAGE -y
where $PACKAGE is the Jenkins parameter for the Default value of the package (defined within the Jenkins job) which can be anything e.g. wget etc.
I’ll appreciate if can list out all the plugins you installed for this task because i installed, ‘terminal’, ‘ssh’ and ‘ssh credentials’ but it i can’t pass the test. Below output to error i get:
Started by user admin Running as SYSTEM Building in workspace
/var/lib/jenkins/workspace/install-packages [install-packages] $ /bin/sh -xe /tmp/jenkins3087714502967318144.sh
You will need to install ssh etc as well as Parameterized Remote Trigger, Build With Parameters then make sure the tick “This project is parameterized” when you are setting up the package.
Setup the job
Add the stringed parameter (make sure to tick “This project is parameterized”)