how to avoid cps error using XmlSlurper() method in jenkins pipeline

2021-01-13 Thread jfern...@forgottenempires.net
I am using a simple test pipeline to get a username out of a xml file, I have written a simple function using the XmlSlurper method and I have included the @NonCPS annotation at the beginning of the function but I keep getting an error, even though the function seems to work as it prints out

RE: how to avoid cps error using XmlSlurper() method in jenkins pipeline

2021-01-13 Thread Reinhold Füreder
Hi jfernandez, Naïve guess(es): * Are you maybe missing this: import com.cloudbees.groovy.cps.NonCPS * though not sure if the annotation would/should not then lead to an error instead already? * Or is this a declarative pipeline and you are missing the script { … } step based wr

how to run an exe file within a declarative pipeline

2021-01-13 Thread jfern...@forgottenempires.net
I am trying to create a pipeline which execute the application with some test scripts once it is built. If done through the CMD it opens the application run a test(AIImprovementsBucket1Test) and exit the application. I have tried this: ``` stage('test') { steps{

Re: how to avoid cps error using XmlSlurper() method in jenkins pipeline

2021-01-13 Thread jfern...@forgottenempires.net
Thanks for the answer. I found the issue which it was I was creating global objects within the findcommitter declaration, adding def before all the variables sorted the problelm On Wednesday, January 13, 2021 at 12:19:40 PM UTC+1 r.fuereder wrote: > Hi jfernandez, > > > > Naïve guess(es): > >

Re: how to run an exe file within a declarative pipeline

2021-01-13 Thread Slide
Is the application a console app or Windows app? What if you add /wait to the START command? On Wed, Jan 13, 2021, 05:50 jfern...@forgottenempires.net < jfernan...@forgottenempires.net> wrote: > I am trying to create a pipeline which execute the application with some > test scripts once it is bui

Re: how to run an exe file within a declarative pipeline

2021-01-13 Thread jfern...@forgottenempires.net
it is a windows app (a videogame) adding /wait how so? sorry but I am not good at batch commands, I am learning On Wednesday, January 13, 2021 at 2:26:51 PM UTC+1 slide wrote: > Is the application a console app or Windows app? What if you add /wait to > the START command? > > On Wed, Jan 13, 20

Re: SSH connection issue with Host Key Verification Strategy

2021-01-13 Thread Ivan Fernandez Calvo
>* Is Manually trusted key Verification Strategy, without "Require manual verification of initial connection", more secure than Non verifying Verification Strategy Any verification strategy is more secure than none >What are the downsides of Manually trusted key Verification Strategy? You have

Running packer via pipeline script

2021-01-13 Thread zil...@gmail.com
I'm trying to create an AMI (for Jenkins master in this case), and I have the following Packer template, which as you see needs an SSH_PRIVATE_KEY. { "variables" : { "aws_access_key" : "{{ env `AWS_ACCESS_KEY` }}", "aws_secret_key" : "{{ env `AWS_SECRET_KEY` }}", "ssh_private_ke

Re: Windows agent connected over ssh - requires elevation to install jdk-8-oracle

2021-01-13 Thread 'christop...@googlemail.com' via Jenkins Users
Sorry for the late answer, I am only reading this after my vacation. Just an idea: under windows the concept of unattended installation is used when providing software updates and installation from a centralized server in a domain environment without user interaction and a lot of common installe

Re: jiraComment pipeline step throwing groovy.lang.MissingMethodException

2021-01-13 Thread ST
Hi Reinhold, Thanks for your suggestion! I just tried to use non-named arguments: jiraComment('FREF-363', 'My super jira comment') But that did not work either, it threw this exception: [Pipeline] End of Pipeline java.lang.IllegalArgumentException: Expected named arguments but got [FREF-363, My s

RE: jiraComment pipeline step throwing groovy.lang.MissingMethodException

2021-01-13 Thread Reinhold Füreder
Hi Stefan, I am really sorry for my bad naïve guess: * Actually your call should really work, or at least it worked for me (even if I have neither JIRA, nor a Jenkins JIRA configuration), thus at least the pipeline code seems OK. * (Admittedly rather sadly is that under this conditions