Re: Sourcing environment variables on node

2017-11-02 Thread Robert Hales
Yeah, as you found, the environment is the sh is only present during that 
run. It is just like dropping to a shell (or running another shell within a 
shell), running some things, and then exiting. 

If you want to set them globally, you will need to set them in an 
environment block in declarative pipeline, or in groovy code. env.FOO = 
"BAR". 

If you want to try to set something in the shell, and then get those values 
back into the pipeline, it gets a little harder. You can return just a 
value from a shell script and assign that to a variable. Or you can look at 
the pipeline utility steps plugin to suck things in from a file. 

On Thursday, November 2, 2017 at 2:07:38 PM UTC-6, itchymuzzle wrote:
>
> Don't know how to set it globally, most likely someone will know how to do 
> that and respond.
>
> > each sh looses it's environment.
>
> Each sh is it's own environment.  If you have two different terminals up, 
> what you do in one isn't known in the other. For example.
>

-- 
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/74cf5bb2-00d5-4d4f-8254-787ea6fb7a78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Circular dependencies in plugins

2017-11-02 Thread CLOSE Dave
Daniel Beck wrote:

> Without a list of plugins (and versions) on the other instance it's
> impossible to say why might these differ.

Ok. Here's another instance with 73 plugins listed below. Again, the
Graphviz dot file is attached.

  Ant Plugin 1.2
  Apache HttpComponents Client 4.x API Plugin 4.5.3-2.0
  Audit Trail 2.2
  Authentication Tokens API Plugin 1.3
  bouncycastle API Plugin 2.16.2
  Branch API Plugin 2.0.15
  Build Timeout 1.19
  Build-Publisher plugin 1.22
  built-on-column 1.1
  Conditional BuildStep 1.3.6
  Config File Provider Plugin 2.16.4
  Copy To Slave Plugin 1.4.4
  Credentials Binding Plugin 1.13
  Credentials Plugin 2.1.16
  CVS Plug-in 2.13
  Display URL API 2.1.0
  Durable Task Plugin 1.15
  Email Extension Plugin 2.61
  EnvInject API Plugin 1.4
  Environment Injector Plugin 2.1.5
  External Monitor Job Type Plugin 1.7
  Folders Plugin 6.2.1
  Gerrit Trigger 2.26.2
  Git client plugin 2.6.0
  Git Parameter Plug-In 0.8.1
  Git plugin 3.6.3
  Icon Shim Plugin 2.0.3
  Jackson 2 API Plugin 2.8.7.0
  Javadoc Plugin 1.4
  JavaScript GUI Lib: ACE Editor bundle plugin 1.1
  JavaScript GUI Lib: Handlebars bundle plugin 1.1.1
  JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin 1.2.1
  JavaScript GUI Lib: Moment.js bundle plugin 1.1.1
  jQuery plugin 1.12.4-0
  jQuery UI plugin 1.0.2
  JSch dependency plugin 0.1.54.1
  JUnit Plugin 1.21
  JUnit Realtime Test Reporter Plugin 0.5
  LDAP Plugin 1.17
  Mailer Plugin 1.20
  MapDB API Plugin 1.0.9.0
  Matrix Authorization Strategy Plugin 2.1
  Matrix Project Plugin 1.12
  Maven Integration plugin 3.0
  Multijob plugin 1.28
  Multiple SCMs plugin 0.6
  Node and Label parameter plugin 1.7.2
  OWASP Markup Formatter Plugin 1.5
  Parameterized Trigger plugin 2.35.2
  Pipeline: API 2.23.1
  Pipeline: Job 2.15
  Pipeline: Nodes and Processes 2.17
  Pipeline: SCM Step 2.6
  Pipeline: Step API 2.13
  Pipeline: Supporting APIs 2.16
  Plain Credentials Plugin 1.4
  promoted builds plugin 2.31
  Resource Disposer Plugin 0.8
  Run Condition Plugin 1.0
  Schedule Build Plugin 0.4.0
  SCM API Plugin 2.2.3
  Script Security Plugin 1.34
  SonarQube Scanner for Jenkins 2.6.1
  SSH Credentials Plugin 1.13
  SSH Slaves plugin 1.22
  Structs Plugin 1.10
  TextFinder plugin 1.10
  Timestamper 1.8.8
  Token Macro Plugin 2.3
  Translation Assistance plugin 1.15
  Version Number Plug-In 1.8.1
  Workspace Cleanup Plugin 0.34
  xUnit plugin 1.102

I think part of the trouble with the seemingly endless dependency chain
may be the Pipeline plugins. Most if not all of the other plugins seem
to define the other plugins on which they are dependent. The Pipeline
plugins, in contrast, define only the other plugins which depend on them.

>> Is there any way to clean up this situation?
> 
> No. Dependencies are just that. None of those you mentioned are
> optional, so even JENKINS-33843 shouldn't be to blame in this case.
> 
> Note that none of the dependencies you mention are circular. Jenkins
> should refuse to even load plugins with actual circular
> dependencies.

Sorry about the subject line. I realized later that there are no actual
cycles but forgot to change it.
-- 
Dave Close, Thales InFlyt Experience, Irvine California USA.
cell +1 949 394 2124, dave.cl...@us.thalesgroup.com

 "If your aren't in over your head,
  how do you know how tall you are?" -- T. S. Eliot

-- 
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/140a8c83-387e-5afe-d29c-68fb550b5977%40us.thalesgroup.com.
For more options, visit https://groups.google.com/d/optout.


k.dot
Description: k.dot


How to define LabelParameterValue in Jenkinsfile

2017-11-02 Thread Kai Wang
Hi,

I have two jobs A and B. Job A calls Job B like this

*build job: "B", parameters[[$class: 'LabelParameterValue', name: 'node', 
label: "${env.NODE_NAME}"]]*

I know I am supposed to add a Label parameter in B. But the problem is B is 
a multiple branch pipeline project defined by Jenkinsfile.

So the question is, how do I define a Label parameter in Jenkinsfile? I 
tried 

*parameters {*
*LabelParameterValue(name: 'node', label: '')*
*}*

But I got the error:

*WorkflowScript: 11: Invalid parameter type "Label". Valid parameter types: 
[booleanParam, choice, credentials, file, text, password, run, string] @ 
line 11, column 9.*
*   Label(name: 'node', label: '')*
*   ^*

Thanks for the help.

-- 
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/aeac1bc6-5bac-405b-afca-957eed19d6c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: the older builds for windows and mac

2017-11-02 Thread Masaru Tsuchiyama

Hi Daniel,

I didn't notice it.

Regards.
Masaru

Daniel Beck wrote:



On 3. Nov 2017, at 01:08, Masaru Tsuchiyama  wrote:

If we add ?C=M=D to the end of the URL


The column headers are clickable links that do this for you.



--
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/77d84496-4f39-42f8-65d4-f987afb4d312%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: the older builds for windows and mac

2017-11-02 Thread Daniel Beck

> On 3. Nov 2017, at 01:08, Masaru Tsuchiyama  wrote:
> 
> If we add ?C=M=D to the end of the URL

The column headers are clickable links that do this for you.

-- 
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/33AB5535-81C3-40C0-A50B-E9F747BFB5EF%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: the older builds for windows and mac

2017-11-02 Thread Masaru Tsuchiyama


Hi Daniel,

Thank you for the reply.

I googled how to show the files in reverse chronological order,
and found it.

F.Y.I

For example, the binaries for Windows are available at
http://mirrors.jenkins-ci.org/windows/

If we add ?C=M=D to the end of the URL
like http://mirrors.jenkins-ci.org/windows/?C=M=D ,
the files are displayed in reverse chronological order.

See https://httpd.apache.org/docs/2.4/en/mod/mod_autoindex.html#query

Regards.
Masaru

Daniel Beck wrote:



On 31. Oct 2017, at 13:46, Masaru Tsuchiyama  wrote:

Could you make the older builds for them available?


See http://mirrors.jenkins-ci.org/ for the list.



--
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/7db41983-48bf-fac9-56b2-d6d06154875d%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Circular dependencies in plugins

2017-11-02 Thread Daniel Beck

> On 3. Nov 2017, at 00:41, CLOSE Dave  wrote:
> 
> I know that the dependencies are broken because I have another Jenkins
> instance with nearly all the same plugins but without Docker Commons
> Plugin.

Without a list of plugins (and versions) on the other instance it's impossible 
to say why might these differ.

> Is there any way to clean up this situation?

No. Dependencies are just that. None of those you mentioned are optional, so 
even JENKINS-33843 shouldn't be to blame in this case.

Note that none of the dependencies you mention are circular. Jenkins should 
refuse to even load plugins with actual circular dependencies.

-- 
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/CDFF690A-D8B3-42F7-A864-6D1D06363C03%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Circular dependencies in plugins

2017-11-02 Thread CLOSE Dave
I have a Jenkins server (2.87) with quite a few plugins installed. 95,
actually. I don't actually need some of them and I like to clean things
up a bit. But that doesn't seem practical.

Here's the list of installed plugins.
  Ant Plugin 1.7
  Audit Trail 2.2
  Authentication Tokens API Plugin 1.3
  bouncycastle API Plugin 2.16.2
  Branch API Plugin 2.0.11
  built-on-column 1.1
  Bulk Builder 1.5
  Conditional BuildStep 1.3.6
  Config File Provider Plugin 2.16.3
  Credentials Binding Plugin 1.13
  Credentials Plugin 2.1.14
  Crowd 2 Integration 1.8
  Dependency Graph Viewer Plugin 0.11
  Display URL API 2.0
  Docker Commons Plugin 1.8
  Docker Pipeline 1.12
  Durable Task Plugin 1.14
  Email Extension Plugin 2.58
  EnvInject API Plugin 1.2
  Environment Injector Plugin 2.1.3
  External Monitor Job Type Plugin 1.7
  Folders Plugin 6.1.2
  Git client plugin 2.5.0
  Git Parameter Plug-In 0.8.0
  Git plugin 3.5.1
  GIT server Plugin 1.7
  Gradle Plugin 1.27.1
  Hudson Build-Publisher plugin 1.21
  Icon Shim Plugin 2.0.3
  Jackson 2 API Plugin 2.7.3
  Javadoc Plugin 1.4
  JavaScript GUI Lib: ACE Editor bundle plugin 1.1
  JavaScript GUI Lib: Handlebars bundle plugin 1.1.1
  JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin 1.2.1
  JavaScript GUI Lib: Moment.js bundle plugin 1.1.1
  jQuery plugin 1.11.2-0
  jQuery UI plugin 1.0.2
  JUnit Plugin 1.21
  JUnit Realtime Test Reporter Plugin 0.4
  LDAP Plugin 1.16
  Mailer Plugin 1.20
  MapDB API Plugin 1.0.9.0
  Matrix Authorization Strategy Plugin 1.7
  Matrix Project Plugin 1.11
  Maven Integration plugin 2.17
  Multijob plugin 1.27
  Multiple SCMs plugin 0.6
  Node and Label parameter plugin 1.7.2
  OWASP Markup Formatter Plugin 1.5
  PAM Authentication plugin 1.3
  Parameterized Trigger plugin 2.35.1
  Pathignore Plugin 0.6
  Pipeline 2.5
  Pipeline Graph Analysis Plugin 1.5
  Pipeline: API 2.20
  Pipeline: Basic Steps 2.6
  Pipeline: Build Step 2.5.1
  Pipeline: Declarative 1.1.9
  Pipeline: Declarative Agent API 1.1.1
  Pipeline: Declarative Extension Points API 1.1.9
  Pipeline: Groovy 2.39
  Pipeline: Input Step 2.8
  Pipeline: Job 2.14.1
  Pipeline: Milestone Step 1.3.1
  Pipeline: Model API 1.1.9
  Pipeline: Multibranch 2.16
  Pipeline: Nodes and Processes 2.14
  Pipeline: REST API Plugin 2.8
  Pipeline: SCM Step 2.6
  Pipeline: Shared Groovy Libraries 2.8
  Pipeline: Stage Step 2.2
  Pipeline: Stage Tags Metadata 1.1.9
  Pipeline: Stage View Plugin 2.8
  Pipeline: Step API 2.12
  Pipeline: Supporting APIs 2.14
  Plain Credentials Plugin 1.4
  promoted builds plugin 2.29
  ruby-runtime 0.12
  Run Condition Plugin 1.0
  Schedule Build Plugin 0.4.0
  SCM API Plugin 2.2.1
  SCM Sync Configuration Plugin 0.0.10
  Script Security Plugin 1.33
  SonarQube Scanner for Jenkins 2.6.1
  SSH Agent Plugin 1.15
  SSH Credentials Plugin 1.13
  SSH Slaves plugin 1.21
  Structs Plugin 1.10
  Subversion Plug-in 2.9
  TextFinder plugin 1.10
  Token Macro Plugin 2.2
  Translation Assistance plugin 1.15
  Version Number Plug-In 1.8.1
  Windows Slaves Plugin 1.3.1
  xUnit plugin 1.102

