Re: [go-cd] How do you retrieve a Pipeline's environment variables from a custom Task Plugin

2017-07-24 Thread Paul Pogonoski
Don't worry I sorted it
The context  is passed as a Map into the executor, so in there I do:

Map environmentVariables = (Map) context.getEnvironmentVariables();

String environment = (String) environmentVariables.get("GO_ENVIRONMENT_NAME"
);

and the environment string has the right value.


thanks!


On Mon, Jul 24, 2017 at 3:47 PM, Paul Pogonoski 
wrote:

> OK,
> so if I was to to do:
>
> String goEnvironment = context.environmentVariables.GO_ENVIRONMENT_NAME;
>
> goEnvironment would contain the value of the default GO_ENVIRONMENT_NAME
> environment variable?
>
> On Mon, Jul 24, 2017 at 3:42 PM, Ketan Padegaonkar <
> ketanpadegaon...@gmail.com> wrote:
>
>> The execute message should have all the variables available for your task
>> to consume as you see fit. https://developer.gocd.org/cur
>> rent/writing_go_plugins/task/version_1_0/execute.html if you are not
>> receiving those, perhaps logging a bug may be your best option
>>
>> On Mon, Jul 24, 2017, 7:52 PM  wrote:
>>
>>> Hi,
>>> I'd like to be able to extend the capability of Go's Authorisation by
>>> invoking some XACML requests.
>>> To make this as automated as possible, I don't want the use to enter
>>> values into the task that has been defined as an environment variable for
>>> the Pipeline.
>>>
>>> How do I use the GoApplicationAccessor to request the list of pipeline
>>> environment variables, both defined by the user and the default ones
>>> like GO_ENVIRONMENT_NAME?
>>>
>>> PP
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "go-cd" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to go-cd+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "go-cd" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/go-cd/9ndY28K879s/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> go-cd+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Paul Pogonoski
> Principal
> Email ppogo...@thoughtworks.com 
> Telephone +44 7488 747577 <+44+7488+747577>
> [image: ThoughtWorks]
> 
>



-- 
Paul Pogonoski
Principal
Email ppogo...@thoughtworks.com 
Telephone +44 7488 747577 <+44+7488+747577>
[image: ThoughtWorks]


-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to go-cd+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-cd] How do you retrieve a Pipeline's environment variables from a custom Task Plugin

2017-07-24 Thread Paul Pogonoski
OK,
so if I was to to do:

String goEnvironment = context.environmentVariables.GO_ENVIRONMENT_NAME;

goEnvironment would contain the value of the default GO_ENVIRONMENT_NAME
environment variable?

On Mon, Jul 24, 2017 at 3:42 PM, Ketan Padegaonkar <
ketanpadegaon...@gmail.com> wrote:

> The execute message should have all the variables available for your task
> to consume as you see fit. https://developer.gocd.org/
> current/writing_go_plugins/task/version_1_0/execute.html if you are not
> receiving those, perhaps logging a bug may be your best option
>
> On Mon, Jul 24, 2017, 7:52 PM  wrote:
>
>> Hi,
>> I'd like to be able to extend the capability of Go's Authorisation by
>> invoking some XACML requests.
>> To make this as automated as possible, I don't want the use to enter
>> values into the task that has been defined as an environment variable for
>> the Pipeline.
>>
>> How do I use the GoApplicationAccessor to request the list of pipeline
>> environment variables, both defined by the user and the default ones
>> like GO_ENVIRONMENT_NAME?
>>
>> PP
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "go-cd" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to go-cd+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "go-cd" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/go-cd/9ndY28K879s/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> go-cd+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Paul Pogonoski
Principal
Email ppogo...@thoughtworks.com 
Telephone +44 7488 747577 <+44+7488+747577>
[image: ThoughtWorks]


-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to go-cd+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-cd] How do you retrieve a Pipeline's environment variables from a custom Task Plugin

2017-07-24 Thread Ketan Padegaonkar
The execute message should have all the variables available for your task
to consume as you see fit.
https://developer.gocd.org/current/writing_go_plugins/task/version_1_0/execute.html
if you are not receiving those, perhaps logging a bug may be your best
option

On Mon, Jul 24, 2017, 7:52 PM  wrote:

> Hi,
> I'd like to be able to extend the capability of Go's Authorisation by
> invoking some XACML requests.
> To make this as automated as possible, I don't want the use to enter
> values into the task that has been defined as an environment variable for
> the Pipeline.
>
> How do I use the GoApplicationAccessor to request the list of pipeline
> environment variables, both defined by the user and the default ones
> like GO_ENVIRONMENT_NAME?
>
> PP
>
> --
> You received this message because you are subscribed to the Google Groups
> "go-cd" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to go-cd+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to go-cd+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-cd] How do you retrieve a Pipeline's environment variables from a custom Task Plugin

2017-07-24 Thread ppogonos
Hi,
I'd like to be able to extend the capability of Go's Authorisation by 
invoking some XACML requests.
To make this as automated as possible, I don't want the use to enter values 
into the task that has been defined as an environment variable for the 
Pipeline.

How do I use the GoApplicationAccessor to request the list of pipeline 
environment variables, both defined by the user and the default ones 
like GO_ENVIRONMENT_NAME?

PP

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to go-cd+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.