0

I am new to Jenkins and set up a job in free style project to fetch dhf project from a svn repository for each commit. I have used Jenkins svn post-commit hook as mentioned here - https://plugins.jenkins.io/subversion/ (Windows specific post-commit hook). SCM Poll is working fine and for every commit in SVN Repo my Jenkin's job gets triggered but as soon as it invokes gradle mlDeploy it fails for the hidden .svn folder in the project structure inside Jenkins Job's Workspace.

How can I get rid of this hidden .svn folder for my build to be successful ?

.svn folder created

Inside structure of .svn folder

Build Log :

00:31:22 Checking for existence of resource: .svn 00:31:22 Sending XML GET request as user 'admin' to path: /manage/v2/databases 00:31:22 00:31:22 > Task :mlDeployApp FAILED 00:31:22 :mlDeployApp (Thread[Execution worker for ':',5,main]) completed. Took 1 mins 47.206 secs. 00:31:22 00:31:22 FAILURE: Build failed with an exception. 00:31:22 00:31:22 * What went wrong: 00:31:22 Execution failed for task ':mlDeployApp'. 00:31:22 > Could not determine database to associate with database resource directory: C:\Users\local.jenkins\workspace\devJob\dev\src\main\hub-internal-config\databases.svn 00:31:22 00:31:22 * Try: 00:31:22 Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights. 00:31:22 00:31:22 * Get more help at https://help.gradle.org 00:31:22 00:31:22 Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. 00:31:22 Use '--warning-mode all' to show the individual deprecation warnings. 00:31:22 See https://docs.gradle.org/6.8.3/userguide/command_line_interface.html#sec:command_line_warnings 00:31:22 00:31:22 BUILD FAILED in 2m 18s 00:31:22 6 actionable tasks: 6 executed 00:31:22 Build step 'Invoke Gradle script' changed build result to FAILURE 00:31:22 Build step 'Invoke Gradle script' marked build as failure 00:31:28 Finished: FAILURE

Ketan
  • 11
  • 1
  • Do you get this problem for the src/main/ml-config/databases directory as well? I haven't used in svn in a long time, so I don't know if it's safe to delete that .svn directory . I have considered changing this behavior in ml-gradle where it logs a warning instead of throwing an error when it can't associate a real database with a directory name; I'll log a ticket for that. But in the meantime, try deleting that directory - technically, you can svnignore all of src/main/hub-internal-config and just run hubInit to generate it when you do a build. – rjrudin Aug 24 '21 at 11:00
  • https://github.com/marklogic-community/ml-app-deployer/issues/442 – rjrudin Aug 24 '21 at 11:01
  • thank you @rjrudin for prompt response and Yes I can see this problem happening inside all the folders within a DHF project and as its a automatic build and deploy I can't manually delete all .svn hidden folder , is there any way I can ignore such .svnignore while Jenkins automatic running mldeploy command ? – Ketan Aug 24 '21 at 11:14
  • For now, could your automated build remove the "databases/.svn" directory? That should be a quick fix. – rjrudin Aug 25 '21 at 12:03
  • okay thanks @rjrudin – Ketan Aug 25 '21 at 18:23

0 Answers0