Taking one example, I'd like to delete the Docker Commons Plugin. But I
can't because Docker Pipeline depends on it. But I can't delete Docker
Pipeline because Pipeline: Model Definition depends on it. The
dependency chain seems to go on to the point where I'd need to delete
nearly all the plugins before I could delete this one. I've taken the
time to work out all the dependencies that Jenkins claims are present
and the result, as a Graphviz dot file, is attached.

I know that the dependencies are broken because I have another Jenkins
instance with nearly all the same plugins but without Docker Commons
Plugin. Is there any way to clean up this situation?
-- 
Dave Close

-- 
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/4b458b4f-5c76-cba8-7207-3fbe043cceaa%40us.thalesgroup.com.
For more options, visit https://groups.google.com/d/optout.


j.dot
Description: j.dot


Re: Docker plugin. How to manage concurrent builds/volumes

2017-11-02 Thread Ryan Hochstetler
Kris,

I tried to travel down the same road, mounting a volume with the workspace 
directory into the slave containers as well as the master in order to 
expose the workspace contents post-build.  The *jenkins way* to provide 
developer-visibility into workspace contents seems to be committing the 
container so that the team can pull the resulting image and view the 
contents there.  That's pretty slick, but essentially requires me to teach 
hundreds of colleagues *how to docker *(and suffer their questions about 
why it can't work the way it used to work in the meantime).  

Given that this post is pretty dusty, I'm hoping you got past your 
problem.  Mind posting back here to summarize your solution?

On Tuesday, December 8, 2015 at 10:39:25 AM UTC-6, Kris Massey wrote:
>
> Hi All,
>
> I'm new to Docker, so thought I'd attempt to setup Jenkins with slaves 
> that are Docker containers. The software we build used gradle as the build 
> tool, and I've git a few issues. Below is a overview of where I am, however 
> I'm struggling to progress to the next stage
>
> Current Situation:
>
> Jenkins - Running on a standalone VM (may put into Docker at a later date) 
>
>- Docker plugin to start/stop containers for builds
>- At the moment build steps are just to echo something into a file
>
>
> Slaves - Docker images
>
>- Jenkins starts the image does whats needed and then stops 
>the container
>- *Issue* - the container is left behind...is there anyway to automate 
>removal of the containers from within Jenkins? 
>
>
> The next issues I have are:
>
>- How to mount the workspace into the container.
>   - The issue I'm having here is that we start X slaves, so if I 
>   mount the Jenkins master workspace onto the slave. Each slave will end 
> up 
>   pointing to the same folder on the host trampling all over each other
>   - Another issue here is, the project uses Gradle so it would be 
>   nice to attempt to reload/retain the gradle wrapper and dependency 
> caches. 
>- Extract build results (JUnit etc)
>   - By solving the issue above this could be resolved
>
>
> So I guess summed up my question is, how should the file system be managed 
> when using Docker containers as Jenkins Slaves? Any thoughts or how youve 
> implemented things would be great.
>
> Thanks,
> Kris
>

-- 
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/95857ff9-f7f0-4ab0-a570-de8922894112%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Sourcing environment variables on node

2017-11-02 Thread itchymuzzle
Don't know how to set it globally, most likely someone will know how to do 
that and respond.

> each sh looses it's environment.

Each sh is it's own environment.  If you have two different terminals up, 
what you do in one isn't known in the other. For example.

-- 
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/a7590e90-e66a-446f-9692-7dfcc6b92d30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Sourcing environment variables on node

2017-11-02 Thread Christoph Ruepprich
Thanks ichymuzzle. It worked with a minor change.
So the problem is that each sh looses it's environment. Is there a way to 
set it globally?


node ('remote-server') {
sh ('''
   . /home/cmr/myenv
   echo "My Variables: $FOO $BAR"
''')
}



On Thursday, 2 November 2017 14:01:04 UTC-5, itchymuzzle wrote:
>
> Maybe something like this?
>
> node ('remote-server') {
> sh '''
>. /home/cmr/myenv'
>echo "My Variables: ${env.FOO} ${env.BAR}"
> '''
> }
>

-- 
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/892167f5-00f0-43be-ac79-20eb6dec8bfd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Does Docker Slave Plugin support Pipeline Maven Integration Plugin?

2017-11-02 Thread nicolas de loof
I can't tell, best to give it a try and report any issue you encounter
doing this.

Le 2 nov. 2017 1:41 PM, "'Sandra Parsick' via Jenkins Users" <
jenkinsci-users@googlegroups.com> a écrit :

>
> ...

-- 
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/CANMVJzmD02Uj56Jgdn_PU-vz-vPtP7M3FE-dWFudDCjon4mFXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins crashing - java.lang.InterruptedException

2017-11-02 Thread Mark Waite
Alvin,

I think if you compare the stack trace from 5 years ago with your stack
trace, you'll find enough differences to hint that they are not likely
related to one another.

Yours is running "managedscripts.ScriptBuildStep.perform()" while the 5
year old stack trace is running "CommandInterpreter.perform ()"

Mark Waite

On Thu, Nov 2, 2017 at 1:13 PM Alvin Lee  wrote:

> Did you ever solve this issue? I'm running into the same thing now 5 years
> later
>
> java.lang.InterruptedException
>   at java.lang.Object.wait(Native Method)
>   at java.lang.Object.wait(Object.java:502)
>   at java.lang.UNIXProcess.waitFor(UNIXProcess.java:395)
>   at hudson.Proc$LocalProc.join(Proc.java:320)
>   at hudson.Launcher$ProcStarter.join(Launcher.java:409)
>   at 
> org.jenkinsci.plugins.managedscripts.ScriptBuildStep.perform(ScriptBuildStep.java:180)
>   at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
>   at 
> hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:735)
>   at hudson.model.Build$BuildExecution.build(Build.java:206)
>   at hudson.model.Build$BuildExecution.doRun(Build.java:163)
>   at 
> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:490)
>   at hudson.model.Run.execute(Run.java:1735)
>   at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
>   at hudson.model.ResourceController.execute(ResourceController.java:97)
>   at hudson.model.Executor.run(Executor.java:405)
> Build step 'Execute managed script' marked build as failure
>
>
> On Thursday, May 3, 2012 at 11:35:50 PM UTC-7, Steve Oliver wrote:
>>
>> Hi, all.  Trying to debug one of the first issues I've had with Jenkins
>> -- It is crashing on one of my jobs.
>>
>> From jenkins.log:
>>
>> May 4, 2012 1:00:49 AM hudson.TcpSlaveAgentListener 
>> INFO: JNLP slave agent listener started on TCP port 57822
>> May 4, 2012 1:01:04 AM hudson.WebAppMain$2 run
>> INFO: Jenkins is fully up and running
>> May 4, 2012 1:37:14 AM hudson.model.Run run
>> INFO: Job A #1 main build action completed: FAILURE
>> May 4, 2012 1:42:19 AM hudson.model.Run run
>> INFO: Job B #2 main build action completed: SUCCESS
>> May 4, 2012 1:47:28 AM hudson.model.Run run
>> INFO: Job C #5 aborted
>> java.lang.InterruptedException
>> at java.lang.Object.wait(Native Method)
>> at java.lang.Object.wait(Object.java:502)
>> at java.lang.UNIXProcess.waitFor(UNIXProcess.java:181)
>> at hudson.Proc$LocalProc.join(Proc.java:319)
>> at hudson.Launcher$ProcStarter.join(Launcher.java:345)
>> at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:82)
>> at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)
>> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
>> at
>> hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:705)
>> at hudson.model.Build$RunnerImpl.build(Build.java:178)
>> at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
>> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:475)
>> at hudson.model.Run.run(Run.java:1434)
>> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
>> at hudson.model.ResourceController.execute(ResourceController.java:88)
>> at hudson.model.Executor.run(Executor.java:239)
>>
>> Jenkins service goes away ... all gone.
>>
>> Ideas?
>>
>> Thanks,
>>
>> - Steve Oliver
>>
>> --
> 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/7b464d26-fef0-4aa7-bab6-80c2b02da030%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/CAO49JtGgLkaJ%3DYE2qyCY8hkpQCFsz4jYRc-VZJfgHHM9FYbjyg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins crashing - java.lang.InterruptedException

2017-11-02 Thread Alvin Lee
Did you ever solve this issue? I'm running into the same thing now 5 years 
later

java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at java.lang.UNIXProcess.waitFor(UNIXProcess.java:395)
at hudson.Proc$LocalProc.join(Proc.java:320)
at hudson.Launcher$ProcStarter.join(Launcher.java:409)
at 
org.jenkinsci.plugins.managedscripts.ScriptBuildStep.perform(ScriptBuildStep.java:180)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:735)
at hudson.model.Build$BuildExecution.build(Build.java:206)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:490)
at hudson.model.Run.execute(Run.java:1735)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:405)
Build step 'Execute managed script' marked build as failure


On Thursday, May 3, 2012 at 11:35:50 PM UTC-7, Steve Oliver wrote:
>
> Hi, all.  Trying to debug one of the first issues I've had with Jenkins -- 
> It is crashing on one of my jobs.
>
> From jenkins.log:
>  
> May 4, 2012 1:00:49 AM hudson.TcpSlaveAgentListener 
> INFO: JNLP slave agent listener started on TCP port 57822
> May 4, 2012 1:01:04 AM hudson.WebAppMain$2 run
> INFO: Jenkins is fully up and running
> May 4, 2012 1:37:14 AM hudson.model.Run run
> INFO: Job A #1 main build action completed: FAILURE
> May 4, 2012 1:42:19 AM hudson.model.Run run
> INFO: Job B #2 main build action completed: SUCCESS
> May 4, 2012 1:47:28 AM hudson.model.Run run
> INFO: Job C #5 aborted
> java.lang.InterruptedException
> at java.lang.Object.wait(Native Method)
> at java.lang.Object.wait(Object.java:502)
> at java.lang.UNIXProcess.waitFor(UNIXProcess.java:181)
> at hudson.Proc$LocalProc.join(Proc.java:319)
> at hudson.Launcher$ProcStarter.join(Launcher.java:345)
> at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:82)
> at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)
> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> at 
> hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:705)
> at hudson.model.Build$RunnerImpl.build(Build.java:178)
> at hudson.model.Build$RunnerImpl.doRun(Build.java:139)
> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:475)
> at hudson.model.Run.run(Run.java:1434)
> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
> at hudson.model.ResourceController.execute(ResourceController.java:88)
> at hudson.model.Executor.run(Executor.java:239) 
>
> Jenkins service goes away ... all gone.
>
> Ideas?
>
> Thanks,
>
> - Steve Oliver
>
>

-- 
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/7b464d26-fef0-4aa7-bab6-80c2b02da030%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Sourcing environment variables on node

2017-11-02 Thread itchymuzzle
Maybe something like this?

node ('remote-server') {
sh '''
   . /home/cmr/myenv'
   echo "My Variables: ${env.FOO} ${env.BAR}"
'''
}

-- 
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/86f0cdd9-5705-4d12-8229-210ce6614aee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Getting Current Build in Groovy

2017-11-02 Thread Neel Desai
But are you runnint this job on master JVM? What about running it from 
slave node? How can I get the value? I am trying to execute it from slave 
node and it is giving me error. It is strict requirement for me to run it 
from slave machine only.

On Thursday, March 15, 2012 at 8:47:03 AM UTC-5, Jay Flowers wrote:
>
> I figured it out...  I was not running the Groovy script as the build step 
> type "Execute system Groovy script" 
>
>
> On Thu, Mar 15, 2012 at 9:00 AM, Jay Flowers  > wrote:
>
>> This use to work for me:
>>
>> def build = Thread.currentThread().executable
>>
>> Now I get this error:
>>
>> Caught: groovy.lang.MissingPropertyException: No such property: executable 
>> for class: java.lang.Thread
>>  at hudson2123325863987208585.run(hudson2123325863987208585.groovy:5)
>>
>>
>> Why oh why is the happening? :-)  Anyone know...
>>
>>
>> -- 
>> Jay Flowers
>> --
>> http://jayflowers.com
>> -
>>
>
>
>
> -- 
> Jay Flowers
> --
> http://jayflowers.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/0e6ecdfa-94c1-4c4a-8140-4f2bbbcefde4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Sourcing environment variables on node

