Hi,

There are many reasons to not include those classes in your pipeline code I 
will give you a couple, one it is that you will have to allow to execute a 
bunch of packages related to that library this would make your Jenkins less 
secure see https://wiki.jenkins.io/display/JENKINS/Script+Security+Plugin, 
the second it is related to how we should put into pipeline, the pipeline 
script language it is designed to orchestrate your pipeline launching your 
build, deploy, test, ... scripts or whatever, it is not recommended to 
introduce business logic into your pipeline code, my mate Jesse Glick 
explains it much better than me in the following keynote "Jenkins World 
2017: How to Use Jenkins Less" https://www.youtube.com/watch?v=Zeqc6--0eQw

so my recommendation is to put that code in a script and execute this 
groovy script from the pipeline, you do not need to include that code in 
the pipeline.



El viernes, 12 de abril de 2019, 16:55:08 (UTC+2), Marogo Ytcutc escribió:
>
> I would like to use the TestLinkAPIClient class (java) in my pipeline 
> Jenkins, so I need link these modules 
> <https://github.com/Prabhs13/testlink-api-java-client/tree/master/testlink-api-java-client/src/testlink/api/java/client>
>  to 
> the pipeline, and then run the code below in groovy (found on the net, so 
> it is unknown if it can work at all):
>
> #!/usr/bin/env groovy
>  import testlink.api.java.client.TestLinkAPIResults.*
>  import testlink.api.java.client.TestLinkAPIClient.*
>
>  def DEVKEY = "1f123453b123bd8dd811a7f824c194d0"
>  def URL = "http://PC4/lib/api/xmlrpc/v1/xmlrpc.php";
>  def api = new TestLinkAPIClient(DEVKEY, URL)
>  TestLinkAPIResults projects = api.getProjects()
>  api.createTestProject(...)
>
>
> Ideally, it would be possible to link these modules to the pipeline after 
> downloading them from the local SVN (where my project is built in the job) 
> to the job workspace. My pipeline need some reference to the location of 
> these modules in the %workspace%\testlink\api\java\client folder.
>
> Marogo
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0adea877-652d-48f7-9e57-38f77b488d9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to