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: *<jenkins...@googlegroups.com <javascript:>> on behalf of Mark 
> Allison <marka...@gmail.com <javascript:>>
> *Reply-To: *"jenkins...@googlegroups.com <javascript:>" <
> jenkins...@googlegroups.com <javascript:>>
> *Date: *Wednesday, January 11, 2017 at 2:58 PM
> *To: *Jenkins Users <jenkins...@googlegroups.com <javascript:>>
> *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 <marka...@gmail.com> 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 <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/bf8683f8-6f93-454f-9c2c-dbf867d70adb%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jenkinsci-users/bf8683f8-6f93-454f-9c2c-dbf867d70adb%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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.

Reply via email to