2017-11-02 Thread Christoph Ruepprich
Hi all,
on a remote node I have a file that exports some variables:
$ cat myenv
export FOO=Hello
export BAR=World

My pipeline script tries to source that file, but the variables don't seem 
to stick:
node ('remote-server') {
sh ('. /home/cmr/myenv')
echo "My Variables: ${env.FOO} ${env.BAR}"
}

Output:

[set-remote-env] Running shell script
+ . /home/cmr/myenv
++ export FOO=Hello
++ FOO=Hello
++ export BAR=World
++ BAR=World[Pipeline] echoMy Variables: null null



When I source directly from the server's command prompt, the variables 
stick:
$ . myenv
$ echo "My Variables: $FOO $BAR"
My Variables: Hello World
$




How can I source environment variables in my pipeline script?

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/2bfd3d27-2fe7-4e49-9e9c-a7edaf416e60%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: the older builds for windows and mac

2017-11-02 Thread Daniel Beck

> On 31. Oct 2017, at 13:46, Masaru Tsuchiyama  wrote:
> 
> Could you make the older builds for them available?

See http://mirrors.jenkins-ci.org/ for the list.

-- 
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/4630BA36-E5FC-4FDB-8BD8-A62E99829E06%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: github enterprise self signed certs

2017-11-02 Thread Tobias Breuer
Hi,

I'm currently running into the same issue. Did you find any answer to this 
yet?

Am Freitag, 10. Februar 2017 20:26:21 UTC+1 schrieb Ryan Golhar:
>
> Hi all - I'm trying to set up Jenkins with our enterprise github install. 
>  We're using https with self-signed certificates.   I've added the CA PEM 
> to /etc/pki/tls/certs/ca-bundle.crt, and can verify this works by using 
> 'curl https://our.enterprise.github.com/api/v3/'
>
> Now, in Jenkins -> Manage Jenkins, under 'GitHub Enterprise Servers', I 
> enter the same API endpoint but get the message "The endpoint does not look 
> like a GitHub Enterprise (verify network and/or try again later)".  My 
> Jenkins log file shows:
> Feb 10, 2017 7:18:57 PM 
> org.jenkinsci.plugins.github_branch_source.Endpoint$DesciptorImpl 
> doCheckApiUri
> WARNING: Server returned HTTP response code: -1, message: 'null' for URL: 
> https://our.enterprise.github.com/api/v3/
>
> I'm not really sure how to proceed as this point.   Has anyone run into 
> this before?   
>
>

-- 
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/9b118db6-4494-4ff9-91ef-860411231a1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using the same label multiple times in pipeline

2017-11-02 Thread Andreas Tscharner

On 30.10.2017 03:50, Daniel Becroft wrote:

Hi,
I'm experimenting with the scripted pipeline, and have a question about 
the use of node('') with a label. If I have the following scenario:


