1

When I do a git commit, in commit message I will specify test class name and in junkins post-build step I am running a shell command(spoon) which needs the class name parameter which is in the git commit message.

I have 6 test classes depending upon the commit message perticular command should run.

example commit message :- git commit 'update [coreTest.java]'

command to run

java -jar spoon-runner-1.1.9-jar-with-dependencies.jar \
--apk example-app.apk \
--test-apk example-tests.apk
--class-name  coreTest.java

coreTest.java is the class name should be placed depending on the commit message.

Shivaraj Patil
  • 8,186
  • 4
  • 29
  • 56

2 Answers2

1

One idea would be to have post-receive hook on the git server side, which would:

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

try Parametrized plugin

select and pass your class name as parameter

mahinlma
  • 1,208
  • 3
  • 11
  • 24