Hi!

On 19 June 2017 at 03:02, 'Ashwanth Kumar' via go-cd <go-cd@googlegroups.com
> wrote:

> On the pipeline-status notification. I guess it's not straight forward
> because if a job fails the entire stage fails but an operator can choose to
> ignore that stage and move the pipeline to the next stage to make it run to
> a completion. So I wouldn't know how exactly to mark a pipeline as complete
> successfully or a failure.
>

The problem with stage-status notification is that even if choose the last
stage in the pipeline to be the one that decides whether pipeline is
sucessful or not, I still can't do it, because I would have to configure
notification plugin for each pipeline I'm interested in. That would require
specyfing the last stage of each pipeline
I think you're making an error thinking that pipeline notification has to
have "success/failure" status. What I'm actually interested in is
"scheduled/finished" states and then I can send the result back, along with
all stages' statuses and let a user decide whether it's a success or
failure.


>
>    - I guess that's the reason why in GoCD when you depend on a pipeline
>    -> stage, it just depends on that particular stage running to a completion
>    without expecting the status of the previous stages in the pipeline.
>
> I think this is good from the pipeline dependency view, but not really
relevant for notifications.

>
>    - Another case to consider is, a pipeline would be paused or stopped
>    at a manual stage awaiting an operator input. When that happens the next
>    run of the pipeline could get triggered either manually or via timer.
>
>
>
I don't see a problem with this. It's an another legitimate status of a
pipeline, which could be called "stopped" or "awaiting" or anything more
appropriate.


> Bottom line, IMHO there's no universal way to determine the status of a
> pipeline run without making some assumptions. I guess the best way would be
> to depend on a pipeline's stage and may be verify if that completed
> successfully to trigger a corresponding notification, which is why the
> notification endpoint currently supports only stage based notification.
>
>
There's no universal way to define pipeline "success/failure" status, I
agree. But "pipeline-status" notification also gives you a possibility to
check the result of all passed stages and give a user an option (in plugin
configuration) to decide what it means for a pipeline to succeed or fail
(although still not per pipeline, at least not with complex configuration).
This means there's no one definition of successful pipeline that can be
right for some people and wrong for others.

Thanks,
Krzysztof Szatan


>
> On Mon, Jun 19, 2017 at 1:10 AM, Krzysztof Szatan <k.sza...@gmail.com>
> wrote:
>
>> I looked around in the code and it seems what I need is "pipeline-status"
>> notification as mentioned in https://github.com/gocd/gocd/issues/1798.
>> Is anyone working on this?
>>
>> Thanks,
>> Krzysztof Szatan
>>
>> W dniu niedziela, 18 czerwca 2017 12:31:46 UTC+2 użytkownik Krzysztof
>> Szatan napisał:
>>>
>>> Hi,
>>>
>>> I can see that pipeline config request
>>> <https://api.gocd.org/current/#get-pipeline-config> has *params* and
>>> *enviromental_variables* fields but pipeline instance request
>>> <https://api.gocd.org/current/#get-pipeline-instance> does not. Is this
>>> on purpose? Nevertheless, those requests are still inaccessible from a
>>> plugin. Is there a plan to extend GoApplicationAccessor
>>> <https://developer.gocd.org/17.5.0/writing_go_plugins/go_application_accessor/go_application_accessor.html>
>>>  functionality to include querying pipeline instances?
>>>
>>> Thanks,
>>> Krzysztof Szatan
>>>
>>> W dniu sobota, 17 czerwca 2017 23:51:44 UTC+2 użytkownik Krzysztof
>>> Szatan napisał:
>>>>
>>>> Hi!
>>>>
>>>> I'm trying to write a notification plugin for Phabricator and I'm stuck
>>>> on passing a parameter to a pipeline and then getting it from the plugin.
>>>> Is it possible to schedule a pipeline with a parameter using an API call?
>>>> Is there a way to enquire GoCD about these parameters for a particular
>>>> pipeline instance from a plugin? What's the best way to do it?
>>>> From what I read so far, I can only set an environment variable for a
>>>> scheduled pipeline and then somehow try to get it from the plugin.
>>>>
>>>> Thanks,
>>>> Krzysztof Szatan
>>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "go-cd-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to go-cd-dev+unsubscr...@googlegroups.com.
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
>
> Ashwanth Kumar / ashwanthkumar.in
>
> --
> 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.

Reply via email to