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] <https://i.stack.imgur.com/V60Sv.png>


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] <https://i.stack.imgur.com/hx65w.png>


*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.

Reply via email to