Getting Appium and npm error if configured with git repository in Jenkins job

2022-02-02 Thread nisha vekaria
Developed the automation framework in Appium and I am starting the Appium 
server programmatically. 
*Runs fine if,*
1. the Same framework runs locally without Jenkins
2. Configure the Jenkins job by giving the local POM file path and not 
giving the git repository configured in the Jenkins job.

However, if I configure Jenkins job with Git repository project link and it 
fails with the below error.
*NPM and Appium are already installed.*

*Code:*
AppiumServiceBuilder builder = new AppiumServiceBuilder();
DesiredCapabilities capability = new 
DesiredCapabilities();
capability.setCapability("noReset", "false");

//Build the Appium service
builder = new AppiumServiceBuilder();
builder.withAppiumJS(new 
File("C:\\Users\\rajes\\AppData\\Roaming\\npm\\node_modules\\appium\\build\\lib\\main.js"));
builder.withIPAddress(AppConstant.appiumServerIP);
builder.usingPort(AppConstant.appiumServerPort);
builder.withCapabilities(capability);

builder.withArgument(GeneralServerFlag.SESSION_OVERRIDE);

builder.withArgument(GeneralServerFlag.LOG_LEVEL,"error");
   // builder.withLogFile(new 
File(FrameworkConstant.appiumServerLogPath));

builder.withStartUpTimeOut(FrameworkConstant.AppiumServerTimeout, 
TimeUnit.SECONDS);

*ERROR in Jenkins*

io.appium.java_client.service.local.InvalidServerInstanceException: Invalid 
server instance exception has occured: There is no installed nodes! Please 
install node via NPM (https://www.npmjs.com/package/appium#using-node-js) 
or download and install Appium app (http://appium.io/downloads.html)
at 
io.appium.java_client.service.local.AppiumServiceBuilder.findNodeInCurrentFileSystem(AppiumServiceBuilder.java:156)
at 
io.appium.java_client.service.local.AppiumServiceBuilder.checkAppiumJS(AppiumServiceBuilder.java:317)
at 
io.appium.java_client.service.local.AppiumServiceBuilder.createArgs(AppiumServiceBuilder.java:397)
at 
org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:338)
at 
io.appium.java_client.service.local.AppiumDriverLocalService.buildService(AppiumDriverLocalService.java:71)
at com.appium.AppiumSetup.startAppiumServer(AppiumSetup.java:41)
at com.testCases.BaseTest.invokeAppium(BaseTest.java:25)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at 
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
at 
org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:62)
at 
org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:385)
at 
org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:321)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:317)
at org.testng.SuiteRunner.run(SuiteRunner.java:276)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1212)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1134)
at org.testng.TestNG.runSuites(TestNG.java:1063)
at org.testng.TestNG.run(TestNG.java:1031)
at 
org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:284)
at 
org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
at 
org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:119)
at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:428)
at 
org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:562)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:548)
Caused by: java.io.IOException: 
C:\Windows\system32\config\systemprofile\AppData\Roaming\npm\node_modules
at 
io.appium.java_client.service.local.AppiumServiceBuilder.findNodeInCurrentFileSystem(AppiumServiceBuilder.java:157)
 
... 29 more


-- 
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/5d91be64-7a84-4469-a0de-de28753a670an%40googlegroups.com.


Re: Display of job results

2022-02-02 Thread Ullrich Hafner


> Am 01.02.2022 um 22:27 schrieb 'christop...@googlemail.com' via Jenkins Users 
> :
> 
> [...]
> 
> Any recommendations how I can improve that situation? Is there a way to 
> realize some of these ideas:
> - customize position of a plugin output in the job view

This is one of the major drawbacks of Jenkins UI in the moment and there is no 
workaround available yet. We started a new plugin that tries to solve this 
problem with https://muuri.dev  on a new page but this 
promising approach still needs to be implemented for the old views.
 
>  - split display of xunit test results per tool?

This is also not possible right now. I am using this approach in the warnings 
plugin and plan to make this concept available for coverage data as well. But 
for unit tests this is not planned yet. I’m also not sure if that information 
actually is so helpful: if a test fails then I am not really not that 
interested in which suite it failed.  

>  
> What about the ranorex plugin itself? I do have a number of ranorex test 
> executables and these are called by a script from the build system. I do not 
> want to replicate a list in jenkins scripts. That's why I don't like to use 
> the ranorex plugin here.
> 
> Thanks for reading up to here and many thanks in advance for any advice!
> Regards,
> Christoph
> 
> -- 
> 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/5c0dc622-e9c0-498b-9d8d-8bac93caace6n%40googlegroups.com
>  
> .

