Class: Bozo::Hooks::GitHub
- Inherits:
-
Object
- Object
- Bozo::Hooks::GitHub
- Defined in:
- lib/bozo/hooks/git_hub.rb
Overview
Hooks for notifying GitHub of the build
The following env variables are required
-
BUILD_URL
-
BUILD_NUMBER
with_hook :git_hub do |h|
h.token '.....'
h.owner 'zopaUK'
h.repo 'bozo-scripts'
end
Instance Method Summary collapse
- #failed_build ⇒ Object
- #owner(owner) ⇒ Object
- #post_build ⇒ Object
- #pre_build ⇒ Object
- #repo(repo) ⇒ Object
- #token(token) ⇒ Object
Instance Method Details
#failed_build ⇒ Object
28 29 30 |
# File 'lib/bozo/hooks/git_hub.rb', line 28 def failed_build submit_notification(:failure, "Build #{build_number} failed") end |
#owner(owner) ⇒ Object
36 37 38 |
# File 'lib/bozo/hooks/git_hub.rb', line 36 def owner(owner) @owner = owner end |
#post_build ⇒ Object
24 25 26 |
# File 'lib/bozo/hooks/git_hub.rb', line 24 def post_build submit_notification(:success, "Build #{build_number} succeeded") end |
#pre_build ⇒ Object
20 21 22 |
# File 'lib/bozo/hooks/git_hub.rb', line 20 def pre_build submit_notification(:pending, "Build #{build_number} pending") end |
#repo(repo) ⇒ Object
40 41 42 |
# File 'lib/bozo/hooks/git_hub.rb', line 40 def repo(repo) @repo = repo end |
#token(token) ⇒ Object
32 33 34 |
# File 'lib/bozo/hooks/git_hub.rb', line 32 def token(token) @token = token end |