Antwort: Running SQL queries from a pipeline script?

2017-01-12 Thread Lars . Meynberg
We've done that against OracleDB but with a plain shell script. I'm not 
aware about a SQL Jenkins plugin with proper pipeline step.

jenkinsci-users@googlegroups.com wrote on 12/01/2017 22:53:37:

> Von: Peter McNab 
> An: Jenkins Users 
> Datum: 12/01/2017 22:53
> Betreff: Running SQL queries from a pipeline script?
> Gesendet von: jenkinsci-users@googlegroups.com
> 
> Has anyone got a working solution for running SQL queries from a 
> pipeline script (specifically MySQL?)
> 
> Pete
> 
> -- 
> 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/626085ee-8401-73ba-d512-3bb8f9371a1c%40perforce.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/OF63C1CC2D.A7565EB5-ONC12580A7.0027E1CF-C12580A7.0027FC7C%40gauselmann.com.
For more options, visit https://groups.google.com/d/optout.


[Declarative Pipeline] Cant use 'path' as parameter name

2017-01-12 Thread Dan Tran
The below pipe will work at first checkout,  after that it will fait where 
jenkins git not able to checkout. looks like 'path' interfere with local 
env path?

pipeline {

parameters {
string(defaultValue: 'cs/xx', description: 'Path to git path - ex 
cs/cbs', name: 'path')
}

options {
buildDiscarder(logRotator(numToKeepStr:'2'))
disableConcurrentBuilds()
}

agent any

stages {

stage ('do-something') {
steps {
  sh "echo ${params.path}"
}
}
}
}

here is the error. 

Caused by: hudson.plugins.git.GitException 
:
 Command "git fetch --tags --progress 
ssh://.com/~trand8/xxx-jenkinsfiles.git 
+refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: error: cannot run ssh: No such file or directory
fatal: unable to fork


Thoughts?


-D



-- 
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/a2204ec6-b855-4b07-b824-b61c2cbb336f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Scripting installation of JDK

2017-01-12 Thread Damien Caro
Hello,

I'm trying to automate the installation of Jenkins. I have a VM image that 
has Jenkins already installed but I want to automate the next step of the 
installation: JDK + Oracle password and Gradle. Has anyone already done 
something similar and how ? I am considering either a shell script or a 
groovy script.

Thanks,
Damien Caro

-- 
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/6d48a0e9-8393-4acc-b724-9e2fdc6e71c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: help on starting up Jenkins on Suse Linux

2017-01-12 Thread Jeffrey Cañas
Do you have JAVA installed on your server?

On Friday, January 6, 2017 at 8:02:33 PM UTC+8, Vijai Meda wrote:
>
> Thanks Mark.
> I have downloaded OpenSuSe package and installed.
> Now it simply says  failed.
>
> hyslnx20:/opt/home/vm185012/Jenkins # /etc/init.d/jenkins start
> Starting 
> Jenkins   failed
>
> I have debugged a /etc/init.d/jenkins script it fails  at
>
> case "$1" in
> start)
> echo -n "Starting Jenkins "
> /sbin/checkproc -k -p "$JENKINS_PID_FILE" "$JAVA_HOME/bin/java" 
> >/var/log/jenkins.rc 2>&1
> CHECK=$?
> if [ $CHECK -eq 7 ]; then
> rm -f "$JENKINS_PID_FILE"
> if [ -x "$JENKINS_INIT_SHELL" ]; then
>  
>startproc -n $JENKINS_NICE -s -e -l 
> /var/log/jenkins.rc -p "$JENKINS_PID_FILE" -t 1 /bin/su -l -s 
> "$JENKINS_INIT_SHELL" -c "$JAVA_CMD $PARAMS &" "$JENKINS_USER"
> else
>
>
>HOME=$JENKINS_HOME startproc -n $JENKINS_NICE -s -e 
> -l /var/log/jenkins.rc -u "$JENKINS_USER" -p "$JENKINS_PID_FILE" $JAVA_CMD 
> $PARAMS
> fi
> JPROC=$( pgrep java -U $JENKINS_USER )
> if [ -n "$JPROC" ]; then
> echo "$JPROC" >"$JENKINS_PID_FILE"
> rc_status -v
> else
> echo " Failed here1"
> rc_failed
> rc_status -v
> fi
> else
>
> The command doesnt seem to be running in the backgroud "startproc -n 
> $JENKINS_NICE -s -e -l /var/log/jenkins.rc -p "$JENKINS_PID_FILE" -t 1 
> /bin/su -l -s "$JENKINS_INIT_SHELL" -c "$JAVA_CMD $PARAMS &" "$JENKINS_USER"" 
> and hence the below lines fail
>
> JPROC=$( pgrep java -U $JENKINS_USER )
> if [ -n "$JPROC" ]; then
>
> On Friday, 6 January 2017 15:57:48 UTC+5:30, Mark Waite wrote:
>>
>> You're trying to use a package created for a Red Hat distribution on a 
>> distribution which is not Red Hat or a Red Hat derivative.  In general, 
>> that won't work.
>>
>> Refer to 
>> http://unix.stackexchange.com/questions/9314/no-such-file-or-directory-etc-init-d-functions
>>  for 
>> more details describing why it won't work.
>>
>> You should probably use the SUSE / openSUSE long term support package 
>> from http://pkg.jenkins-ci.org/opensuse-stable/ or the weekly from 
>> http://pkg.jenkins-ci.org/opensuse/ 
>>
>> Mark Waite
>>
>> On Fri, Jan 6, 2017 at 3:15 AM Vijai Meda  wrote:
>>
>>> Hi,
>>>  I have downloaded rpm for “Red Hat/Fedora/CentOS” and installed on my 
>>> Suse Linux 11, below is the output of the installation.
>>>
>>>
>>> warning: jenkins-2.32.1-1.1.noarch.rpm: Header V4 DSA signature: NOKEY, 
>>> key ID d50582e6
>>>
>>> Preparing...### 
>>> [100%]
>>>
>>>1:jenkins### 
>>> [100%]
>>>
>>> jenkins   0:off  1:off  2:off  3:on   4:off  5:on   
>>> 6:off
>>>
>>>
>>> But when I start the Jenkins, it fails with below error.
>>>
>>> /etc/init.d/jenkins: line 51: /etc/init.d/functions: No such file or 
>>> directory
>>>
>>>
>>> If any of you guys ever encountered or did know a solution, then please 
>>> help me.
>>>
>>> In which directory Jenkins gets installed at?
>>>
>>>
>>> Thanks,
>>>
>>> Vijai
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/64a7c6ef-f469-4a6a-8944-562ec3c517d0%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/ae7d86cc-ac69-4855-abee-3bcff156fd09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Plugin Integration Testing with Downstream Jobs