-- 
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/08878689-D443-4AEA-8B28-C2F6EF4DA303%40gmail.com.


Re: Gerrit review authentication error

2022-02-02 Thread jimsearle
Hi,

Was this ever resolved?  I am also not seeing Gerrit as an option in the 
Pipeline -> SCM list



On Thursday, March 11, 2021 at 6:56:35 AM UTC-8 Ali Raza wrote:

> Can it be the problem with the port which the gerrit trigger plugin for 
> ssh?
>
> On Wed, Mar 10, 2021 at 6:28 PM Ali Raza  wrote:
>
>> Yes, I am using the  “G errit Code Review” plugin v0.4.4. 
>>
>> [image: gerrit.jpg]
>>
>> On Wed, Mar 10, 2021 at 6:22 PM Luca Milanesio  
>> wrote:
>>
>>>
>>>
>>> On 10 Mar 2021, at 17:19, Ali Raza  wrote:
>>>
>>> I am not getting gerrit option in the dropdown but surprisingly it able 
>>> to clone the code from repo and jenkins script from another repo both 
>>> hosted on gerrit. It even is able to build the docker using the jenkins 
>>> build script.
>>>
>>>
>>> That is weird: have you installed the “Gerrit Code Review” plugin v0.4.4?
>>> https://plugins.jenkins.io/gerrit-code-review/
>>>
>>> If yes, it should provide a Gerrit SCM and it should be visible in the 
>>> list of options.
>>>
>>> Luca.
>>>
>>>
>>> 
>>>
>>>
>>>
>>> On Wednesday, 10 March 2021 at 17:23:20 UTC+1 luca.mi...@gmail.com 
>>> wrote:
>>>

 On 10 Mar 2021, at 16:12, Ali Raza  wrote:

 One thing I forgot to mention is that same job is working on another 
 server with the same setting. When we migrated it to a new server it start 
 having the problem. So all of the environment variables and script were 
 working on the previous server. We have many other jobs which are not 
 using 
 multibranch pipelines that is why it will be bit challenging to move them 
 on multibranch pipeline. 

 I am using git/https as a SCM source(https://GERRIT_BASE_URL/a/PROJECT 
 ) and passing the username and 
 password inside the credentials.


 I believe the Gerrit Code Review plugin assumes the SCM source is a 
 Gerrit SCM (not Git SCM) and it may fail to access the credentials there.

 Luca.


  

 On Wednesday, 10 March 2021 at 16:13:11 UTC+1 luca.mi...@gmail.com 
 wrote:

>
> On 10 Mar 2021, at 15:02, Luca Milanesio  wrote:
>
>
>
> On 10 Mar 2021, at 14:58, Ali Raza  wrote:
>
> Yes, it is triggering on gerrit code changes and cloning the 
> repository as well but when it is trying to execute ' gerritReview' 
> command. The code inside my pipeline script where i am having problem is 
> gerritReview labels: ['Unit-test': 1]
>
> It is a plain pipeline job not a multibranch pipeline.
>
>
> Gotcha, that isn’t really the use-case that the Gerrit Code Review 
> plugin has been designed for.
>
> There are some environment variables that the plugin expects to be set:
>
> https://github.com/jenkinsci/gerrit-code-review-plugin/blob/master/BUILD.md#using-environment-variables
>
> As you can see, the list is quite big :-(
> All of them are automatically set when you run in a multi-branch 
> pipeline, otherwise you may need to set them manually.
>
>
> One question: what type of Git SCM source URL are you using?
> Git/HTTP or Git/SSH?
>
> Can you share the settings?
>
> Luca.
>
>
> I know that the Gerrit Trigger Plugin sets some of them, but you 
> should cross-check them.
>
> HTH
>
> Luca.
>
>
>
>
> On Wed, Mar 10, 2021 at 3:39 PM Luca Milanesio  
> wrote:
>
>>
>>
>> On 10 Mar 2021, at 14:35, Ali Raza  wrote:
>>
>> Yes, I have added SCM credentials to my pipeline settings. Inside 
>> repository URL I also have ''/a/'' prefix. 
>>
>>
>> Cool, and you confirm that the clone works as expected.
>>
>>
>> Do i need to add SSH keys which I have added to 'gerrit trigger' 
>> plugin settings somewhere inside Gerrit server?
>>
>>
>> Why do you use the Gerrit Trigger plugin? Isn’t this a multi-branch 
>> pipeline?
>>
>> Luca.
>>
>>
>>
>> On Wednesday, 10 March 2021 at 15:19:15 UTC+1 luca.mi...@gmail.com 
>> wrote:
>>
>>>
>>> On 10 Mar 2021, at 13:31, Ali Raza  wrote:
>>>
>>>   Hi
>>> I am using the Gerrit trigger plugin with Jenkins which is working 
>>> fine but along with it i am also using the Gerrit Code Review plugin. I 
>>> am 
>>> calling 'gerrit review' command inside my pipeline script but getting 
>>> an 
>>> error 'Gerrit Review requires authentication, however there are no 
>>> credentials defined or are empty'
>>>
>>>
>>> Have you defined the credentials in the Gerrit SCM connection in the 
>>> multi-branch pipeline job?
>>> Also remember to use the ‘/a/‘ prefix for the Gerrit SCM URL, 
>>> otherwise the access won’t be authenticated.
>>>
>>> Example:
>>> Https://review.mycompany.com/a/myrepo 
>>> 
>>>
>>> 

Re: Support for CloudBees plugins

2022-02-02 Thread James Nord
If the PR builds then you can try the resulting binary.  Download from the 
links to Jenkins the PR
https://github.com/jenkinsci/aws-credentials-plugin/pull/125

I say if, because I wrote the patch on a mobile phone
On Monday, 31 January 2022 at 17:51:00 UTC alan.l...@gmail.com wrote:

> I do understand that CloudBees is probably quite busy... but you have to 
> note this issue has been open on both GitHub and the Jenkins JIRA for over 
> a month without anyone acknowledging it or taking ownership.   I understand 
> the correct action for subscribers is mostly "just don't upgrade,"  but it 
> would be nice if the tickets could be acknowledged.
> -Alan
>
> On Friday, January 21, 2022 at 6:31:06 AM UTC-7 bma...@gmail.com wrote:
>
>> Hi,
>>
>> While our teams are aware of this issue and we should look into it soon 
>> enough, I can't commit to any precise date. In particular in this case 
>> because the workaround is easy: going back to 1.32 AFAIU.
>> Many other more pressing priorities are higher than this (e.g. making 
>> sure the hundreds of plugins, many OSS, that CloudBees verifies 
>>  
>> are ready for the next LTS).
>>
>> I would say there are 3 options:
>>
>>- Wait until somebody picks it up.
>>- File the fix yourself (or someone in your company, or paying 
>>someone to do it), then we can probably try and fast track the merge & 
>>release for it.
>>- for CloudBees customers only: use ZenDesk to discuss further 
>>options. 
>>
>> Hope this helps clarify.
>>
>> Le mer. 19 janv. 2022 à 19:44, alan.l...@gmail.com  
>> a écrit :
>>
>>> Appears that no one at CloudBees has looked at the issue with the AWS 
>>> Credentials plugin.  The issue is over a month old.  Is there a contact at 
>>> CloudBees I could ping to find out options?   Thanks.
>>> -Alan
>>>
>>> On Thursday, January 13, 2022 at 2:37:20 PM UTC-7 
>>> alan.l...@microfocus.com wrote:
>>>
 Frankly I don’t have any experience doing this… so any help would be 
 appreciated.  Thanks for the reply!

 -Alan

  

 *From:* jenkins...@googlegroups.com  *On 
 Behalf Of *Baptiste Mathus
 *Sent:* Thursday, January 13, 2022 2:27 PM
 *To:* jenkins...@googlegroups.com
 *Subject:* Re: Support for CloudBees plugins

  

 Hi, 

 Thanks for the notice. Reporting the bug in Jira is the right way 
 indeed.

 I know nothing about this plugin myself, but looking around in the last 
 changes, it looks like 
 https://github.com/jenkinsci/aws-credentials-plugin/pull/88/files#r772008354
  
 could be a good lead.

  

 I would recommend creating a PR with something around this. The build 
 will then automatically create an "incremental" and allow you to test this 
 to help fix it. Doing it would be invaluable to at least identify the 
 exact 
 cause for your issue.

  

 If you do not know how to do it, I *might* give it a look later this 
 week or next one, but no guarantee.

  

 Cheers

  

 Le jeu. 13 janv. 2022 à 21:39, alan.l...@gmail.com  
 a écrit :

 For last 2 weeks, been trying to get attention on bug with CloudBees 
 AWS credentials plugin 1.33.   The external ID feature causes failures for 
 anything using an AWS role without an external ID.

  

 I can't seem to get a response on this problem (looks like others have 
 issues too).  Is there a process besides opening a ticket and waiting?

  

 Issue on Jenkins JIRA:

 https://issues.jenkins.io/browse/JENKINS-67452

  

 Issue on GitHub:

 https://github.com/jenkinsci/aws-credentials-plugin/issues/116

  

 Thanks for any advice.

 -Alan

 -- 
 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-use...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/jenkinsci-users/be6909de-b449-4d02-8c0f-8042bbe7299an%40googlegroups.com
  
 
 .

 -- 
 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-use...@googlegroups.com.

 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS6XAJQKwRpNJPjzuH5BK4B-H6sWqS4a7nfbr0_AtpA7cA%40mail.gmail.com
  
 

