Hey Rahav I want to read random log file in Jenkins workspace created with new name on each built like abc.log , then on next builtd names changes auto like kbc.log. How to read any file ending with .log using groovy
Hi Raghav, Your way of presenting tutorial is very neat and clean and I used to follow all your jenkins/groovy tutorials from last 4-5 years. But I have a suggestion for you. Particularly in Groovy tutorials , when you explain the multiple examples it used to be very quick and you write so many combination of commands which you write very fast and run them, As a learner I think we have less time to consume that, Please request you to explain about the command in details before running them and also explain the output of each commands in details.
Hello Raghav, Am currently working on project (Jenkins and Groovy) where I have CSV File as an artifact and in the CSV file I have a tabular data which I want to upload it to confluence table. Could you please help with this or any suggestion.
@@RaghavPal Am using Confluence publisher plugin to upload, Uploading is going fine but the problem here is I need to read a CSV file and print header and rows as a tabular format.
Hi Raghav, How to read a file content and load into jenkins as Dropdown values ? And on selection of 1st Dropdown, how to change the value of the second dropdown values dynamically ?
Hi Raghav, I was playing with the "read with reader" example. And when I add a empty line in the file, it still prints the empty line. I would expect != null to igor the line. Why is this? Best regards
Hallo. A very nice tut. I wanted to read a csv file and search for the cell data which matches or the closesr value to my defined value. In looking to this tutorial can i use the Reader or what would you suggest. Thank you in advance :)
Hi, you may use regex (regular expression) for this, Can find groovy regex examples online and if you wish to read a story of regex here - automationstepbystep.com/2020/05/05/a-story-of-regex/
Hi Raghav! Thanks for the tutorial. Can we use repository in place of filepath ? Or we need to use only local workspace ? I need to fetch .properties file from repo and then use it for choice parameter option.
Sir my current project is groovy with moonshine framework, groovy part I get a lot of help from your video, I was experiences with java , c#, python before . Your video help me to learn groovy within a days. Thank you sir . I appreciate your help
Piyush In Groovy, `GroovyScriptingContext` and `GroovyUser` are not standard classes or components provided by the language itself. However, I can provide some context based on what I know: 1. `GroovyScriptingContext`: - As of my last knowledge update (which was until 2021), there is no built-in class named `GroovyScriptingContext` in the Groovy programming language. - If you encounter this term in a specific context (such as a library or framework), it might be a custom class defined by a third-party library or application. - To understand its purpose and functionality, you would need to refer to the specific documentation or source code where it is used. 2. `GroovyUser`: - Similarly, there is no standard class called `GroovyUser` in Groovy. - If you come across this term, it could be related to a custom class or object created within a Groovy script or application. - Without additional context, it's challenging to provide a precise explanation for `GroovyUser`. --
@@RaghavPal Please Raghav. I did a lot of RnD on this but none worked out for me. There is some light shed on this in the below link. smartbear-cc.force.com/portal/KbArticleViewer?name=Example-of-using-third-party-Java-libraries-in-Groovy-script-reading-from-Excel-file-using-Apache-POI&sp=all But I do get some error like MethodNotFound or ClassNotFound every time even after adding all the necessary jars in the ext folder of SoapUI.
Hi Hemant, you will find examples in this video where you can read file line by line. You can use a closure (example shown) and store the first line in a list or can directly write to a file. For writing to file you can check the next video
@@RaghavPal Thanks for the tip, I used "find" closure to read first line and did some changes but not sure how to write whole file with first line change to target
Hello Sir, thank you for useful content. I want to read a csv file and create json from it with one for the key value to be a date and date value for each object within the array needs to be unique. I'm able to read csv file referring your video but unable to create json. Can you please create a video on JsonBuilder and/or jsongenerator using groovy.
Hi Vishnu, in general array is a data structure consisting of sequential memory storing a collection of objects. List may have multiple implementations like ArrayList
Hey Rahav I want to read random log file in Jenkins workspace created with new name on each built like abc.log , then on next builtd names changes auto like kbc.log.
How to read any file ending with .log using groovy
Hi Rakesh, will need to check on this, can try online help
Hi Raghav, Your way of presenting tutorial is very neat and clean and I used to follow all your jenkins/groovy tutorials from last 4-5 years.
But I have a suggestion for you.
Particularly in Groovy tutorials , when you explain the multiple examples it used to be very quick and you write so many combination of commands which you write very fast and run them, As a learner I think we have less time to consume that, Please request you to explain about the command in details before running them and also explain the output of each commands in details.
@Raghav
will take this feedback Manvendra, thanks
Hello Raghav, Am currently working on project (Jenkins and Groovy) where I have CSV File as an artifact and in the CSV file I have a tabular data which I want to upload it to confluence table. Could you please help with this or any suggestion.
Hi Safeer, you can search for plugins on jenkins to do this
@@RaghavPal Am using Confluence publisher plugin to upload, Uploading is going fine but the problem here is I need to read a CSV file and print header and rows as a tabular format.
Hi Safeer, I am not too sure, will need to check online
And that is what I was looking for :) Thanks for sharing your knowledge
You're welcome Jakub
Hi Raghav, How to read a file content and load into jenkins as Dropdown values ? And on selection of 1st Dropdown, how to change the value of the second dropdown values dynamically ?
Hi Vivek, I will plan a session, can check some online examples also
@@RaghavPal yes Raghav, I found the solution using active choice plugin. Thanks.
Hi raghav,I need to convert my csv file into list of maps..what will be syntax... your help will really appreciate..
will need to check online Nirmala
Hi Raghav, I was playing with the "read with reader" example. And when I add a empty line in the file, it still prints the empty line. I would expect != null to igor the line. Why is this? Best regards
Hi Carlo, will need to check the code and logs
Hallo. A very nice tut. I wanted to read a csv file and search for the cell data which matches or the closesr value to my defined value. In looking to this tutorial can i use the Reader or what would you suggest. Thank you in advance :)
Hi, you may use regex (regular expression) for this, Can find groovy regex examples online and if you wish to read a story of regex here - automationstepbystep.com/2020/05/05/a-story-of-regex/
Hi Raghav! Thanks for the tutorial. Can we use repository in place of filepath ? Or we need to use only local workspace ? I need to fetch .properties file from repo and then use it for choice parameter option.
You can try that, as long as it is accessible it should be okay
Sir my current project is groovy with moonshine framework, groovy part I get a lot of help from your video, I was experiences with java , c#, python before . Your video help me to learn groovy within a days. Thank you sir . I appreciate your help
Glad to know this Ashraf.
Hi Raghav, i need to take array as a output, but that input will be provided by user only.. not like we are already providing.. how can we do that.
Hi Harshita, you can get the input from user console
stackoverflow.com/questions/10184091/groovy-console-read-input
Bhai what is GroovyScriptingContext and GroovyUser in groovy ? please explain
Piyush
In Groovy, `GroovyScriptingContext` and `GroovyUser` are not standard classes or components provided by the language itself. However, I can provide some context based on what I know:
1. `GroovyScriptingContext`:
- As of my last knowledge update (which was until 2021), there is no built-in class named `GroovyScriptingContext` in the Groovy programming language.
- If you encounter this term in a specific context (such as a library or framework), it might be a custom class defined by a third-party library or application.
- To understand its purpose and functionality, you would need to refer to the specific documentation or source code where it is used.
2. `GroovyUser`:
- Similarly, there is no standard class called `GroovyUser` in Groovy.
- If you come across this term, it could be related to a custom class or object created within a Groovy script or application.
- Without additional context, it's challenging to provide a precise explanation for `GroovyUser`.
--
Raghav Bhai ek help
Jaise hum property transfer se request response send receive kar sakte..
Vaise groovy se kaise kar sakte hai
. please guide
Hi Abhijeet,
In Groovy, you can use the setProperty() and getProperty() methods to perform property transfer between different objects.
@@RaghavPal thanks Sir
But do you have any video or any url with steps to do it..
This is be helpful please
I will check on this
Hi Raghav, can you pls make a video on how to read write an excel file using the apache poi library in soapui tool using the groovy script test step.
Hi Madhu, I will plan for this
@@RaghavPal Please Raghav. I did a lot of RnD on this but none worked out for me. There is some light shed on this in the below link.
smartbear-cc.force.com/portal/KbArticleViewer?name=Example-of-using-third-party-Java-libraries-in-Groovy-script-reading-from-Excel-file-using-Apache-POI&sp=all
But I do get some error like MethodNotFound or ClassNotFound every time even after adding all the necessary jars in the ext folder of SoapUI.
ok I will check and plan
How to read only first line of file, make some changes and return whole file
Hi Hemant, you will find examples in this video where you can read file line by line. You can use a closure (example shown) and store the first line in a list or can directly write to a file. For writing to file you can check the next video
@@RaghavPal Thanks for the tip, I used "find" closure to read first line and did some changes but not sure how to write whole file with first line change to target
Did you check the write files session.
@@RaghavPal Yes I checked it, Can you let me know how to read file from specific line till end of file.
Let me check, If possible will create a session. For now pls try online help.
Thanks for this tutorial
Most welcome
Hello Sir, thank you for useful content.
I want to read a csv file and create json from it with one for the key value to be a date and date value for each object within the array needs to be unique.
I'm able to read csv file referring your video but unable to create json. Can you please create a video on JsonBuilder and/or jsongenerator using groovy.
Hi Sagar, I will check and plan for this session
I have 10000 record in an excel , I need to fecth that data and run the soup script each time till 10000 . Could you please help
I will need to check on this
Sir how can i read only the json files of a given directory?
You can write a code to select the file with .json ext
here what is the difference between list and array output?
Hi Vishnu, in general array is a data structure consisting of sequential memory storing a collection of objects. List may have multiple implementations like ArrayList
Hi raghav,what about excel reading in groovy.
I will plan to add the session Alim
@@RaghavPal thanks sir
Can you please make a video of how to read data from excel file in Groovy
Hi Soni, I will plan
sir how can we fetch metadata from imdb using groovy
Hi Prashant, may be I have not faced this scenario, Not able to get this. In case you can provide some example, I can check.
@@RaghavPal sure.. for example there is video file or an audio file and I want to know format , bitrate , codec etc.
Okay, honestly, I have not worked on such scenarios. I will have to check online.
Raghav where is the source code for all this groovy tutorial videos
Hi Jai, can check here github.com/Raghav-Pal/GroovyProject_Mar2020
i think this video you teach is too fast
I will improve