Re: Using @grab to fetch SNAPSHOT jar in groovy sometimes can't be recoganized correctly if updating the SNAPSHOT

2018-11-02 Thread pan
Updates:

It might not be a good idea to use @grab in Jenkins pipeline script.

We also found an issue about this: 
https://issues.jenkins-ci.org/browse/JENKINS-48974, this will cause the 
parallel jobs which @grab the same direct/indirect dependencies failed.

It seems related to the groovy/ivy issue: 
https://issues.apache.org/jira/browse/GROOVY-7407. And it’s not fixed yet…
We also consider the way of @Library, but in the groovy lib, we still need 
@grab 3rd party lib, which is the same situation.

Anyway, we refactor the dependencies into a service and call rest api from 
the pipeline script, it seems working.

BR
Wei 

在 2018年10月8日星期一 UTC+2下午4:34:58,pan写道:
>
> Hi,
>
> I got an issue when using @grab.
> We are developing a jar and pipeline script to do the CI. We modify some 
> java code, deploy onto our internal Nexus server, use @grab in groovy to 
> fetch it to call the function.
> During developing, we found when we modify some code, deploy a new 
> SNAPSHOT version with the same version number of jar, sometimes the 
> pipeline script is not working.
>
> For example:
>
> @GrabResolver(name='Internal Nexus Snapshot', root='
>> https://internal.nexus.com/')
>> @Grab('some-package:some-artifact:0.0.1-SNAPSHOT')
>> import some.Utils
>> println new Utils()
>
>
> It works well, but if I deploy a new version to Nexus, it might fail, 
> unless I restart the Jenkins, then it will work again.
>
> error message:
>
> Running in Durability level: MAX_SURVIVABILITY
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
> failed:
> WorkflowScript: 1: unable to resolve class some.Utils
>  @ line 1, column 1.
>@GrabResolver(name='Internal Nexus Snapshot', 
> root='https://internal.nexus.com/')
>^
>
> 1 error
>
>   at 
> org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
>   at 
> org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:958)
>   at 
> org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:605)
>   at 
> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:554)
>   at 
> groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
>   at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
>   at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
>   at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
>   at 
> org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:131)
>   at 
> org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125)
>   at 
> org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560)
>   at 
> org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521)
>   at 
> org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:290)
>   at hudson.model.ResourceController.execute(ResourceController.java:97)
>   at hudson.model.Executor.run(Executor.java:421)
> Finished: FAILURE
>
>
>
> I think it might be some cache in Jenkins, because restart Jenkins will 
> fix it. But I can't find it.
> Does anyone have any clue about this?
> Thank you very much.
>
>
>

-- 
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/9c0ce05c-5308-4a95-9529-af7d9331bfe2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins to run selenium scripts

2018-11-02 Thread Jan Monterrubio
Yes, you can probably add the windows machine as an agent and have it
configured to build jobs with a label WINDOWS. Jenkins will ssh or rdp to
the node for you

On Fri, Nov 2, 2018 at 13:26 maninadh golla 
wrote:

> Hello All,
>
>
> My team have asked me to integrate selenium scripts with jenkins. There is
> a dedicated windows server which QA team is using to run selenium scripts.
> So i am just wondering if there is a way to log into that windows machine
> and run the scripts through Jenkins.
>
>
> Your reply will be highly appriciated.
>
> Thanks,
> Mani.
>
> --
> 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/ea8bc55a-d051-49b1-9032-3d8e9695ece3%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CADgiF9%2BnoDQZROPzDOcmeYjik%3D-ijAkSTy4H3WU7-xWV2Bzbyw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins to run selenium scripts

2018-11-02 Thread maninadh golla
Hello All,


My team have asked me to integrate selenium scripts with jenkins. There is 
a dedicated windows server which QA team is using to run selenium scripts. 
So i am just wondering if there is a way to log into that windows machine 
and run the scripts through Jenkins.


Your reply will be highly appriciated.

Thanks,
Mani.

-- 
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/ea8bc55a-d051-49b1-9032-3d8e9695ece3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help: Jenkins builds ONLY on master OR slave

2018-11-02 Thread Ivan Fernandez Calvo
You can make it with a pipeline with 2 stages in parallel with the same steps 
and different nodes somethinlike this


