Sagar Jani
Sagar Jani

Reputation: 161

Selenium Grid Docker-Compose automation through Jenkins

I am using docker-compose for selenium grid automation for firefox and chrome browsers, on an ubuntu 16.04 server and am accessing using PuTTY terminal.

It is a maven project on a git repository. For Jenkins, I have another server instance (accessible via PuTTY).

Questions:

1) How can I build a Jenkins job which will run automatically at a particular time everyday?

2) Is it possible to provide the suite file (testng.xml) path and any maven command to instigate it via anyway?

3) Do I have to manually start grid or can I configure it manually in docker-compose.yml file?

PS: This is my first time so, any help will really be appreciated.

Upvotes: 0

Views: 629

Answers (1)

AutomatedOwl
AutomatedOwl

Reputation: 1089

  1. See How do I schedule jobs in Jenkins?

  2. Yes, via String parameter supplied to your jenkins job. you will need to pass it as an argument, for example to invoke maven build the String param value would be:

    mvn -Dsurefire.suiteXmlFiles=testng.xml test

and the shell command:

 sh """ '${params.MVN_STRING}' """

https://wiki.jenkins.io/display/JENKINS/Parameterized+Build

  1. See this answer: Does Jenkins Pipeline Plug-in support Docker Compose?

Upvotes: 1

Related Questions