It should be “echo MYPARAM: ${env.MYPARAM}” in pipeline

From: <[email protected]> on behalf of Mark Allison 
<[email protected]>
Reply-To: "[email protected]" <[email protected]>
Date: Wednesday, January 11, 2017 at 2:58 PM
To: Jenkins Users <[email protected]>
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 <[email protected]<javascript:>> 
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 [email protected]<javascript:>.
> 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 
[email protected]<mailto:[email protected]>.
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/115AB43B-F963-408E-815C-A1115C0E1E93%40cisco.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to