Can anyone tell me how to deploy a SharePoint solution wsp file in Jenkins CI tool? I have build the Solution in Jenkins and the WSP file has been created. Now I want to deploy it to local server. I have tried to do it using powershell plugin using the usual commands like
Add-PSSnapin Microsoft.Sharepoint.Powershell –EA 0 Update-SPSolution -Identity Solution.wsp -LiteralPath "C:\Program Files (x86)\Jenkins\workspace\Build\Solution.Web.wsp" -GacDeployment
but I get an error which is :
The term 'Update-SPSolution' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again
Any suggestions would be appreciated.
Edit: I have refered to https://stackoverflow.com/questions/44035476/running-powershell-via-x64-in-jenkins and installed latest JRE 64 bit version. I have edited the jenkins.xml and updated the path to the JRE installed but now I get this error:
The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered. Update-SPSolution : Cannot access the local farm. Verify that the local farm is properly configured, currently available, and that you have the appropriate permissions to access the database before trying again.
I think I am close to figuring it out with a little help.