Re: Trigger from GIT to Jenkins buildWithParameters ignores parameter value in pipeline

2019-03-20 Thread Jaroslav Koblizek
Thanks Aaron.

The issue was in missing escaping of & in URL. More details I posted to 
https://stackoverflow.com/questions/55257984/trigger-from-git-to-jenkins-buildwithparameters-ignores-parameter-value-in-pipel/55265035

-- 
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/b5dbd4ce-c337-4d80-bc5e-2e26c15d9e5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Trigger from GIT to Jenkins buildWithParameters ignores parameter value in pipeline

2019-03-20 Thread Aaron Digulla
 Use 

params.ABC

"params" contains build parameters, "env" the environment.

-- 
Aaron Digulla

-- 
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/e24195ee-68a7-44f9-a714-81170d98cb8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Trigger from GIT to Jenkins buildWithParameters ignores parameter value in pipeline

2019-03-20 Thread Jaroslav Koblizek
 

I have a *post-receive* hook in GIT (works ok) which calls


http://ip:port/job/project_name/buildWithParameters?token=abc&ABC=qwe
>
 

*ABC* is my parameter which is defined in Jenkins' project as *String 
parameter* with default value *xyz*. URL has value *qwe*.


[image: enter image description here] 


My Jenkins *pipeline script* is


pipeline {
> agent any
> stages {
> stage('Checkout') {
> steps {
> print env.ABC
> }
> }
> }
> }
>
>
When the build is triggered from GIT, env.ABC prints xyz and not qwe.


[image: enter image description here] 


*How to get the value qwe from the URL ?* My goal is to pass versioned tag 
name from GIT to pipeline.


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/809d5fb5-4553-40de-8eb7-01ef775dda10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.