pipeline{

stages {
  stage(‘parallel’) {
parallel {
  stage(‘master’){
agent { label ‘master’}
steps{
  //steps
}
  }
  stage(‘agent’){
agent { label ‘agent’ }
steps {
  //steps
}
  }
}
}

}

On steps you could use the build step, it launch a job, or translate your job 
to pipeline

https://jenkins.io/doc/book/pipeline/syntax/

-- 
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/7e74b1a1-c866-4750-97a9-4c890046a45d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: threadExecutorNumber must be at least 1 error with JIRA plugin v3.04 and Jenkins v2.138.2

2018-11-02 Thread 'David Brown' via Jenkins Users
Apologies, plugin version should read JIRA plugin v3.0.4

On Friday, 2 November 2018 16:30:49 UTC, David Brown wrote:
>
> Hello. I'm facing an issue with the JIRA plugin. Associated cases are 
> correctly getting updated but the JIRA Issue links in build Changelog are 
> not rendering correctly as hyplerlinks. As a first step in trying to debug 
> this I have tried "Validate Settings" in the JIRA section of Manage Jenkins 
> > Configure System but this fails with an error message 
> "threadExecutorNumber must be at least 1". It seems there is a new 
> parameter "Thread Executor Size" (defaults to 10, I have tried a few other 
> values but these make no difference to my error message) but I can see no 
> option to specify the Thread Executor Number. Can anyone help please? 
> Regards, David 
>
>
>  
>

-- 
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/69f7916d-66b6-42b8-9d54-ea91b7abff38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


threadExecutorNumber must be at least 1 error with JIRA plugin v3.04 and Jenkins v2.138.2

2018-11-02 Thread 'David Brown' via Jenkins Users
Hello. I'm facing an issue with the JIRA plugin. Associated cases are 
correctly getting updated but the JIRA Issue links in build Changelog are 
not rendering correctly as hyplerlinks. As a first step in trying to debug 
this I have tried "Validate Settings" in the JIRA section of Manage Jenkins 
> Configure System but this fails with an error message 
"threadExecutorNumber must be at least 1". It seems there is a new 
parameter "Thread Executor Size" (defaults to 10, I have tried a few other 
values but these make no difference to my error message) but I can see no 
option to specify the Thread Executor Number. Can anyone help please? 
Regards, David 
   

 

-- 
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/26d39012-0fde-4420-bcca-fce48fcae730%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Alternative to specifying branch/tag/version in library identifier

2018-11-02 Thread Jan Monterrubio
What’s the .pkg.pkg for?

Usually I’ve seen the import as:

@Library('my-shared-library') _

On Fri, Nov 2, 2018 at 09:19  wrote:

> Up to now, I've followed the documentation of specifying the
> branch/tag/version to checkout from Git for shared library using identifer:
> 'thing@version'
> 
>  approach, however I suspect this causes issues when referring to the
> library using library('thing').pkg.pkg... as it doesn't recognize it.
>
> Is there another way to configure the version to checkout?
>
> --
> 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/f7f10738-ace9-47a9-a9c0-2a59419869cd%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CADgiF9Kyp9zrBShXBmDDfvYRTMz-_%2BaJ1qTCVbWtJBL%2BaCoWLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help: Jenkins builds ONLY on master OR slave

2018-11-02 Thread Jan Monterrubio
When the job builds on the slave agent, does it not build concurrently with
one executor on the master and one on the slave?

On Fri, Nov 2, 2018 at 02:22  wrote:

> Hi
>
> I got two machines with Win10. One is jenkins' master and the other is
> slave. Both are shown as online in dashboard.
>
> Both node are configured as 'Use this node as much as possible'.
>
> My Project is configured as 'Execute concurrent builds if necessary'.
>
> I want to build the project on master AND slave concurrently, but found
> jenkins only start build action on slave. Only after mark slave as offline,
> master would take build action.
>
> I tried label them but failed.
>
> Master has 2 executors while slave has one, but they are the default
> setting value.
>
> Jenkins version : 2.138.2
>
> Is there any thing I missed?
>
> Thanks.
>
> --
> 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/0bf2a8b2-0d1d-4600-9dab-9e762a834cb7%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CADgiF9JnFmZcD7T8L0Wqys7mDvMDSoZP5oQW9GRfWqb%2BAMcf-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Alternative to specifying branch/tag/version in library identifier

2018-11-02 Thread afeller
Up to now, I've followed the documentation of specifying the 
branch/tag/version to checkout from Git for shared library using identifer: 
'thing@version' 

 approach, however I suspect this causes issues when referring to the 
library using library('thing').pkg.pkg... as it doesn't recognize it.

Is there another way to configure the version to checkout?

-- 
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/f7f10738-ace9-47a9-a9c0-2a59419869cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pod still released after "Pod Retention" set to "On Failure" for Kubernetes Plugin

2018-11-02 Thread Carlos Sanchez
When you say "pod still released" what do you mean? the retention means the
pod will not be deleted in k8s but not used by jenkins

On Fri, Nov 2, 2018 at 9:58 AM Evan  wrote:

> Jenkins 2.138.2
>
> Kubernetes Plugin 1.13.2
>
>
>
> When using kubernetes plugin to dynamically provision Jenkins slave, the
> needs now is to reserve workspace of Jenkins slave when the job failed,
> "Pod Retention" seems to be useful.
>
>
>
> When "Pod Retention" is set to "Always", after job finished, the pod is
> reserved;
>
>
> But when "Pod Retention" set to "On Failure", after job fails, the pod
> still released.
>
>
> Is it a bug of plugin or my setting problem?
>
> --
> 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/334d2195-3ace-4ed0-81ba-2ae77958d3d7%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CALHFn6NR%3DrqeZ%2BAUEHv5V3hgNShja7QrW7CSef6aeXtxGPJR3Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Pod still released after "Pod Retention" set to "On Failure" for Kubernetes Plugin

2018-11-02 Thread Evan
 

Jenkins 2.138.2

Kubernetes Plugin 1.13.2

 

When using kubernetes plugin to dynamically provision Jenkins slave, the 
needs now is to reserve workspace of Jenkins slave when the job failed, 
"Pod Retention" seems to be useful.

 

When "Pod Retention" is set to "Always", after job finished, the pod is 
reserved;


But when "Pod Retention" set to "On Failure", after job fails, the pod 
still released.


Is it a bug of plugin or my setting problem?

-- 
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/334d2195-3ace-4ed0-81ba-2ae77958d3d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Help: Jenkins builds ONLY on master OR slave

2018-11-02 Thread firstrose
Hi

I got two machines with Win10. One is jenkins' master and the other is 
slave. Both are shown as online in dashboard.

Both node are configured as 'Use this node as much as possible'.

My Project is configured as 'Execute concurrent builds if necessary'.

I want to build the project on master AND slave concurrently, but found 
jenkins only start build action on slave. Only after mark slave as offline, 
master would take build action.

I tried label them but failed.

Master has 2 executors while slave has one, but they are the default 
setting value.

Jenkins version : 2.138.2

Is there any thing I missed?

Thanks.

-- 
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/0bf2a8b2-0d1d-4600-9dab-9e762a834cb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.