2017-01-12 Thread Rayees Namathponnan
there is plugin called conditional build plugin, please check this, it may help 
you 




> On Jan 12, 2017, at 1:58 PM, Daniel Beck  wrote:
> 
> 
>> On 12.01.2017, at 21:03, Eric Zounes  wrote:
>> 
>> I'd really like to know if there's a blessed way for the test to block until 
>> all downstream jobs are completed or if I should take a different approach 
>> all together. Thanks.
> 
> More of a developers list question.
> 
> JenkinsRule#waitUntilNoActivity() will do this.
> 
> -- 
> 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/5B5A31EC-7A92-4F39-BF41-D08432D83A17%40beckweb.net.
> 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/81BBC756-0415-4D36-BB5A-03FE34FCAB3F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Plugin Integration Testing with Downstream Jobs

2017-01-12 Thread Daniel Beck

> On 12.01.2017, at 21:03, Eric Zounes  wrote:
> 
> I'd really like to know if there's a blessed way for the test to block until 
> all downstream jobs are completed or if I should take a different approach 
> all together. Thanks.

More of a developers list question.

JenkinsRule#waitUntilNoActivity() will do this.

-- 
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/5B5A31EC-7A92-4F39-BF41-D08432D83A17%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Running SQL queries from a pipeline script?

2017-01-12 Thread Peter McNab
Has anyone got a working solution for running SQL queries from a 
pipeline script (specifically MySQL?)


Pete

--
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/626085ee-8401-73ba-d512-3bb8f9371a1c%40perforce.com.
For more options, visit https://groups.google.com/d/optout.


Declarative Pipeline - Pipeline Shared Library

2017-01-12 Thread 'Daniel' via Jenkins Users
Hi together, 

as similar question has already been asked regarding stages, but this and 
is about the full pipeline definition.
https://groups.google.com/forum/?utm_medium=email_source=footer#!searchin/jenkinsci-users/declarative|sort:relevance/jenkinsci-users/fiP1Qi7wusY/EC9fMKFGBgAJ

Is it possible or planned to be able to define a full Declarative Pipeline 
in a Pipeline Shared Library?

