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

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 -

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

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

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

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

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.

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

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

${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

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 >

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"

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

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

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

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

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

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

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:

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

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

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

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

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

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

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') {