Exactly @lionel. I’ve also been given a multistage pipeline task, I don’t know how to go about it. I believe these Jenkins tasks are new rollout and we need some guidance
I’m not sure what the problem was, but this task was also failed for me too. Job ran successfully multiple times.
Hi guys,
I successfully finished the task.
I had to do the following :
- Install java on storage server (sudo yum install java-11-openjdk-devel)
- Install several plugins (pipeline, ssh agent…)
- Configure node agent as requested
- Configure pipeline with the following pipeline script :
pipeline {
agent { label 'ststor01' }
stages {
stage('Deploy') {
steps {
sh 'echo Bl@kW | cp /home/sarah/web_app/* /data/'
}
}
}
}
Don’t forget to
chmod 777 /home/sarah
I thought I had to link Gitea to my Jenkins folder. (it makes more sens to me)
But it seems that you have to copy index.html directly from local directory.
Hope it will help you guys
Regards
Lionel
Thank you lionel, this looks quite simple but also defeats the purpose of the task as we are just copying from folder to folder without including the scm.
I look forward to hearing from you for the MultiStage Pipeline as i have no idea how to go about the test stage
Hi guys, @rahul456 @kodekloud-support3
I ran into the same error too. Please see the screenshots. I had configured it to to pull the latest version on repo from the Gitea server, not the local repo on storage server. Not sure if the validation is checking only with the local repo on ststor01 without doing a push to origin.
Hi Lionel,
If so, it means validation is updating the files on ststor without doing a push to origin and then running the pipeline. It is not validating with the contents of Gitea repo. If some one else makes a change to Makes no sense but at least we know now what needs to be done to get this right.
@andubodunrin, according to your submitted answer you havn’t made any changes in git. Or you might have made changes after submitting your answer.
hi @Sam @prash , sorry for the issue, this is marked pending for you, please give it an another try.
Thanks for the response. Just to clarify, are we deploying from the recent changes( after cloning git repo) or from changes made directly in the folder directory.
Hi @rahul456.
As seen on the second screenshot, the change was made on sarah’s profile and push to git.
Hence when i curl you see 2 different contents. I did not make any changes after submitting.
According @lionel, all he did was copy file from sarah’s profile to /data on ststor01 without any effects on the git repository.
I’m stuggling to understand your point.
Anyway the task is still marked failed for me as it has expired.
I look forward to the task resolution for multistage pipeline.
Thanks
@makadia.dhaval88 trust you are keeping safe , kindly assist with pipeline script for Jenkins multistage pipeline
Regards
Hi @rahul456 @Inderpreet I had also same issue. please review my screenshots. Can you please make it pending for me?