Skip to content

Commit

Permalink
use deploy strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
svenfuchs committed Sep 17, 2019
1 parent f790aad commit bc12624
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/travis/hub/api/auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def decode_jwt(auth)
)
true
rescue JWT::InvalidSubError, JWT::DecodeError, JWT::ExpiredSignature => e
puts e.message
# puts e.message
false
end

Expand Down
10 changes: 8 additions & 2 deletions lib/travis/hub/service/update_deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def initialize(data)
end

def name
data[:name]
[data[:name], data[:strategy]].compact.join(':')
end

def success?
Expand Down Expand Up @@ -81,7 +81,13 @@ def job_id
end

def provider
@provider ||= Dpl.providers[data[:provider]]
@provider ||= Dpl.providers[provider_name].tap do |provider|
error "Unable to find provider #{provider_name}" if provider.nil?
end
end

def provider_name
[data[:provider], data[:strategy]].compact.join(':').to_sym
end

def edge?
Expand Down

0 comments on commit bc12624

Please sign in to comment.