I am asking because we have a lot of customer projects that in their 
Jenkins File call just one function of a Pipeline Shared Library which 
handles the full build.
This really convenient and I am afraid that I would loose this kind of 
comfort.

Regards,
Daniel

-- 
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/0fc2036e-ba38-4895-a7ba-8a92ef755a1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Way to trigger another build on "Keep this build forever"?

2017-01-12 Thread Greg Smith

Hi,

I would like to create a build that is triggered whenever a user clicks 
"keep this build forever" within any build.

I want to run a build that backs that those artifacts up, pushes it to 
another file server.

Is there any way I can create a build that is triggered on such an event?

Cheers,
Greg

-- 
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/bc2e6837-acf3-4ccb-928d-5340fdf70eb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: problem with jenkins not able to access git

2017-01-12 Thread Phil Swenson
Actually I don't think it has anything to do with git... i tried 
downgrading my git plugin and got this error:


   - Failed to resolve host name updates.jenkins-ci.org. Perhaps you need 
   to configure HTTP proxy? 
   


On Thursday, January 12, 2017 at 1:13:30 PM UTC-7, Phil Swenson wrote:
>
> I have a new jenkins server I'm trying to stand up 2.4 with all latest 
> plugins... it works for a day and then starts giving me errors like this:
>
> Started by timer
>  > git rev-parse --is-inside-work-tree # timeout=10
> Setting origin to g...@bitbucket.org:myco/ace-esni-datastore.git
>  > git config remote.origin.url 
> g...@bitbucket.org:mygo/ace-esni-datastore.git # timeout=10
> Fetching & pruning origin...
> Fetching upstream changes from origin
>  > git --version # timeout=10
> using GIT_SSH to set credentials 
>  > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* 
> --prune
> FATAL: Failed to recompute children of ace-esni-datastore-test
> hudson.plugins.git.GitException 
> :
>  Command "git fetch --tags --progress origin 
> +refs/heads/*:refs/remotes/origin/* --prune" returned status code 128:
> stdout: 
> stderr: ssh: Could not resolve hostname bitbucket.org: Name or service not 
> known
> fatal: Could not read from remote repository.
>
> Please make sure you have the correct access rights
> and the repository exists.
>
> at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1772)
> at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1516)
> at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:67)
> at 
> org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:318)
> at 
> jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:203)
> at 
> jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:233)
> at jenkins.scm.api.SCMSource.fetch(SCMSource.java:148)
> at 
> jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:294)
> at 
> com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:187)
> at 
> com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:139)
> at hudson.model.ResourceController.execute(ResourceController.java:98)
> at hudson.model.Executor.run(Executor.java:404)
> Finished: FAILURE
>
>
>
> All the jobs do this (all pipeline jobs)
>
> I had this problem yesterday as well and restored from a snapshot and got 
> it going again... then I upgraded to jenkins 2.4 and updated all the 
> plugins.  Everything was great, but all of a sudden this error popped up 
> again.
>
>
>
> Any ideas? 
>
> thanks,
> phil
>
>

-- 
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/ef0c978f-a07e-43bf-b782-265840bb838d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Having trouble with Jenkins 2 checking out code in a PR under github org

2017-01-12 Thread nwalke



I have a pull request that looks like this with a Jenkinsfile in it:


 



Before I opened the PR, the branch ran successfully under our Github 
Org/Project in Jenkins2.  Our Github org in Jenkins is set up to run:

Build origin branches
Build origin PRs (merged with base branch)

Now when I make changes to the PR and Jenkins tries to run it, I see this 
in the console output:

Connecting to https://api.github.com using mygithubuser/** (Jenkin's Github 
account)
java.io.IOException: Cannot find base branch metadata from SCMHead{'PR-65'}
at 
org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.doRetrieve(GitHubSCMSource.java:601)
at 
org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:586)
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:505)
at 
org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:75)
at 
org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:215)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Finished: FAILURE

Has anyone seen this before and/or know what to do about 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/5c52f217-6ab9-4cfe-87a0-ab68591ccfb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


problem with jenkins not able to access git

2017-01-12 Thread Phil Swenson
I have a new jenkins server I'm trying to stand up 2.4 with all latest 
plugins... it works for a day and then starts giving me errors like this:

Started by timer
 > git rev-parse --is-inside-work-tree # timeout=10
Setting origin to g...@bitbucket.org:myco/ace-esni-datastore.git
 > git config remote.origin.url g...@bitbucket.org:mygo/ace-esni-datastore.git 
 > # timeout=10
Fetching & pruning origin...
Fetching upstream changes from origin
 > git --version # timeout=10
using GIT_SSH to set credentials 
 > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* 
 > --prune
FATAL: Failed to recompute children of ace-esni-datastore-test
hudson.plugins.git.GitException 
:
 Command "git fetch --tags --progress origin 
+refs/heads/*:refs/remotes/origin/* --prune" returned status code 128:
stdout: 
stderr: ssh: Could not resolve hostname bitbucket.org: Name or service not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1772)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1516)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:67)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:318)
at 
jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:203)
at 
jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:233)
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:148)
at 
jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:294)
at 
com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:187)
at 
com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:139)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Finished: FAILURE



All the jobs do this (all pipeline jobs)

I had this problem yesterday as well and restored from a snapshot and got 
it going again... then I upgraded to jenkins 2.4 and updated all the 
plugins.  Everything was great, but all of a sudden this error popped up 
again.



Any ideas? 

thanks,
phil

-- 
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/d03bc1a6-4ad1-4514-bd85-aa4bea47602e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Plugin Integration Testing with Downstream Jobs

2017-01-12 Thread Eric Zounes
Hey all,

I'm currently writing a plugin where I need to write integration tests 
which rely on build trigger behavior. For some context, I'm using the 
JenkinsRule object for testing.  

Say I have job A and job B. Job B is a downstream job from job A. I've 
created a BuildTrigger in my test which is added to job A like this:

Enter code here...

List downstreamJobs = new ArrayList();
downstreamJobs.add(jobB);
jobA.getPublishersList().add(new BuildTrigger(downstreamJobs, Result.SUCCESS));
j.jenkins.rebuildDependencyGraph();


Now I'd like to schedule a build for job A and block until job B has 
completed. The problem I'm running in to is that my test will only block on 
job A but not job B. I schedule job A like this:
Enter code here...

FreeStyleBuild jobABuild = jobA.scheduleBuild2(0, c, params).get();


This call of schedulebuild2 returns a future. I then block until the build 
has completed. I'd then like the test to block on job B, but I'm not sure 
how to do that. I'd really like to know if there's a blessed way for the 
test to block until all downstream jobs are completed or if I should take a 
different approach all together. 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/39aac0b9-0187-4886-ac35-e18b5242177a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline Multibranch and Security questions

2017-01-12 Thread Daniel Beck

> On 12.01.2017, at 15:03, Kristian  wrote:
> 
> Sorry, this was the false link. This is the correct one:
> https://groups.google.com/forum/#!topic/jenkinsci-users/1mtr7Av4zJI

IIRC archiving artifacts follows symlinks, so you can just create symbolic 
links inside the workspace to the actual artifacts and archive those.

-- 
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/B246CA03-0690-41C0-BFF4-C251541AEF78%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline Multibranch and Security questions

2017-01-12 Thread Daniel Beck

> On 12.01.2017, at 17:01, 'Björn Pedersen' via Jenkins Users 
>  wrote:
> 
> manager.hudson

Specific to unsandboxed Groovy Postbuild, doesn't work in Pipeline.

-- 
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/05FB1C10-C10A-4F09-8FCD-60B62F1556D9%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline Multibranch and Security questions

2017-01-12 Thread 'Björn Pedersen' via Jenkins Users
try:
 
   echo manager.hudson.getNode(NODE_NAME).getRootPath().toString()
 
to get the current nodes rootPath (or pass a suitable nodename).

Björn

Am Donnerstag, 12. Januar 2017 15:03:12 UTC+1 schrieb Kristian X:
>
> Sorry, this was the false link. This is the correct one: 
> https://groups.google.com/forum/#!topic/jenkinsci-users/1mtr7Av4zJI 
>
> 2017-01-12 15:00 GMT+01:00 Kristian : 
>
> > The function comes originally from this question: 
> > https://groups.google.com/forum/#!topic/jenkinsci-users/L9yP2df9Fz4 
> > 
> > 
> > 2017-01-12 14:50 GMT+01:00 Daniel Beck : 
>
> >> What are you trying to accomplish? Pipeline is not intended to perform 
> system management tasks. 
> >> 
> >>> On 12.01.2017, at 14:30, Kristian  
> wrote: 
> >>> 
> >>> Hi all, 
> >>> 
> >>> I am new to Pipeline and Multibranch. I just wrote a small test 
> >>> pipeline script for a project of me and started it in a Multibranch 
> >>> project. Suddenly I got an error message like this: 
> >>> 
>  org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: 
> Scripts not permitted to use staticMethod jenkins.model.Jenkins getInstance 
> >>> 
> >>> After a quick look at Google, I found out, that I can whitelist this 
> >>> at "Manage Jenkins -> In-process Script Approval". I had to do this 
> >>> several times, so now I have this white list: 
> >>> 
>  field hudson.model.Slave name 
>  method hudson.model.AbstractCIBase getNodes 
>  method hudson.model.Node getRootPath 
>  staticMethod jenkins.model.Jenkins getInstance 
> >>> 
> >>> The last function is a problem due to Jenkins / Script Security 
> >>> Plugin, because this function "may have introduced a security 
> >>> vulnerability". I am using the getInstance() function in this 
> >>> function: 
> >>> 
> >>> // ** 
> >>> @NonCPS 
> >>> def nodeRootDir(nodeName) { 
> >>>for (node in Jenkins.instance.nodes) { 
> >>>println node.name 
> >>>if (!nodeName.equals('master') && 
> >>> node.name.compareTo(nodeName) == 0 ) { 
> >>>return node.getRootPath() 
> >>>break 
> >>>} 
> >>>} 
> >>> } 
> >>> // ** 
> >>> 
> >>> The function retrieves the root path of a slave. The question is: Is 
> >>> there another way to get the root path of a slave in a non-problematic 
> >>> way? 
> >>> 
> >>> -- 
> >>> You received this message because you are subscribed to the Google 
> Groups "Jenkins Users" group. 
> >>> To unsubscribe from this group and stop receiving emails from it, send 
> an email to jenkinsci-use...@googlegroups.com . 
> >>> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/CAO5HUhPS0Tj65VwwWkTQfA0hRSEXLuYDODf0PesPUXXLiJw%3DAQ%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-use...@googlegroups.com . 
> >> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/5CB3C56B-46AC-4C86-9A17-81C5BBEBEA8F%40beckweb.net.
>  
>
> >> 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/4abb3a74-18a4-493a-b605-e4914de198b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to set Jenkins environment variables containing spaces?

2017-01-12 Thread nada abdelkader
Hello,

I have some env variables to configure (Jenkins->manage Jenkins->configure 
System -> Global properties -> Environment variables) in Jenkins (1.632) 
which take a list of values.

I know that I have to list the values in the value field but what I need to 
know is if one of these values contains already spaces, what should I do?
For example:
my variable name: MY_VAR
my values: vaule 1, value 2, value 3,...

thks 

-- 
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/5bf394b2-73f5-47f1-b191-1476d3d182a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline Multibranch and Security questions

2017-01-12 Thread Kristian
Sorry, this was the false link. This is the correct one:
https://groups.google.com/forum/#!topic/jenkinsci-users/1mtr7Av4zJI

2017-01-12 15:00 GMT+01:00 Kristian :
> The function comes originally from this question:
> https://groups.google.com/forum/#!topic/jenkinsci-users/L9yP2df9Fz4
>
>
> 2017-01-12 14:50 GMT+01:00 Daniel Beck :
>> What are you trying to accomplish? Pipeline is not intended to perform 
>> system management tasks.
>>
>>> On 12.01.2017, at 14:30, Kristian  wrote:
>>>
>>> Hi all,
>>>
>>> I am new to Pipeline and Multibranch. I just wrote a small test
>>> pipeline script for a project of me and started it in a Multibranch
>>> project. Suddenly I got an error message like this:
>>>
 org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: 
 Scripts not permitted to use staticMethod jenkins.model.Jenkins getInstance
>>>
>>> After a quick look at Google, I found out, that I can whitelist this
>>> at "Manage Jenkins -> In-process Script Approval". I had to do this
>>> several times, so now I have this white list:
>>>
 field hudson.model.Slave name
 method hudson.model.AbstractCIBase getNodes
 method hudson.model.Node getRootPath
 staticMethod jenkins.model.Jenkins getInstance
>>>
>>> The last function is a problem due to Jenkins / Script Security
>>> Plugin, because this function "may have introduced a security
>>> vulnerability". I am using the getInstance() function in this
>>> function:
>>>
>>> // **
>>> @NonCPS
>>> def nodeRootDir(nodeName) {
>>>for (node in Jenkins.instance.nodes) {
>>>println node.name
>>>if (!nodeName.equals('master') &&
>>> node.name.compareTo(nodeName) == 0 ) {
>>>return node.getRootPath()
>>>break
>>>}
>>>}
>>> }
>>> // **
>>>
>>> The function retrieves the root path of a slave. The question is: Is
>>> there another way to get the root path of a slave in a non-problematic
>>> way?
>>>
>>> --
>>> 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/CAO5HUhPS0Tj65VwwWkTQfA0hRSEXLuYDODf0PesPUXXLiJw%3DAQ%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/5CB3C56B-46AC-4C86-9A17-81C5BBEBEA8F%40beckweb.net.
>> 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/CAO5HUhPKHHffXyXJPcqHeOarsTTR%2BwVn1rhgWDSb5bPTx%3DdYZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline Multibranch and Security questions

2017-01-12 Thread Kristian
The function comes originally from this question:
https://groups.google.com/forum/#!topic/jenkinsci-users/L9yP2df9Fz4


2017-01-12 14:50 GMT+01:00 Daniel Beck :
> What are you trying to accomplish? Pipeline is not intended to perform system 
> management tasks.
>
>> On 12.01.2017, at 14:30, Kristian  wrote:
>>
>> Hi all,
>>
>> I am new to Pipeline and Multibranch. I just wrote a small test
>> pipeline script for a project of me and started it in a Multibranch
>> project. Suddenly I got an error message like this:
>>
>>> org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: 
>>> Scripts not permitted to use staticMethod jenkins.model.Jenkins getInstance
>>
>> After a quick look at Google, I found out, that I can whitelist this
>> at "Manage Jenkins -> In-process Script Approval". I had to do this
>> several times, so now I have this white list:
>>
>>> field hudson.model.Slave name
>>> method hudson.model.AbstractCIBase getNodes
>>> method hudson.model.Node getRootPath
>>> staticMethod jenkins.model.Jenkins getInstance
>>
>> The last function is a problem due to Jenkins / Script Security
>> Plugin, because this function "may have introduced a security
>> vulnerability". I am using the getInstance() function in this
>> function:
>>
>> // **
>> @NonCPS
>> def nodeRootDir(nodeName) {
>>for (node in Jenkins.instance.nodes) {
>>println node.name
>>if (!nodeName.equals('master') &&
>> node.name.compareTo(nodeName) == 0 ) {
>>return node.getRootPath()
>>break
>>}
>>}
>> }
>> // **
>>
>> The function retrieves the root path of a slave. The question is: Is
>> there another way to get the root path of a slave in a non-problematic
>> way?
>>
>> --
>> 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/CAO5HUhPS0Tj65VwwWkTQfA0hRSEXLuYDODf0PesPUXXLiJw%3DAQ%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/5CB3C56B-46AC-4C86-9A17-81C5BBEBEA8F%40beckweb.net.
> 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/CAO5HUhMrD8-Gz5GOTSt9OysV3jrtGjN1846%2B%2BD1YjEEbha%2BUpQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Issues with role-strategy plugin on 2.32.1

2017-01-12 Thread Daniel Beck

> On 11.01.2017, at 23:10, Francisca Munhoz  wrote:
> 
> Caused by: com.thoughtworks.xstream.mapper.CannotResolveClassException: 
> com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy
> 
> 

You're using the role strategy plugin and it isn't installed, disabled, or 
failed to load. The Jenkins log will tell you which.

That last one could be caused by 
https://jenkins.io/doc/upgrade-guide/2.19/#plugin-dependency-resolution-fix

-- 
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/B229AC98-1710-40C2-A539-E330660C1076%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Re: Pipeline Multibranch and Security questions

2017-01-12 Thread Daniel Beck
What are you trying to accomplish? Pipeline is not intended to perform system 
management tasks.

> On 12.01.2017, at 14:30, Kristian  wrote:
> 
> Hi all,
> 
> I am new to Pipeline and Multibranch. I just wrote a small test
> pipeline script for a project of me and started it in a Multibranch
> project. Suddenly I got an error message like this:
> 
>> org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: 
>> Scripts not permitted to use staticMethod jenkins.model.Jenkins getInstance
> 
> After a quick look at Google, I found out, that I can whitelist this
> at "Manage Jenkins -> In-process Script Approval". I had to do this
> several times, so now I have this white list:
> 
>> field hudson.model.Slave name
>> method hudson.model.AbstractCIBase getNodes
>> method hudson.model.Node getRootPath
>> staticMethod jenkins.model.Jenkins getInstance
> 
> The last function is a problem due to Jenkins / Script Security
> Plugin, because this function "may have introduced a security
> vulnerability". I am using the getInstance() function in this
> function:
> 
> // **
> @NonCPS
> def nodeRootDir(nodeName) {
>for (node in Jenkins.instance.nodes) {
>println node.name
>if (!nodeName.equals('master') &&
> node.name.compareTo(nodeName) == 0 ) {
>return node.getRootPath()
>break
>}
>}
> }
> // **
> 
> The function retrieves the root path of a slave. The question is: Is
> there another way to get the root path of a slave in a non-problematic
> way?
> 
> -- 
> 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/CAO5HUhPS0Tj65VwwWkTQfA0hRSEXLuYDODf0PesPUXXLiJw%3DAQ%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/5CB3C56B-46AC-4C86-9A17-81C5BBEBEA8F%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.


Pipeline Multibranch and Security questions

2017-01-12 Thread Kristian
Hi all,

I am new to Pipeline and Multibranch. I just wrote a small test
pipeline script for a project of me and started it in a Multibranch
project. Suddenly I got an error message like this:

> org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts 
> not permitted to use staticMethod jenkins.model.Jenkins getInstance

After a quick look at Google, I found out, that I can whitelist this
at "Manage Jenkins -> In-process Script Approval". I had to do this
several times, so now I have this white list:

> field hudson.model.Slave name
> method hudson.model.AbstractCIBase getNodes
> method hudson.model.Node getRootPath
> staticMethod jenkins.model.Jenkins getInstance

The last function is a problem due to Jenkins / Script Security
Plugin, because this function "may have introduced a security
vulnerability". I am using the getInstance() function in this
function:

// **
@NonCPS
def nodeRootDir(nodeName) {
for (node in Jenkins.instance.nodes) {
println node.name
if (!nodeName.equals('master') &&
node.name.compareTo(nodeName) == 0 ) {
return node.getRootPath()
break
}
}
}
// **

The function retrieves the root path of a slave. The question is: Is
there another way to get the root path of a slave in a non-problematic
way?

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


Re: JDK Installer Groovy script

2017-01-12 Thread Victor Martinez
I've just found those variables are private:

- 
https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/tools/JDKInstaller.java#L739-L741

So no way to set them directly unless running the method doPostCredential

import jenkins.model.*

import hudson.model.*

  

def inst = Jenkins.getInstance()

def desc = inst.getDescriptor("hudson.tools.JDKInstaller")

println desc.doPostCredential('YourEmailAccount','YourPassword')



I hope it helps

Cheers

On Thursday, 30 June 2016 14:23:45 UTC+1, Stijn Diependaele wrote:
>
> Hey Mike,
>
> We decided not to download from Oracle. Instead we have a local repo and 
> we use puppet to manage/install the java package. So I did it like in the 
> script above by setting the name and the path where java is installed.
>
> It's better to have a local repo and use this one instead. But if you want 
> I can have a look at it again, maybe I find it now.
>
> Op vrijdag 29 april 2016 17:03:50 UTC+2 schreef Stijn Diependaele:
>>
>> Dear,
>>
>> I'm trying to write a groovy script which manages the JDK installs. 
>>
>> The code below would set the JDK installation with the home folder. 
>> Although I would like to us an automatic installation from Oracle.
>> You have to set the username and password for this. But how do i pass the 
>> username and password to the Descriptor of JDKInstaller?
>>
>> If I look at 
>> http://javadoc.jenkins-ci.org/hudson/tools/JDKInstaller.DescriptorImpl.html 
>> I can see that you can getUsername an getPassword. 
>> A guess would be it's done by passing it through JSON in the configure 
>> method???
>>
>> Could anyone provide a code example? 
>>
>> JDKDesc = Jenkins.instance.getDescriptorByName("hudson.model.JDK");
>>
>> JDK jdk = new JDK("JDK 8", "/usr/lib/jvm/java-8-openjdk-amd64");
>> 
>> jdkDesc.setInstallations(jdk); 
>>
>> jdks = jdkDesc.getInstallations();
>> jdkDesc.save();
>>
>> Jenkins.instance.save()
>>
>> thanks!
>> Stijn
>>
>

-- 
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/74560e87-be49-4f6d-acd2-38614e80776d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Some questions on ArtifactArchiver for a pipeline script

2017-01-12 Thread Kristian
Thank you for your answer. This worked very well!

2017-01-11 16:38 GMT+01:00  :
>
> Use:
> println(pwd());
> that should help you determine current working directory.
>
> If the /home/user/project is the current working directory where the project
> is checkout and you are looking at /home/user/artifacts for the zip files:
>
> archiveArtifacts artifacts: "../artifacts/**/*.zip", excludes:
> "../artifacts/notIncluded/**/*.zip", fingerprint: true, allowEmptyArchive:
> false, onlyIfSuccessful: true;
>
> Note, you don't need the step(([$class:]) wrapper anymore, make it easier to
> read into recent Jenkins. you can also change the path before calling
> archive (I haven't test it but it should work, make it more compact and
> easier to maintain and understand):
> dir("../artifacts")
> {
>   archiveArtifacts artifacts: "**/*.zip" ...
> }
>
>
>
> --
> 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/ee8e98cd-6527-4e67-9da4-7d47f657b76e%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/CAO5HUhMCwg7nirUEeYDJo%2BqvrOX1Ww%3DTzD3fyrn-hoyEZuU09g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to trigger Jenkins build with parameters from Gitlab webhook?

