Trouble Building with SQL CI in Jenkins
Hello,
I am looking into my companies database life cycle and have been attempting to trial the DLM Automation Suite. I have reached the point of attempting to build, test and deploy using SQL CI integreated in to Jenkins using our local SVN repository as per this tutorial.
It seems to build the NuGet package okay, however I get the following error when it comes to the testing step and I am unsure how to proceed:
The command I run is:
Did I install incorrectly and I am missing a file? Am I missing a parameter to pass in or pass one in incorrectly? I have attempted searching for this exact error but could not find anything, I am not familiar with this software enough to hazard any guesses. Any help would be greatly appreciated.
Thank you.
I am looking into my companies database life cycle and have been attempting to trial the DLM Automation Suite. I have reached the point of attempting to build, test and deploy using SQL CI integreated in to Jenkins using our local SVN repository as per this tutorial.
It seems to build the NuGet package okay, however I get the following error when it comes to the testing step and I am unsure how to proceed:
Error: Comparison of 'Scripts.state' and
'Server.sqlCI_a974e875-4ef8-456e-b3a8-970aa4dba282' failed: Could not
find a part of the path 'C:WindowsTEMPSQL CImyidtvcu.lc2dbstate'.
The command I run is:
sqlci.exe Test /temporaryDatabaseServer=Server /temporaryDatabaseUserName=*** /temporaryDatabasePassword="*******" /package=E:PackagesNewCIPackage.1.%BUILD_NUMBER%.nupkg
Did I install incorrectly and I am missing a file? Am I missing a parameter to pass in or pass one in incorrectly? I have attempted searching for this exact error but could not find anything, I am not familiar with this software enough to hazard any guesses. Any help would be greatly appreciated.
Thank you.
Comments
Anyone have any suggestions? Thanks.
This likely because the NuGet package is being built incorrectly. Do you have the command that is called in build?
You can also look at the contents of the zip folder to see if it looks correct (My guess is that it empty aside from a file in the root). You can either use NuGet package explorer or just change the extension to .zip and unzip it.
Software Engineer
Redgate Software
I do not believe the built package is empty. I see "NewCIPackage.nuspec" within it and three folders.
This could happen if you point the build step at the wrong folder, in particular from the blog post: This would also happen if the ScriptsFolder had no files in initially.
Software Engineer
Redgate Software
Thanks.
If you just want to get the build working without having to set up the scripts folder with the correct creation files then you can just put an empty file into the scripts folder and check that into source control.
Software Engineer
Redgate Software
However now I receive the following error:
The obvious answer would be that I haven't installed the tSQLt schema onto the database and committed them to SVN, however I have and I can see the tSQLt objects in Source Control. Is there another step?
Thanks.
You also require at least one test to be run otherwise you get this error. (You can either look in the folder or use SQL Test in SSMS to run all tests to see if there any)
Software Engineer
Redgate Software
Investigate the test database
Try using the SQL CI Jenkins plugin
We also have a Jenkins plugin that may be of use https://wiki.jenkins-ci.org/display/JEN ... +CI+Plugin
Hopefully one of these will help fix or diagnose your issue. If not would you be willing to share your NuGet package with me (DLMAutomationSupport@red-gate.com)
Software Engineer
Redgate Software
I am wondering, as I call sqlci.exe from the same SVN directory containing all of the schema objects, could that interfere somehow and cause it not to "see" the tSQLt schema? I'm grasping at straws here.
As you can tell I'm not overly familiar with Jenkins either, I'm afraid.
Software Engineer
Redgate Software
Although I would have thought the error message would be different it some tests merely failed, not that it couldn't find the tests at all?
Software Engineer
Redgate Software
Software Engineer
Redgate Software
Also, if I run EXEC [tSQLt].[RunAll] I get: