Skip to content
This repository has been archived by the owner on Dec 4, 2019. It is now read-only.

Set build output and status before after executes #9

Conversation

mizzy
Copy link
Contributor

@mizzy mizzy commented Aug 26, 2013

I'm making altria-ikachan plugin now.

I'd like to change the message depending on the result of the build like this.
https://github.com/mizzy/altria-ikachan/blob/master/lib/altria/ikachan/notifier.rb#L18

So I'd like to set build.status attribute after job#execute_script.

Please check this pull request.

Thanks.

I'm making altria-ikachan plugin now.

I'd like to change the message depending on the result of the build like this.
https://github.com/mizzy/altria-ikachan/blob/master/lib/altria/ikachan/notifier.rb#L18
Because of chages of a153d78, spec/models/job_spec.rb fails.

Job#current_build returns builds that don't have finished_at.
So if build.finished_at is set, current_build returns nil and spec fails.
In 9d1a92, I've made the change not to set started_at and finished at.
But to have multiple builds, build must have finished_at attribute.
In the example "Job#run with script runs its job", Altria::Executer.execute returns
nil and this example fails.So I've made this fix.
(I don't know why Altria::Executer.execute returns nil.)
@coveralls
Copy link

Coverage Status

Coverage increased (+0.37%) when pulling f6a4d95 on mizzy:set-build-output-and-status-before-after_executes into 55111f2 on r7kamura:master.

@r7kamura
Copy link
Owner

Thank you for your pull request! 👍

r7kamura added a commit that referenced this pull request Aug 26, 2013
…fter_executes

Set build output and status before after executes
@r7kamura r7kamura merged commit de8e092 into r7kamura:master Aug 26, 2013
@mizzy mizzy deleted the set-build-output-and-status-before-after_executes branch August 26, 2013 08:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants