Re: Parameterized option in multibranch pipeline job

2017-06-28 Thread Lee Meador
Since the multibranch pipeline job creates sub-jobs for each branch, there
is no place to set the options for those generated jobs except the
Jenkinsfile.

Jenkins creates the sub-jobs when the multibranch pipeline job runs (on its
schedule or whatever as configured). It starts any new ones building right
away and the properties step at the top of the Jenkins file will then set
the options on the generated job.

If you change the Jenkinsfile properties step to have different options, it
will only apply after the sub-job builds once. This applies to each
branch's sub-job independently.

You can view some of the options that the properties step can set by
clicking "View Configuration" on the sub-job for a particular branch. But
there are many more things that get set.

If you go to this page
https://jenkins.io/doc/pipeline/steps/workflow-multibranch/ but, unless you
are a better puzzle solver than me, you will be unable to read the list of
optional things you can put in that list that serves as the single
parameter to the pipeline step. Its huge.

When the properties step runs, it also clears away any existing properties
on the sub-job before setting the ones specified in the list. Not all of
the things it clears are visible on that "View Configuration" page.

On Fri, Jun 23, 2017 at 8:49 PM, ajith arthur 
wrote:

> Hi Guys,
>
>
>
> I have a Jenkins multibranch pipeline job, which always configure build
> without parameter at branch initialization, but I need to configure the
> branches as build with parameter.
>
>
>
> We can use *properties* to configure the parameters in a Jenkinsfile, but
> my question is how to configure parameterized option in Jenkins multibranch
> pipeline project from website, not from Jenkinsfile?
>
>
>
> Please refer the below report for further details.
>
>
>
> https://issues.jenkins-ci.org/browse/JENKINS-45102
>
>
>
> Regards,
>
> Ajith R
>
> --
> 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/7432e9e5-a3c1-4418-8141-4609cd7dfa6b%40googlegroups.
> com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.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/CAA4vtDSsVswxpaaJbM%3DgKs6B21q_nUpMSsqb3oWQHOogXd_80g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Global groovy shared library (package), having two classes, import B from A

2017-06-28 Thread Martin Holeček
Hello!

Please, which is the correct way to use a class defined in another file in 
the same package?

I tried all the ways I could, but Iam getting "unexpected token: a @ line 
... column ".

Does the upper/lower case in file names (mmethodi.groovy/MMethodI.groovy) 
play a role?



File #1 - mmethodi.groovy: (just definitions of mmethodi)

package org.medicalc; public class mmethodi implements java.io.Serializable 
...

File #2 - MBuildItem.groovy: (needs to use mmethodi)

package org.medicalc; import org.medicalc.mmethodi; import org.medicalc.*; 
public class MBuildItem implements java.io.Serializable
{
mmethodi xmeth;
...

Thanks!
Martin

-- 
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/3fd0cf8e-2e1d-4a1a-b93b-b88a508fa19a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Error in build triggered by creating new tag in GitHub

2017-06-28 Thread Danny Sinang
Hi,

I have a Jenkins job that gets triggered by creating a new release or tag
in GitHub. It is configured like this :

refspec : +refs/tags/*:refs/remotes/origin/tags/*

branch specifier : */refs/tags/*


My problem is, the build it triggers fails with this error message :

Wiping out workspace first.

Cloning the remote Git repository

Cloning repository g...@github.com:MMS/ml-jw-api-lib.git

 > git init /var/lib/jenkins/workspace/ML/JWATCH/deploy-ml-jw-api-lib
# timeout=10

Fetching upstream changes from g...@github.com:MMS/ml-jw-api-lib.git

 > git --version # timeout=10

 > git fetch --tags --progress g...@github.com:MMS/ml-jw-api-lib.git
+refs/heads/*:refs/remotes/origin/*

 > git config remote.origin.url g...@github.com:MMS/ml-jw-api-lib.git #
timeout=10

 > git config --add remote.origin.fetch
+refs/heads/*:refs/remotes/origin/* # timeout=10

 > git config remote.origin.url g...@github.com:MMS/ml-jw-api-lib.git #
timeout=10

Fetching upstream changes from g...@github.com:MMS/ml-jw-api-lib.git

 > git fetch --tags --progress g...@github.com:MMS/ml-jw-api-lib.git
+refs/tags/*:refs/remotes/origin/tags/*

...


Seen branch in repository origin/tags/v9

Seen 57 remote branches

 > git tag -l # timeout=10


...

 > git rev-parse refs/tags/v4^{commit} # timeout=10

 > git rev-parse refs/tags/v5^{commit} # timeout=10

ERROR: Couldn't find any revision to build. Verify the repository and
branch configuration for this job.

[WS-CLEANUP] Deleting project workspace...[WS-CLEANUP] done
Finished: FAILURE


Any idea on how to fix this ?

Am running Jenkins 2.46.2 .

Regards, Danny

-- 
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/CAPKs-UJq-tFQiWtWyM6%3DWXoeWXfbc2iV%3DQr2Mhquv4SnjNgQag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Git plugin issue in pipeline

2017-06-28 Thread Michael Pailloncy
Can you try with something like that inside your Jenkinsfile :

node {
deleteDir()
checkout scm
}

Jenkins seems to be already able to retrieve your Jenkinsfile, so you don't
need to give all SCM details inside it, see
https://jenkins.io/doc/book/pipeline/jenkinsfile/#creating-a-jenkinsfile

2017-06-27 23:22 GMT+02:00 Abhijith Reddy :

> Whenever i specify a branch with GitSCM i see the following issue
> Couldn't find any revision to build. Verify the repository and branch
> configuration for this job.
>
> Here's my Jenkinsfile
>
> node {
>
> deleteDir()
> checkout([$class: 'GitSCM', branches: [[name: 'feature/my-branch]],
> doGenerateSubmoduleConfigurations: false, extensions: [[$class:
> 'CleanBeforeCheckout'],[$class: 'PruneStaleBranch']], submoduleCfg: [],
> userRemoteConfigs: [[credentialsId: 'aaa-aaa-aaa-aaa', url: GIT_URL]]])
> }
>
>
> and here is the error
>
>
> Checking out git ssh://g...@stash.com:7999/capt/jenkins-pipelines.git to
> read Jenkinsfile-pull-request
> Wiping out workspace first.
> Cloning the remote Git repository
> Cloning repository ssh://g...@stash.com:7999/capt/jenkins-pipelines.git
>  > git init /var/lib/jenkins/workspace/API/merchant-profile-and-
> preferences/pr-pipeline@script # timeout=10
> Fetching upstream changes from ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git
>  > git --version # timeout=10
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git +refs/heads/*:refs/remotes/origin/*
>  > git config remote.origin.url ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git # timeout=10
>  > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
> # timeout=10
>  > git config remote.origin.url ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git # timeout=10
> Fetching upstream changes from ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://g...@stash.com:7999/capt/
> jenkins-pipelines.git +refs/heads/*:refs/remotes/origin/*
>  > git rev-parse origin/develop^{commit} # timeout=10
> Checking out Revision 81cbf859af08d159c8c3a89cb796b4b1b536
> (origin/develop)
>  > git config core.sparsecheckout # timeout=10
>  > git checkout -f 81cbf859af08d159c8c3a89cb796b4b1b536
>  > git rev-list 571b6661262fa11ce2e1088338c1f19cd1a5110d # timeout=10
> First time build. Skipping changelog.
> [Pipeline] node
> Running on q7bld02 in /var/lib/jenkins/workspace/API/merchant-profile-and-
> preferences/pr-pipeline
> [Pipeline] {
> [Pipeline] deleteDir
> [Pipeline] checkout
> Cloning the remote Git repository
> Cloning repository ssh://g...@stash.com:7999/api/mpp.git
>  > git init 
> /var/lib/jenkins/workspace/API/merchant-profile-and-preferences/pr-pipeline
> # timeout=10
> Fetching upstream changes from ssh://g...@stash.com:7999/api/mpp.git
>  > git --version # timeout=10
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://g...@stash.com:7999/api/mpp.git
> +refs/heads/*:refs/remotes/origin/*
>  > git config remote.origin.url ssh://g...@stash.com:7999/api/mpp.git #
> timeout=10
>  > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
> # timeout=10
>  > git config remote.origin.url ssh://g...@stash.com:7999/api/mpp.git #
> timeout=10
> Cleaning workspace
>  > git rev-parse --verify HEAD # timeout=10
> No valid HEAD. Skipping the resetting
>  > git clean -fdx # timeout=10
> Pruning obsolete local branches
> Fetching upstream changes from ssh://g...@stash.com:7999/api/mpp.git
> using GIT_SSH to set credentials automated repo access
>  > git fetch --tags --progress ssh://g...@stash.com:7999/api/mpp.git
> +refs/heads/*:refs/remotes/origin/* --prune
>  > git rev-parse feature/XMEN-512-dup​licate-contact-clean​up^{commit} #
> timeout=10
>  > git rev-parse 
> refs/remotes/origin/feature/XMEN-512-dup​licate-contact-clean​up^{commit}
> # timeout=10
>  > git rev-parse feature/XMEN-512-dup​licate-contact-clean​up^{commit} #
> timeout=10
> [Pipeline] }
> [Pipeline] // node
> [Pipeline] End of Pipeline
> ERROR: Couldn't find any revision to build. Verify the repository and
> branch configuration for this job.
> Finished: FAILURE
>
>
> --
> 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/a6a95098-8538-44ac-98ee-22b10e27c223%40googlegroups.
> com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed 

Re: ${CHANGES,showDependencies="true"} not working?

2017-06-28 Thread Slide
Looking at [1] it does not look like token-macro is a dependency, so it
definitely does not. I'm not aware of another plugin that does what you
want. You might be able to use a script plugin to do it.

1 - https://wiki.jenkins.io/display/JENKINS/Text+File+Operations+Plugin

On Wed, Jun 28, 2017 at 1:31 PM John Lussmyer 
wrote:

> On Wednesday, June 28, 2017 at 1:22:26 PM UTC-7, slide wrote:
>>
>> BUILD_NUMBER is an environment variable, CHANGES is a token macro. Does
>> the text-file-operations plugin use the token macro plugin to replace
>> things?
>>
>
> Can't tell from the description if it uses the Token Macro Plugin or not.
> Sigh, probably doesn't then.
>
> Any suggestions for other techniques to get that information into a simple
> text file?
>
> --
> 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/cf181478-a3ab-4a56-b419-2ad169a08117%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/CAPiUgVcvJEicL6f3dgTSCY%2BtJKQXUobk-BFUKG%3Dnw6fpyN0K%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Exception being thrown when trying to create/modify/delete Freestyle Project

2017-06-28 Thread Stephen B
Greetings,

I’m running Jenkins 2.7.3 LTS. I’m trying to create a freestyle project 
however, when I go to save, copy, modify, or delete the freestyle project I 
get an exception thrown and can’t seem to track down what is causing the 
issue. The freestyle project only runs a shell script. 

Here are the plugins and their respective versions that I have installed:

   - Authentication Tokens API Plugin: 1.3
   - Autofavorite for Blue Ocean: 1.0.0
   - Blue Ocean: 1.0.1
   - Blue Ocean Pipeline Editor: 0.2.0
   - BlueOcean Display URL plugin: 2.0
   - bouncycastle API Plugin: 2.16.1
   - Branch API Plugin: 2.0.10
   - Common API for Blue Ocean: 1.1.2
   - Config API for Blue Ocean: 1.1.2
   - Config File Provider Plugin: 2.15.7
   - Copy To Slave Plugin: 1.4.4
   - Credentials Binding Plugin: 1.12
   - Dashboard for Blue Ocean: 1.1.2
   - Display URL API: 2.0
   - Docker Commons Plugin: 1.7
   - Docker Pipeline: 1.12
   - Durable Task Plugin: 1.14
   - Favorite: 2.3.0
   - Folders Plugin: 6.0.4
   - Git client plugin: 2.4.6
   - Git Pipeline for Blue Ocean: 1.1.2
   - Git plugin: 3.3.0
   - GIT server Plugin: 1.7
   - GitHub API Plugin: 1.85.1
   - GitHub Authentication plugin: 0.26
   - GitHub Branch Source Plugin: 2.0.6
   - GitHub Organization Folder Plugin: 1.6
   - GitHub Pipeline for Blue Ocean: 1.1.2
   - GitHub plugin: 1.27.0
   - GitHub Pull Request Builder: 1.35.0
   - Groovy: 2.0
   - I18n for Blue Ocean: 1.1.2
   - Icon Shim Plugin: 2.0.3
   - Jackson 2 API Plugin: 2.7.3
   - JavaScript GUI Lib: ACE Editor bundle plugin: 1.1
   - JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin: 1.2.1
   - Job DSL: 1.58
   - JUnit Plugin: 1.20
   - JWT for Blue Ocean: 1.1.2
   - Mailer Plugin: 1.20
   - Matrix Project Plugin: 1.11
   - mesos: 0.13.1
   - Metrics Plugin: 3.1.2.10
   - Personalization for Blue Ocean: 1.1.2
   - Pipeline Graph Analysis Plugin: 1.4
   - Pipeline implementation for Blue Ocean: 1.1.2
   - Pipeline SCM API for Blue Ocean: 1.1.2
   - Pipeline: API: 2.17
   - Pipeline: Basic Steps: 2.5
   - Pipeline: Declarative Agent API: 1.1.1
   - Pipeline: Declarative Extension Points API: 1.1.6
   - Pipeline: GitHub Groovy Libraries: 1.0
   - Pipeline: Groovy: 2.36
   - Pipeline: Input Step: 2.1
   - Pipeline: Job: 2.10
   - Pipeline: Model API: 1.1.6
   - Pipeline: Model Definition: 1.1.6
   - Pipeline: Multibranch: 2.15
   - Pipeline: Nodes and Processes: 2.12
   - Pipeline: SCM Step: 2.5
   - Pipeline: Shared Groovy Libraries: 2.8
   - Pipeline: Stage Step: 2.2
   - Pipeline: Stage Tags Metadata: 1.1.6
   - Pipeline: Step API: 2.11
   - Pipeline: Supporting APIs: 2.14
   - Plain Credentials Plugin: 1.4
   - Pub-Sub “light” Bus: 1.8
   - rbenv plugin: 0.0.17
   - REST API for Blue Ocean: 1.1.2
   - REST Implementation for Blue Ocean: 1.1.2
   - ruby-runtime: 0.12
   - SCM API Plugin: 2.1.1
   - Script Security Plugin: 1.29
   - SSH Agent Plugin: 1.15
   - SSH Credentials Plugin: 1.13
   - Structs Plugin: 1.8
   - Timestamper: 1.8.8
   - Token Macro Plugin: 2.1
   - Variant Plugin: 1.1
   - Web for Blue Ocean: 1.1.2

I have attached the stacktrace. 

-- 
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/a2f83abf-27da-458d-b406-52333b82be75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
javax.servlet.ServletException: java.lang.NoSuchFieldError: INSTANCE
  at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
  at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
  at 
org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
  at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
  at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
  at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
  at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
  at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
  at 
org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
  at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
  at 
io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
  at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
  at 
io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:51)
  at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
  at 

Re: ${CHANGES,showDependencies="true"} not working?

2017-06-28 Thread John Lussmyer
On Wednesday, June 28, 2017 at 1:22:26 PM UTC-7, slide wrote:
>
> BUILD_NUMBER is an environment variable, CHANGES is a token macro. Does 
> the text-file-operations plugin use the token macro plugin to replace 
> things?
>

Can't tell from the description if it uses the Token Macro Plugin or not.
Sigh, probably doesn't then.

Any suggestions for other techniques to get that information into a simple 
text file?

-- 
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/cf181478-a3ab-4a56-b419-2ad169a08117%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Exception being thrown when trying to create/modify/delete Freestyle Jobs

2017-06-28 Thread Stephen B
Greetings,
I’m running Jenkins 2.7.3 LTS. I’m trying to create a freestyle project 
however, when I go to save, copy, modify, or delete the freestyle project I 
get an exception thrown and can’t seem to track down what is causing the 
issue.  The freestyle project I am trying to create is nothing fancy.  It 
simply runs a bash script that echoes out a message. 

Here are the plugins and their respective versions that I have installed:

   - Authentication Tokens API Plugin: 1.3
   - Autofavorite for Blue Ocean: 1.0.0
   - Blue Ocean: 1.0.1
   - Blue Ocean Pipeline Editor: 0.2.0
   - BlueOcean Display URL plugin: 2.0
   - bouncycastle API Plugin: 2.16.1
   - Branch API Plugin: 2.0.10
   - Common API for Blue Ocean: 1.1.2
   - Config API for Blue Ocean: 1.1.2
   - Config File Provider Plugin: 2.15.7
   - Copy To Slave Plugin: 1.4.4
   - Credentials Binding Plugin: 1.12
   - Dashboard for Blue Ocean: 1.1.2
   - Display URL API: 2.0
   - Docker Commons Plugin: 1.7
   - Docker Pipeline: 1.12
   - Durable Task Plugin: 1.14
   - Favorite: 2.3.0
   - Folders Plugin: 6.0.4
   - Git client plugin: 2.4.6
   - Git Pipeline for Blue Ocean: 1.1.2
   - Git plugin: 3.3.0
   - GIT server Plugin: 1.7
   - GitHub API Plugin: 1.85.1
   - GitHub Authentication plugin: 0.26
   - GitHub Branch Source Plugin: 2.0.6
   - GitHub Organization Folder Plugin: 1.6
   - GitHub Pipeline for Blue Ocean: 1.1.2
   - GitHub plugin: 1.27.0
   - GitHub Pull Request Builder: 1.35.0
   - Groovy: 2.0
   - I18n for Blue Ocean: 1.1.2
   - Icon Shim Plugin: 2.0.3
   - Jackson 2 API Plugin: 2.7.3
   - JavaScript GUI Lib: ACE Editor bundle plugin: 1.1
   - JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin: 1.2.1
   - Job DSL: 1.58
   - JUnit Plugin: 1.20
   - JWT for Blue Ocean: 1.1.2
   - Mailer Plugin: 1.20
   - Matrix Project Plugin: 1.11
   - mesos: 0.13.1
   - Metrics Plugin: 3.1.2.10
   - Personalization for Blue Ocean: 1.1.2
   - Pipeline Graph Analysis Plugin: 1.4
   - Pipeline implementation for Blue Ocean: 1.1.2
   - Pipeline SCM API for Blue Ocean: 1.1.2
   - Pipeline: API: 2.17
   - Pipeline: Basic Steps: 2.5
   - Pipeline: Declarative Agent API: 1.1.1
   - Pipeline: Declarative Extension Points API: 1.1.6
   - Pipeline: GitHub Groovy Libraries: 1.0
   - Pipeline: Groovy: 2.36
   - Pipeline: Input Step: 2.1
   - Pipeline: Job: 2.10
   - Pipeline: Model API: 1.1.6
   - Pipeline: Model Definition: 1.1.6
   - Pipeline: Multibranch: 2.15
   - Pipeline: Nodes and Processes: 2.12
   - Pipeline: SCM Step: 2.5
   - Pipeline: Shared Groovy Libraries: 2.8
   - Pipeline: Stage Step: 2.2
   - Pipeline: Stage Tags Metadata: 1.1.6
   - Pipeline: Step API: 2.11
   - Pipeline: Supporting APIs: 2.14
   - Plain Credentials Plugin: 1.4
   - Pub-Sub “light” Bus: 1.8
   - rbenv plugin: 0.0.17
   - REST API for Blue Ocean: 1.1.2
   - REST Implementation for Blue Ocean: 1.1.2
   - ruby-runtime: 0.12
   - SCM API Plugin: 2.1.1
   - Script Security Plugin: 1.29
   - SSH Agent Plugin: 1.15
   - SSH Credentials Plugin: 1.13
   - Structs Plugin: 1.8
   - Timestamper: 1.8.8
   - Token Macro Plugin: 2.1
   - Variant Plugin: 1.1
   - Web for Blue Ocean: 1.1.2

I have attached the stacktrace. 

-- 
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/f7e5f4ab-cdfc-482c-b1e7-5574ec8ed503%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
javax.servlet.ServletException: java.lang.NoSuchFieldError: INSTANCE
  at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
  at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
  at 
org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
  at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
  at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
  at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
  at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
  at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
  at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
  at 
org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
  at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
  at 
io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
  at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
  at 
io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:51)
  at 

Re: ${CHANGES,showDependencies="true"} not working?

2017-06-28 Thread Slide
BUILD_NUMBER is an environment variable, CHANGES is a token macro. Does the
text-file-operations plugin use the token macro plugin to replace things?

On Wed, Jun 28, 2017 at 1:20 PM John Lussmyer 
wrote:

> Im trying to use the text-file-operations plugin to create a file that has
> the changes for the current build.
> I've added the build step (Create/Update Text file) and set the content of
> the file to be:
> Build: ${BUILD_NUMBER}
> ${CHANGES,showDependencies="true"}
> -
>
>
> The file gets created, the ${BUILD_NUMBER} gets properly substituted, but
> the CHANGES does not.
> Any suggestions on what to change/try next?
>
> --
> 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/74e48663-b163-4212-9665-4cffd87933ce%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/CAPiUgVfV0MUTsEUkZUhuA3__FRZCYTt9bL4EKVGOWD%2BkLjGRRg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


${CHANGES,showDependencies="true"} not working?

2017-06-28 Thread John Lussmyer
Im trying to use the text-file-operations plugin to create a file that has 
the changes for the current build.
I've added the build step (Create/Update Text file) and set the content of 
the file to be:
Build: ${BUILD_NUMBER}
${CHANGES,showDependencies="true"}
-


The file gets created, the ${BUILD_NUMBER} gets properly substituted, but 
the CHANGES does not.
Any suggestions on what to change/try next?

-- 
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/74e48663-b163-4212-9665-4cffd87933ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins slave path for workspace

2017-06-28 Thread Daniel Beck

> On 19. Jun 2017, at 18:20, Terry O'Leary  wrote:
> 
> I can run them on the Master with no issues since the path 
> (c:\env\jenkins\jobs\JOBNAME\workspace) is the same. However, when I attempt 
> to run the same jobs on the slave nodes, the paths 
> (c:\env\jenkins\workspace\JOBNAME\) change.

it's unclear why what you describe is a problem. This looks like the sort of 
issue encountered when doing something typically considered wrong, such as 
relying on persistent, externally provided data in the job workspace.

-- 
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/893B6EF6-C7E9-49F0-A91E-7D697283FA57%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: Why doesn't Jenkins Update Center show certain plugins?

2017-06-28 Thread John Lussmyer
Jenkins 1.616, and no, the plugin was not already installed.
I finally figured out which link on the page could be used to download the 
plugin, and used the Advanced tab to manually install the plugin.

-- 
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/658be192-60bd-4a23-b150-d923a36738c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why doesn't Jenkins Update Center show certain plugins?

2017-06-28 Thread Daniel Beck

> On 28. Jun 2017, at 18:29, John Lussmyer  wrote:
> 
> When I go to the Jenkins Update Center page, and click on the "Available" 
> tab, that plugin isn't listed.

Are you using at least Jenkins 1.580.1? Is the plugin not already installed?

-- 
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/E998B255-BE0D-4CE7-9291-14BF980C61D6%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: jenkins login slow

2017-06-28 Thread Daniel Beck

> On 28. Jun 2017, at 12:04, Howard Yang  wrote:
> 
> How can I debug this login process or optimize this problem ?

https://wiki.jenkins-ci.org/display/JENKINS/Obtaining+a+thread+dump will tell 
you what Jenkins is busy doing.

-- 
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/71C21459-9CA8-4BE2-986B-36289CC0572F%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins throwing NPE on build.

2017-06-28 Thread ascarborough
Also, there were these:

27-Jun-2017 11:09:03.700 SEVERE [pool-6-thread-3] 
jenkins.InitReactorRunner$1.onTaskFailed Failed Loading plugin Pipeline: 
Supporting APIs v2.11 (workflow-support)
 java.io.IOException: Pipeline: Supporting APIs v2.11 failed to load.
 - Script Security Plugin v1.13 is older than required. To fix, install 
v1.21 or later.
at 
hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:621)
at hudson.PluginManager$2$1$1.run(PluginManager.java:517)
at 
org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:1064)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

27-Jun-2017 11:09:03.701 SEVERE [pool-6-thread-5] 
jenkins.InitReactorRunner$1.onTaskFailed Failed Loading plugin Pipeline: 
Job v2.9 (workflow-job)
 java.io.IOException: Pipeline: Job v2.9 failed to load.
 - Pipeline: Supporting APIs v2.11 failed to load. Fix this plugin first.
at 
hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:621)
at hudson.PluginManager$2$1$1.run(PluginManager.java:517)
at 
org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:1064)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

27-Jun-2017 11:09:03.702 SEVERE [pool-6-thread-5] 
jenkins.InitReactorRunner$1.onTaskFailed Failed Loading plugin Pipeline: 
Groovy v2.23 (workflow-cps)
 java.io.IOException: Pipeline: Groovy v2.23 failed to load.
 - Pipeline: Supporting APIs v2.11 failed to load. Fix this plugin first.
at 
hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:621)
at hudson.PluginManager$2$1$1.run(PluginManager.java:517)
at 
org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:1064)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

27-Jun-2017 11:09:03.702 SEVERE [pool-6-thread-5] 
jenkins.InitReactorRunner$1.onTaskFailed Failed Loading plugin Pipeline: 
Multibranch v2.9.2 (workflow-multibranch)
 java.io.IOException: Pipeline: Multibranch v2.9.2 failed to load.
 - Script Security Plugin v1.13 is older than required. To fix, install 
v1.23 or later.
 - Pipeline: Job v2.9 failed to load. Fix this plugin first.
at 
hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:621)
at hudson.PluginManager$2$1$1.run(PluginManager.java:517)
at 
org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:1064)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

27-Jun-2017 11:09:03.706 SEVERE [pool-6-thread-6] 
jenkins.InitReactorRunner$1.onTaskFailed Failed Loading plugin Pipeline: 
Input Step v2.5 (pipeline-input-step)
 java.io.IOException: Pipeline: Input Step v2.5 failed to load.
 - Pipeline: Supporting APIs v2.11 failed to load. Fix this plugin first.
at 
hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:621)
at hudson.PluginManager$2$1$1.run(PluginManager.java:517)
at 
org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:1064)
at 

Loading Pipeline Library from either Git branch or tag

2017-06-28 Thread Łukasz Zachulski
Is it possible to specify branch for Pipeline Library in such a way that it 
would allow override default @Library version with either Git tag or branch?


So far I have tried different wildcard combinations, 
refs/*/${library.Global.version}, but none of them works. 

Instead if I stop using wildcards and specify expression with only 
environment variable, refs/${library.Global.version},  it works. However it 
then forces me to specify library version with either tags or heads prefix, 
ex. @Library('Global@heads/version/1.0,') or @Library('Global@tags/1.0.0'). 


Is a way to end up with shorter notation like @Library('Global@version/1.0') 
or @Library('Global@1.0.0')?

Regards,
Lukasz.

-- 
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/19955706-819c-427b-a35d-65e892a08e63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can I get inject environment from a freestyle job in pipeline job

2017-06-28 Thread Stanley Shen
Thanks, I didn’t notice the “Use Groovy sandbox”, and it works after I 
unchecked it.

println job.getRawBuild().getEnvironment()[“uuid"]
println 
Jenkins.instance.getItemByFullName(“test").getAllJobs()[0].getLastSuccessfulBuild().getEnvironment()["uuid"]

Both work for me.


Regards,
Stanley





> On Jun 29, 2017, at 1:24 AM, Richard Ginga  wrote:
> 
> #1. try unclicking "Use Groovy sandbox" at the bottom of the script window.
> 
> #1 and #2 could be you don't have permissions. I am an admin of my jenkins 
> master
> 
> 
> On Wed, Jun 28, 2017 at 1:13 PM, Stanley Shen  > wrote:
> Thanks for replying.
> 
> I tried solution #1 you provided, but it report error like 
> "org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: 
> Scripts not permitted to use method”
> 
> For #2, it also report error like 
> “org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: 
> Scripts not permitted to use staticMethod jenkins.model.Jenkins getInstance”
> 
> 
> Any idea on it.
> 
> 
> Regards,
> Stanley
> 
> 
> 
> 
> 
> 
>> On Jun 28, 2017, at 8:04 PM, Richard Ginga > > wrote:
>> 
>> The things you "can" get from the returned object (c) from a pipeline 
>> statement like: c = build job: "test job1" are here: 
>> 
>> https://github.com/jenkinsci/workflow-support-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.java
>>  
>> 
>> 
>> you might be able to do something with the non-whitelisted getRawBuild 
>> method.
>> 
>> Otherwise, to get that job's env variables you must do something "like" 
>> this: (untested)
>> 
>> Jenkins.instance.getItemByFullName("test 
>> job1").getAllJobs()[0].getLastSuccessfulBuild().getEnv("uuid")
>> 
>> On Tue, Jun 27, 2017 at 9:21 PM, > > wrote:
>> Hello, all
>> 
>> I am trying to trigger a freestyle job in pipeline and need to get a inject 
>> environment from that job.
>> Before with flow job, we can use thing like 
>> 
>> c = build("test job1")
>> uuid = c.build.properties["environment"]["uuid"]
>> 
>> But I didn't find a way to do this similar in pipeline script.
>> 
>> Is there any hint on it?
>> 
>> 
>> -- 
>> 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/fa73e7a7-ea85-4eee-8f8e-037689bff630%40googlegroups.com
>>  
>> .
>> For more options, visit https://groups.google.com/d/optout 
>> .
>> 
>> 
>> 
>> -- 
>> Dick Ginga
>> Build Engineer
>> rgi...@disruptorbeam.com 
>> 
>> 
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Jenkins Users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/jenkinsci-users/ouDKTknbt7k/unsubscribe 
>> .
>> To unsubscribe from this group and all its topics, 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/CAL3PpaVGzRL2j_rNYAhAsSPxw2F8gpotuLhpZiA3DOjkYXgDUw%40mail.gmail.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/50176E3F-E26F-413E-A4E3-E69195EE0021%40servicemax.com
>  
> .
> 
> For more options, visit https://groups.google.com/d/optout 
> .
> 
> 
> 
> -- 
> Dick Ginga
> 

Re: How can I get inject environment from a freestyle job in pipeline job

2017-06-28 Thread Richard Ginga
#1. try unclicking "Use Groovy sandbox" at the bottom of the script window.

#1 and #2 could be you don't have permissions. I am an admin of my jenkins
master


On Wed, Jun 28, 2017 at 1:13 PM, Stanley Shen 
wrote:

> Thanks for replying.
>
> I tried solution #1 you provided, but it report error like
> "org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException:
> Scripts not permitted to use method”
>
> For #2, it also report error like “org.jenkinsci.plugins.
> scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to
> use staticMethod jenkins.model.Jenkins getInstance”
>
>
> Any idea on it.
>
>
> Regards,
> Stanley
>
>
>
>
>
>
> On Jun 28, 2017, at 8:04 PM, Richard Ginga 
> wrote:
>
> The things you "can" get from the returned object (c) from a pipeline
> statement like: c = build job: "test job1" are here:
>
> https://github.com/jenkinsci/workflow-support-plugin/blob/
> master/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/
> RunWrapper.java
>
> you might be able to do something with the non-whitelisted getRawBuild
> method.
>
> Otherwise, to get that job's env variables you must do something "like"
> this: (untested)
>
> Jenkins.instance.getItemByFullName("test job1").getAllJobs()[0].
> getLastSuccessfulBuild().getEnv("uuid")
>
> On Tue, Jun 27, 2017 at 9:21 PM,  wrote:
>
>> Hello, all
>>
>> I am trying to trigger a freestyle job in pipeline and need to get a
>> inject environment from that job.
>> Before with flow job, we can use thing like
>>
>> c = build("test job1")
>> uuid = c.build.properties["environment"]["uuid"]
>>
>> But I didn't find a way to do this similar in pipeline script.
>>
>> Is there any hint on it?
>>
>>
>> --
>> 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/ms
>> gid/jenkinsci-users/fa73e7a7-ea85-4eee-8f8e-037689bff630%
>> 40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Dick Ginga
> Build Engineer
> rgi...@disruptorbeam.com
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-users/ouDKTknbt7k/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAL3PpaVGzRL2j_rNYAhAsSPxw2F8gpotuLhpZiA3DOjk
> YXgDUw%40mail.gmail.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/50176E3F-E26F-413E-A4E3-
> E69195EE0021%40servicemax.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Dick Ginga
Build Engineer
rgi...@disruptorbeam.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/CAL3PpaV%2B6stTpw5P6HPftn9tgGrvKki%2Be%3DPYjxxDK%2BTGJM%2Bv4Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can I get inject environment from a freestyle job in pipeline job

2017-06-28 Thread Stanley Shen
Thanks for replying.

I tried solution #1 you provided, but it report error like 
"org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts 
not permitted to use method”

For #2, it also report error like 
“org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts 
not permitted to use staticMethod jenkins.model.Jenkins getInstance”


Any idea on it.


Regards,
Stanley






> On Jun 28, 2017, at 8:04 PM, Richard Ginga  wrote:
> 
> The things you "can" get from the returned object (c) from a pipeline 
> statement like: c = build job: "test job1" are here: 
> 
> https://github.com/jenkinsci/workflow-support-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.java
>  
> 
> 
> you might be able to do something with the non-whitelisted getRawBuild method.
> 
> Otherwise, to get that job's env variables you must do something "like" this: 
> (untested)
> 
> Jenkins.instance.getItemByFullName("test 
> job1").getAllJobs()[0].getLastSuccessfulBuild().getEnv("uuid")
> 
> On Tue, Jun 27, 2017 at 9:21 PM,  > wrote:
> Hello, all
> 
> I am trying to trigger a freestyle job in pipeline and need to get a inject 
> environment from that job.
> Before with flow job, we can use thing like 
> 
> c = build("test job1")
> uuid = c.build.properties["environment"]["uuid"]
> 
> But I didn't find a way to do this similar in pipeline script.
> 
> Is there any hint on it?
> 
> 
> -- 
> 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/fa73e7a7-ea85-4eee-8f8e-037689bff630%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .
> 
> 
> 
> -- 
> Dick Ginga
> Build Engineer
> rgi...@disruptorbeam.com 
> 
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/jenkinsci-users/ouDKTknbt7k/unsubscribe 
> .
> To unsubscribe from this group and all its topics, 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/CAL3PpaVGzRL2j_rNYAhAsSPxw2F8gpotuLhpZiA3DOjkYXgDUw%40mail.gmail.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/50176E3F-E26F-413E-A4E3-E69195EE0021%40servicemax.com.
For more options, visit https://groups.google.com/d/optout.


Use of Execute Windows batch command step to trigger google chrome(or in general any app that can be triggered from command prompt)

2017-06-28 Thread Zed Kay
Hi,

I have been trying to use the Execute Windows Batch Command  step (as I use 
Windows) in order to trigger a new chrome window from Jenkins. From what I 
knew, if a something could be triggered from the command line, it would 
work the same way from Jenkins. The command that I put in the command 
window (which works at the command prompt) is the following:
Enter code here..."c:\program files 
(x86)\google\chrome\application\chrome.exe" --new-window 
"http://localhost:8080:/debug?port=5858;

When i build the job, it builds successfully, but the result on the control 
output is the following:







Chrome is not triggered and I get this result. I have no idea what the 
message regarding the Elasticsearch service means. Any ideas on how this 
issue can be resolved? Thank you in advance for your time!



-- 
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/44cb8c31-eaf2-4afb-9332-409c23a1e6c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can I get inject environment from a freestyle job in pipeline job

2017-06-28 Thread Richard Ginga
The things you "can" get from the returned object (c) from a pipeline
statement like: c = build job: "test job1" are here:

https://github.com/jenkinsci/workflow-support-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.java

you might be able to do something with the non-whitelisted getRawBuild
method.

Otherwise, to get that job's env variables you must do something "like"
this: (untested)

Jenkins.instance.getItemByFullName("test
job1").getAllJobs()[0].getLastSuccessfulBuild().getEnv("uuid")

On Tue, Jun 27, 2017 at 9:21 PM,  wrote:

> Hello, all
>
> I am trying to trigger a freestyle job in pipeline and need to get a
> inject environment from that job.
> Before with flow job, we can use thing like
>
> c = build("test job1")
> uuid = c.build.properties["environment"]["uuid"]
>
> But I didn't find a way to do this similar in pipeline script.
>
> Is there any hint on it?
>
> --
> 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/fa73e7a7-ea85-4eee-8f8e-037689bff630%40googlegroups.
> com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Dick Ginga
Build Engineer
rgi...@disruptorbeam.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/CAL3PpaVGzRL2j_rNYAhAsSPxw2F8gpotuLhpZiA3DOjkYXgDUw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Trigger a job based on failure of another/upstream job

2017-06-28 Thread Michael Pailloncy
Are you using the Scripted or Declarative way to write your Pipeline ?
If you are in Declarative mode, I think that you can easily do that with
the *post *section => see https://jenkins.io/doc/book/pipeline/syntax#post

2017-06-28 7:06 GMT+02:00 Максим :

> Hi!
> Perhaps you can use try-catch blocks.
> And run your job in a catch block
>
> вт, 27 июн. 2017 г. в 21:40, Kishor Ramanan :
>
>> Hi,
>>
>> Is there a way where I can trigger a job based on the failure condition
>> of other job?
>>
>> I am using pipeline as of now, during the last step if pipeline fails, I
>> want to execute a specific set of job.
>>
>> 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/ce1a300c-be24-4c94-8b71-
>> 62042e1d85af%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
>
> С уважением, Сёмочкин Максим.
> Twitter: maksim77
> +7 926 9056085 <+7%20926%20905-60-85>
>
> --
> 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/CANJG3dJjovR7VcpCkNNm7XVm9%
> 3DLCpiPB1Xi_gZgrghkwVz9bJw%40mail.gmail.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/CAPO77c1mB2gQWii4qfPgLa0rccGqyqyawOU_6z%3DW6p%3Dn1dURWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: What is the difference between my shell and Jenkins regarding batch command

2017-06-28 Thread Richard Bywater
To be able to provide assistance about possible causes you really need to
provide more info - for instance, what the Java exception is that you are
getting. Otherwise any help would be merely guessing to possible causes.

Richard.

On Wed, 28 Jun 2017 at 20:34 Nicolas Lignée 
wrote:

> Hello,
>
> I'm currently trying to configure a Jenkins project to build a MCUXpresso
> project. MCUXpresso is a Eclipse-based IDE.
> To do so, I am Executing Windows batch command as follows :
>
> C:\NXP\MCUXpressoIDE_10.0.0_344\ide\mcuxpressoidec.exe -nosplash
> -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data
> "my_workspace" -cleanBuild "my_project" --launcher.suppressErrors
>
> By looking at the console output, with a few differences the build is quit
> similar to the one in MCUXpresso. Yet, I still have a Java exception at the
> end and the build fails.
> What make me think the problem comes from my Jenkins configuration is that
> when I use exactly the same command in my shell, the build is correct.
>
> I made a lot of research (even on this
> https://wiki.jenkins.io/display/JENKINS/My+software+builds+on+my+computer+but+not+on+Jenkins)
> but I still don't find the answer to this question :
>
> What is the difference between the command prompt (where the batch command
> works) and Jenkins ?
>
> Thank 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/3c021678-daa7-4d8c-b120-b2e890351a73%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/CAMui946ZKnyixpN5i8992EKhm9aQTM7qoNQUr3Mcs8irz98Hmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


What is the difference between my shell and Jenkins regarding batch command

2017-06-28 Thread Nicolas Lignée
Hello, 

I'm currently trying to configure a Jenkins project to build a MCUXpresso 
project. MCUXpresso is a Eclipse-based IDE.
To do so, I am Executing Windows batch command as follows :

C:\NXP\MCUXpressoIDE_10.0.0_344\ide\mcuxpressoidec.exe -nosplash 
-application org.eclipse.cdt.managedbuilder.core.headlessbuild -data 
"my_workspace" -cleanBuild "my_project" --launcher.suppressErrors

By looking at the console output, with a few differences the build is quit 
similar to the one in MCUXpresso. Yet, I still have a Java exception at the 
end and the build fails. 
What make me think the problem comes from my Jenkins configuration is that 
when I use exactly the same command in my shell, the build is correct. 

I made a lot of research (even on this 
https://wiki.jenkins.io/display/JENKINS/My+software+builds+on+my+computer+but+not+on+Jenkins)
 
but I still don't find the answer to this question :

What is the difference between the command prompt (where the batch command 
works) and Jenkins ? 

Thank 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/3c021678-daa7-4d8c-b120-b2e890351a73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Trigger a job based on failure of another/upstream job

2017-06-28 Thread Максим
Hi!
Perhaps you can use try-catch blocks.
And run your job in a catch block

вт, 27 июн. 2017 г. в 21:40, Kishor Ramanan :

> Hi,
>
> Is there a way where I can trigger a job based on the failure condition of
> other job?
>
> I am using pipeline as of now, during the last step if pipeline fails, I
> want to execute a specific set of job.
>
> 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/ce1a300c-be24-4c94-8b71-62042e1d85af%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 

С уважением, Сёмочкин Максим.
Twitter: maksim77
+7 926 9056085

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


Build a pipeline of Jenkins jobs

2017-06-28 Thread Breitbach, Steffen
Hi everyone!

I'm trying to build a Jenkins pipeline which executes other Jenkins jobs in a 
particular order. I want to display each job's log in the pipeline, so here is 
what I've came up with so far:

pipeline {
agent {
label 'pipeline'
}
stages {
stage('First') {
steps {
script {
def buildJob = ""
try {
buildJob = build job: 'First'
} finally {
println buildJob.rawBuild.log
}
}
}
}
stage('Second, Third') {
steps {
parallel (
"Second" : {
script {
def buildJob = ""
try {
buildJob = build job: 'Second'
} finally {
println buildJob.rawBuild.log
}
}
},

I have used the try-finally blocks so that the build log always will be 
displayed, regardless of the buildJob outcome.

Interposed question: Would it be possible to get a 'live' log output while the 
job is being build?

Anyhow, my problem is that I the second "println" will print the log of the 
first job if the second job fails, not the log of the second job. This is why 
I've added the def in the last script block, but this will yield an 
unclassified field java.lang.String rawBuild error.

How could I work around this?

Thanks

Steffen

-- 
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/5E63738AB9896844AF1601A1D094677317A63160%40SMBXKO2.cgm.ag.
For more options, visit https://groups.google.com/d/optout.