I am facing syntax error while deploying tomcat on ubuntu server using shared library.
Shared library code is
def newDeploy(ip,contextPath)
{
sh "deploy adapters: [tomcat9(credentialsId: '2d7bffd1-b890-4532-a303-e2f1dcf6d44a', path: '', url: ${ip})], contextPath: ${contextPath}, war: '**/*.war'"
}
In jenkins pipeline code is
stage('ContDeploy')
{
steps
{
script
{
cicd.newDeploy("172.31.25.99:8080","testap")
}
}
}
how to write groovy code to pass token key to authorize tomcat to be installed on ubuntu server?
I tried using 3 colons(''') at the end and start of the code but not worked. Double colon also not worked. space also not worked nor dash(-) worked in between tomcat and credentialsId.