0

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.

Sagar Jani
  • 161
  • 2
  • 3
  • 21

1 Answers1

1
  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?
AutomatedOwl
  • 1,039
  • 1
  • 8
  • 14
  • 1
    thanks for the info. Our team has decided to skip with the Jenkins Pipeline issue for now. But anyways, great help. Thanks. – Sagar Jani Aug 01 '18 at 12:07