Thank you very much for the nice comment..Sure I will make a video on end to end CICD pipeline..but I need to cover topics on other required tools before that... meanwhile you can go through the video for pipeline for java build ua-cam.com/video/XtRVSZZO4Vc/v-deo.htmlsi=7KaRatQ4iHcRPvvS
I need to use the output of one project as a input parameter for other project for eg in Project A there is build step of execute shell, which will execute a shell script, simply listing the content of the directory mentioned with the script now in Project B i need those output of project A as one of the parameter in Project B Please advice
Generally if it is the same pipeline, we can assign the output to a groovy variable and use it in another stage...but for a separate job,my advice is to write the output of first job in a file and read that file content in another job
@@technologytheoryhandson863 i tried this, but when i am trying to read that file it gives me error of permission denied.. although i explicitly copied the output.txt file from project A workspace to the workspace of project B and have full permission
As of now, jenkins does not provide option to use returnStatus and returnStdout in same command. However we can use shell inbuilt redirection operators to achieve this. You can try the below command which is provided in stackoverflow. def stdoutAndStatus = sh script: 'set +x ; ls -a 2>&1 && echo "status:$?" || echo "status:$?" ; exit 0', returnStdout: true echo "stdoutAndStatus: >$stdoutAndStatus
Can you please make a video java application cicd pipeline please
Your video really awesome ❤🎉
Thank you very much for the nice comment..Sure I will make a video on end to end CICD pipeline..but I need to cover topics on other required tools before that... meanwhile you can go through the video for pipeline for java build ua-cam.com/video/XtRVSZZO4Vc/v-deo.htmlsi=7KaRatQ4iHcRPvvS
I need to use the output of one project as a input parameter for other project
for eg
in Project A
there is build step of execute shell, which will execute a shell script, simply listing the content of the directory mentioned with the script
now in Project B
i need those output of project A as one of the parameter in Project B
Please advice
Generally if it is the same pipeline, we can assign the output to a groovy variable and use it in another stage...but for a separate job,my advice is to write the output of first job in a file and read that file content in another job
@@technologytheoryhandson863 i tried this, but when i am trying to read that file it gives me error of permission denied.. although i explicitly copied the output.txt file from project A workspace to the workspace of project B and have full permission
Can you run this script only once and collect both status and stdout same time and print it in the pipeline? You ran it twice in this demo.
As of now, jenkins does not provide option to use returnStatus and returnStdout in same command. However we can use shell inbuilt redirection operators to achieve this. You can try the below command which is provided in stackoverflow.
def stdoutAndStatus = sh script: 'set +x ; ls -a 2>&1 && echo "status:$?" || echo "status:$?" ; exit 0', returnStdout: true
echo "stdoutAndStatus: >$stdoutAndStatus