2017-01-12 Thread Mark Allison
I don't think that's correct because when I invoke the job manually and set 
parameters, then they show up in the echo command. However, when I use the 
webhook from gitlab, the parameter values don't show up.

On Wednesday, 11 January 2017 23:23:09 UTC, Indra Gunawan (ingunawa) wrote:
>
> It should be “echo MYPARAM: ${env.MYPARAM}” in pipeline
>
>  
>
>  
>
> *From: * on behalf of Mark 
> Allison 
> *Reply-To: *"jenkins...@googlegroups.com " <
> jenkins...@googlegroups.com >
> *Date: *Wednesday, January 11, 2017 at 2:58 PM
> *To: *Jenkins Users 
> *Subject: *Re: How to trigger Jenkins build with parameters from Gitlab 
> webhook?
>
>  
>
> I have defined it outside of the pipeline script in the *This project is 
> parameterised section*. Is that what you mean? I haven't defined anything 
> in the pipeline itself. Do I need to do it there? If so, what is the syntax? 
>
>  
>
> Thanks
>
> On Monday, 9 January 2017 18:41:36 UTC, David Karr wrote: 
>
> I'm not sure if this matters, but did you define that parameter in the 
> pipeline job? 
>
> On Mon, Jan 9, 2017 at 3:02 AM, Mark Allison  wrote: 
> > I have GitLab Community Edition 8.15.2 successfully trigger pipeline 
> > projects in Jenkins 2.32.1 using a webhook (but without any parameters). 
> I 
> > want the gitlab push to trigger a build with parameters but the 
> parameter 
> > value is null when it comes through to Jenkins so the build fails. 
> > 
> > The gitlab webhook looks like: 
> > 
> > 
> http://jenkins.server:8080/project/project-a/buildWithParameters?MYPARAM=foo 
> > 
> > 
> > In my pipeline project I echo the parameter value out with 
> > 
> > echo "MYPARAM: ${MYPARAM}" 
> > 
> > 
> > and it's not set to anything. Any ideas on where I've gone wrong? 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Jenkins Users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to jenkinsci-use...@googlegroups.com. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/jenkinsci-users/058c423d-150e-4f17-99ca-aa0dfc2c5d50%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-use...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/bf8683f8-6f93-454f-9c2c-dbf867d70adb%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/c0e47c12-4489-4c48-8ef9-c328dfd94a5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Declarative Pipeline] params.xxx does not work for git

2017-01-12 Thread Baptiste Mathus
Nitpicking, I would argue it is not a "restriction" but a feature.
BTW this is a common behaviour: exactly the same exists in shell for
instance, and I'm sure in other languages.

A feature because it's nice to not always have to add antislashes for
parameters/variables you don't want resolved by the pipeline code itself.

Le 4 janv. 2017 9:56 PM, "David Karr"  a écrit :

On Tue, Jan 3, 2017 at 10:46 PM, Dan Tran  wrote:
> false alarm again, i need to double quote.  Not sure if this is intended
>
>   git url: "${params.gitUrl}", branch: "${params.branch}"

That's a Groovy restriction.  A single-quoted string is only a
"string", but a double-quoted string is a "gstring", which does
parameter interpolation.

--
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/CAA5t8VoVWXOKxhJyJCsh7gqC2bvoT
xyZF117WAjp9-9LJBbybw%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/CANWgJS493Sw-%2B4V_QfXxNo2TBme1VBU26xhM%3DOQy2pNxqRxtRw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.