node('A') { }
node('B') { }
node('A') { // Which node will be used here? }

Is there any guarantee that the second node() step for "A" will hit the 
same slave as the first one, or will it use whichever slave is now 
available? I'd like for the first node() to allocate one from the pool 
of slaves with the label of "A", but then the second one to somehow 
reuse the first one (there might be some cleanup tasks, etc that need to 
happen on the original node).


I would try something like this:

node('A') {
  ...
  ...
  node('B') {
...
...
  }
  ...
  ...
}

HTH and best regards
Andreas
--
Andreas Tscharner sternenfe...@gmail.com

Gordon's Law:
If you think you have the solution, the question was poorly phrased.

--
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/2ca95dc7-20f3-385e-bf87-c88ddef5%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is there a way of cloning the repo an additional layer down?

2017-11-02 Thread itchymuzzle
Helpful, as always, thanks.  I will take a look at that.

-- 
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/683f7e48-f3a2-4bb2-84b7-72148d5d43bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CI/CD Jenkins for Non Java projects

2017-11-02 Thread itchymuzzle


#! /usr/bin/env groovy
pipeline {
agent any
parameters {
string(name: 'Version', defaultValue: '2.3.0', description: 'What 
is the release version?')
}
stages {
stage('Build') {
steps {
sh 'unix command(s) to build'
}
}

stage('Deploy') {
steps {
sh 'unix command(s) to deploy'
}
}

  }

}

-- 
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/641ee79e-431c-4852-b37c-0848f04a860c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Disable log in runtime

2017-11-02 Thread Marcin Matuła


> Is any way to provide my own listener with empty implementation
>
 in the runtime 


W dniu czwartek, 2 listopada 2017 12:08:29 UTC+1 użytkownik Marcin Matuła 
napisał:
>
> Hi, 
>
> print method in Cause.java class:
>
> private void print(TaskListener listener, int depth) {
> indent(listener, depth); 
> listener.getLogger().println(
> Messages.Cause_UpstreamCause_ShortDescription(
> ModelHyperlinkNote.encodeTo('/' + upstreamUrl, upstreamProject
> ),
> ModelHyperlinkNote.encodeTo('/'+upstreamUrl+upstreamBuild, 
> Integer.toString(upstreamBuild)))
> );
> if (upstreamCauses != null && !upstreamCauses.isEmpty()) {
> indent(listener, depth); 
> listener.getLogger().println(Messages.Cause_UpstreamCause_CausedBy
> ());
> for (Cause cause : upstreamCauses) {
> if (cause instanceof UpstreamCause) {
> ((UpstreamCause) cause).print(listener, depth + 1);
> } else {
> indent(listener, depth + 1);
> cause.print(listener);
> }
> }   
> }
> }
>
>
> produces too long log in my configuration (too much upstream projects).
>
> How this log can be disabled? Is any way to provide my own listener with 
> empty implementation?
> Any other way?
>
> Br,
> Marcin
>
>

-- 
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/a2f2b311-fccf-4e7d-9d65-c5ae984440d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Disable log in runtime

2017-11-02 Thread Marcin Matuła
Hi, 

print method in Cause.java class:

private void print(TaskListener listener, int depth) {
indent(listener, depth); 
listener.getLogger().println(
Messages.Cause_UpstreamCause_ShortDescription(
ModelHyperlinkNote.encodeTo('/' + upstreamUrl, upstreamProject),
ModelHyperlinkNote.encodeTo('/'+upstreamUrl+upstreamBuild, 
Integer.toString(upstreamBuild)))
);
if (upstreamCauses != null && !upstreamCauses.isEmpty()) {
indent(listener, depth); 
listener.getLogger().println(Messages.Cause_UpstreamCause_CausedBy
());
for (Cause cause : upstreamCauses) {
if (cause instanceof UpstreamCause) {
((UpstreamCause) cause).print(listener, depth + 1);
} else {
indent(listener, depth + 1);
cause.print(listener);
}
}   
}
}


produces too long log in my configuration (too much upstream projects).

How this log can be disabled? Is any way to provide my own listener with 
empty implementation?
Any other way?

Br,
Marcin

-- 
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/d328ef89-d4b7-40ef-a1a4-c13719ec7381%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.