0

I am building a gradle project and the source code is in git. After checking our repo to jenkins' workspace, how do i have jenkins go to a sub-directory and do the build?

I tried adding shell commands but cd will not work as it executes script on a separate shell.

l a s
  • 3,836
  • 10
  • 42
  • 61

1 Answers1

7

If you are building a gradle project, perhaps you should use the "Invoke gradle script" step rather than a shell script?

As part of the gradle build script, it has an option to specify the "Root Build script", which will let allow you to specify a subdirectory if you wish.

See the Gradle plugin for more information.

Daniel Omoto
  • 2,431
  • 17
  • 15