Re: Fail to upgrade Jenkins on windows

2022-02-02 Thread James Nord
Jenkins can upgrade itself when run as a service in windows 

It can not when launched manually, at the same time it should not offer to 
update itself either.

You can install the service most simply with the msi installer, but then if 
you install is a package you should upgrade via a package to

So possibly install on a throw away VM then copy files and register the 
service manually.  I think there may even be some docs on jenkins.io to say 
how to do this.
On Friday, 21 January 2022 at 09:05:58 UTC dheinric wrote:

> Am Donnerstag, dem 20.01.2022 um 11:52 -0500 schrieb Alessandro Ferrucci:
>
> The process cannot access the file because it is being used by another 
> process.
>
>
> That's hat you get when you run servers on Windows. Unlike Linux, Windows 
> can't overwrite executables while they run (in this case your jenkins.war). 
> You need to shutdown Jenkins, rpelace the file, start Jenkins.
>
> Bye...
>
> Dirk
>
> -- 
>
> *Dirk Heinrichs*
> Senior Systems Engineer, Delivery Pipeline
> OpenText ™ Discovery | Recommind
> *Phone*: +49 2226 15966 18 <+49%202226%201596618>
> *Email*: dhei...@opentext.com
> *Website*: www.recommind.de
> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
> Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, 
> Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
> This e-mail may contain confidential and/or privileged information. If you 
> are not the intended recipient (or have received this e-mail in error) 
> please notify the sender immediately and destroy this e-mail. Any 
> unauthorized copying, disclosure or distribution of the material in this 
> e-mail is strictly forbidden
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail 
> irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und 
> vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte 
> Weitergabe dieser Mail sind nicht gestattet.
>

-- 
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/e3a42afc-1a34-49dd-a627-9ac8910ad932n%40googlegroups.com.


Re: Display of job results

2022-02-02 Thread 'christop...@googlemail.com' via Jenkins Users
Thank you very much for the reply.

I'd totally agree when we'd talk about unit test results alone. However 
Ranorex is a GUI-test tool used for integration or acceptance tests that 
only outputs its results in junit file format.
OK, I'll live with it for the moment.


ullrich...@gmail.com schrieb am Mittwoch, 2. Februar 2022 um 13:58:46 UTC+1:

>
>
> Am 01.02.2022 um 22:27 schrieb 'christop...@googlemail.com' via Jenkins 
> Users :
>
> [...]
>
>
> Any recommendations how I can improve that situation? Is there a way to 
> realize some of these ideas:
> - customize position of a plugin output in the job view
>
>
> This is one of the major drawbacks of Jenkins UI in the moment and there 
> is no workaround available yet. We started a new plugin that tries to solve 
> this problem with https://muuri.dev on a new page but this promising 
> approach still needs to be implemented for the old views.
>  
>
>  - split display of xunit test results per tool?
>
>
> This is also not possible right now. I am using this approach in the 
> warnings plugin and plan to make this concept available for coverage data 
> as well. But for unit tests this is not planned yet. I’m also not sure if 
> that information actually is so helpful: if a test fails then I am not 
> really not that interested in which suite it failed.  
>
>  
> What about the ranorex plugin itself? I do have a number of ranorex test 
> executables and these are called by a script from the build system. I do 
> not want to replicate a list in jenkins scripts. That's why I don't like to 
> use the ranorex plugin here.
>
> Thanks for reading up to here and many thanks in advance for any advice!
> Regards,
> Christoph
>
> -- 
> 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-use...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/5c0dc622-e9c0-498b-9d8d-8bac93caace6n%40googlegroups.com
>  
> 
> .
>
>
>

-- 
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/cef11e48-5d55-46ee-b6c3-f33c25e5d941n%40googlegroups.com.