Setup GitLab CI/CD Pipeline for Maven Project | Java
Vložit
- čas přidán 22. 08. 2024
- This video shows how to integrate maven project and execute web automated tests into GitLab CI/CD pipelines.
Docker Image: hub.docker.com...
WebDriverManager Tutorial: • WebDriverManager Tutor...
Source code: github.com/raz...
Quite a basic tutorial to understand something like CI/CD which is so widely used out there in the industries.Thank you so much Mr.Razwan for making CI/CD easy to understand.
Excellent! Perfect for a Java developer but beginner in Gitlab pipeline scripting. Thanks Razvan Vancea!
Glad to hear that! Thank you! 🙏
The build and test jobs are downloading the docker images twice, instead we can use the cache feature of gitlab to make the pipeline run faster
Agree, thank you for this insight! 🙏🏻
Thank you for this helpful tutorial!
I am glad to hear that. Thank you!
Hello , I need one information, The docker container which you are using , is it in linux os or windows os ??
Hi,
can we achieve the same but without Docker image?
I want only to run maven project (with selenium test). What script do I have to type in .yml file?
Hello,
As far as I know, there is no way building CI/CD without docker image. I am curious, why would you want NOT to use it?
PS: the example used in the video is a maven project with selenium test - you can use the same .yml file
Have a great day,
RV
Thanks for the video. Can you please tell me, in which machine these build and test jobs are executed?
Want to run the same in a browser mode since my tests are taking pictures ( which won't work in headless mode on ) will this work ?
even in headless mode selenium and other frameworks can take snapshots.
add logic so that for each testcase failure it would take snaps and add that as artifact
Hi, very nice explanation. But one question, my script fails but still pipeline is not failing. What to do?
Hello, thanks for your feedback! It's been a while since I stopped coding with Java, but I am almost sure that a solution to your problem implies adding a setting/config in the pom.xml file
how can do the same appium automation using my own runner in git lab
can u help me how to build cicd pipeline to deploy spring boot app in gitlab
Could you explain how to deploy to the local package registry because I haven't found a single explanation on the internet on how to do this
Hi, how would you create an Automated CI/CD Pipeline in Jenkins with Java 14
or later using Selenium Webdriver in a Maven Project with TestNG?
Am Not interested on how to setup Jenkins with Java 8 or 11!
can you pls explain y specifically headless browser used? is that gitlab does not support normal browser GUI?
Yes, the CI/CD envs are usually non-gui environments and it is a good practice to use headless mode
i have one question, in the gitlab pipeline, is possible to automate application with localhost url?
Hello, thanks for your comment!
The answer is yes, it is possible, but it requires more advanced DevOps skills. Basically, you have to run the local application in other docker containers that are linked to the tests, so they can access/use that localhost during the execution time
If pom.xml file is in nested folder then how can we build?
in the 'script' area you can use the basic linux 'cd' command (changing the directory accordingly to the pom.xml folder) just before you run any 'mvn' command
Example:
test:
script:
- cd ../anotherfolder && mvn clean test
@@LearnwithRV thanks for the reply 👌
Thank you. great explanation, How we can achieve same without webdriver manager?
Thanks for your feedback! The pipeline process remains the same no matter if we use the webdriver manager or the classic webdriver file approach. Keep in mind that if you decide to use the classic approach, make sure that you include the chromedriver file in your project and set a relative path. This video might help you out czcams.com/video/D5YAAPmfc_A/video.html
My test fails why