From bc126244a2ce566fffd766ffbf823328578ac15e Mon Sep 17 00:00:00 2001 From: Sven Fuchs Date: Tue, 17 Sep 2019 23:28:13 +0200 Subject: [PATCH] use deploy strategy --- lib/travis/hub/api/auth.rb | 2 +- lib/travis/hub/service/update_deploy.rb | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/travis/hub/api/auth.rb b/lib/travis/hub/api/auth.rb index 85558213d..163866977 100644 --- a/lib/travis/hub/api/auth.rb +++ b/lib/travis/hub/api/auth.rb @@ -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 diff --git a/lib/travis/hub/service/update_deploy.rb b/lib/travis/hub/service/update_deploy.rb index 811127078..86c1eac9b 100644 --- a/lib/travis/hub/service/update_deploy.rb +++ b/lib/travis/hub/service/update_deploy.rb @@ -24,7 +24,7 @@ def initialize(data) end def name - data[:name] + [data[:name], data[:strategy]].compact.join(':') end def success? @@ -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?